简体   繁体   中英

App rejected due to missing info.plist key

My app is getting rejected due to a missing info.plist key.

Missing Info.plist key - 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.

I know how to "fix" it. It's just as simple as it sounds, just add NSPhotoLibraryUsageDescription to my info.plist with a description of what it's used for.

The problem is that I'm not using anything that should trigger this requirement. I do not want to add this description without knowing what it's for .

The only thing I can think of that could cause this problem right now is that one of the external frameworks I'm using via CocoaPods has something to do with it.

This is my podfile:

def myPods
    pod 'HockeySDK',          '4.1.2'
    pod 'ReactiveCocoa',      '2.4.7'
    pod 'TTTAttributedLabel', '2.0.0'
    pod 'GoogleMaps',         '2.1.0'
    pod 'GoogleAnalytics',    '3.17.0'
end

target 'MainApp' do
    myPods
end

target 'BetaApp' do
    myPods
    pod 'Instabug', '7.0.5'
end

I know for a fact that Instabug requires this key (along with the key for Microphone usage), but I'm not always including Instabug, as you can see. Let's say I have two targets; MainApp and BetaApp . They each have its own info.plist . In BetaApp's info.plist, I have included the keys required. In MainApp I have not included them, because Instabug is not used in MainApp. When I now try to upload the MainApp to AppStore I get this rejection. I have also tried removing the Instabug-pod completely (even though it's just present in the BetaApp), and it still happens in MainApp.

I have never had this rejection in MainApp before (it's not a new app, just an update). I think I have updated GoogleMaps since last release, and maybe some of the others as well, but I have no idea how to find out why Apple thinks I have to implement NSPhotoLibraryUsageDescription .

Is there a way to find out what part of my app is triggering this requirement?

I assume that if I implement the keys, they will never actually be triggered, and the user would never be prompted to allow access to the photos library (because I have no code that attempts to access the user's photos library), but I'd like to know why this is happening, and I'm reluctant to add it before I know..

I'd suggest you to follow instructions found in this answer

I understand that this might sound dumb to add NSPhotoLibraryUsageDescription key for no reason, however binary validation on the Apple's side is the process you don't have control over so it's simpler just to add this key.

As for the background reason, I believe, Apple validator looks for UIImagePickerController usage in binary, not only AssetsLibrary or Photos framework linkage. So if you'd like to get your app submitted & approved, you have either sanitize around this, or simply add required key.

If you think, you don't use it, take a look at ReactiveCocoa/UI/UIImagePickerController+RACSignalSupport.m , so, unless you are not ready to have a custom ReactiveCocoa or avoid it's usage, you'll have to deal with NSPhotoLibraryUsageDescription

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM