iOS app (MobileFirst) is rejected by Apple (NSPhotoLibraryUsageDescription)

时间:2016-10-20 12:44:26

标签: ios cordova ibm-mobilefirst ios10 testflight

Our hybrid mobile app for iOS (that is developed with MobileFirst 7.1) was rejected recently by Apple:

This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.

However, the app does not use Photo Library. So, the issue should come from one of the libraries we use. Besides CordovaLib (that comes with MobileFirst), we use email-composer (cordova-plugin-email-composer), PushPlugin (https://github.com/phonegap-build/PushPlugin) and barcodescanner (https://github.com/phonegap/phonegap-plugin-barcodescanner). Barcodescanner requires camera access (the key was included to Info.plist before submission), but not photo library access. For the other two plugins there is no information on their web pages about iOS 10 and their use cases is too far away from Photo Library.

So, the questions are:

  • can cordovaLib cause such an issue? (MobileFirst)
  • is camera access somehow connected to photo library? (e.g. camera usage implicitly needs access to photo library)
  • how to check what exactly causes such issues? Is there a tool that can tell in advance that using of some class will cause issues with privacy settings?

P.S. I know that I can just add NSPhotoLibraryUsageDescription key to Info.plist, but thats not what I want: the app does not need photo library and I don't want to add such a key. Can not post a link to email-composer due to stack overflow restrictions.

3 个答案:

答案 0 :(得分:1)

以下是博客文章讨论为何会发生这种情况:http://cordobo.com/2256-fix-ioniccordova-app-ios-10-nscamerausagedescription-permission/。作者碰巧也使用条形码扫描仪和Cordova。这几乎是一样的。

这是一个现在发生的变化,因为Apple推出了iOS 10的新政策。

与建议删除并重新添加相机插件的博客文章不同 - 因为在MobileFirst中你无法自行执行此操作,我建议手动进行更改。通过更改,我的意思是在config.xml文件中添加带有所需文本的description标记,然后再次尝试提交应用程序。

如果它仍然失败,我建议为IBM支持人员打开PMR来帮忙。

另请注意,可能还有其他插件需要描述文本处理。在最近的博客文章中查看Apache Cordova的以下更改日志。搜索iOS更改。

答案 1 :(得分:0)

所以,答案是:MobileFirst附带的嵌入式Cordova插件导致了问题。在没有条形码扫描器的情况下向TestFlight提交,但这些插件失败并出现同样的问题。删除嵌入式插件解决了问题,并且接受了提交。

https://mobilefirstplatform.ibmcloud.com/blog/2016/10/25/supporting-privacy-changes-in-ios-10/

P.S。目前尚不清楚为什么只有照片库存在问题而不是联系人,例如,但无论如何它都有效。

答案 2 :(得分:0)

通过添加拒绝邮件的权限或错误日志来更新 Info.plist 文件。

<强> NSPhotoLibraryUsageDescription

<key>NSPhotoLibraryUsageDescription</key>
    <string>$(PRODUCT_NAME) photos and video use.</string>

或者

解决隐私敏感数据应用拒绝问题

https://developer.apple.com/library/content/qa/qa1937/_index.html