Rejected iOs build: Missing Info.plist key

After using ionic package to build a release .ipa I keep getting this message from apple when submitting the .ipa to iTunes connect.

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.

This started happening suddenly on my latest build. I have done many previous uploads to iTunes connect with no problem.

I use the cordova-camera-plugin but I have used this with successful submission before and this seems to add the permissions to the plist file.

The only plugin I added since my last successful release was the cordova-contacts. When I do ionic platform add ios and look at the plist.info file it has the PhotoLibrary permissions in there, so I am curios as to why I keep getting rejected! Does anybody have any ideas?

Are these two plugins maybe conflicting and reverting their respective changes in Info.plist?

1 Like

That’s possible. However as far as I know the contacts plugin doesn’t use the photo library. I thought about taking out the contacts plugin because I was able to submit before adding that but I want that feature in my release so I’d like to solve this. I’ll let you know when I figure it out

This section in the docs in regards to iOS quirks seems relevant.
The camera plugin has a similar section found here.

In short, it’s a new thang in iOS 10.

2 Likes

Thanks. Yeah I’ve read through the Cordova-camera docs and I’ve reinstalled the plugin with the added permission parameter. Somehow it doesn’t get written to the plist.info when I build and I keep getting rejected. I am going to try and reinstall the contacts plugin tomorrow, although I don’t see why this would change anything.

Anybody have any more info on how ionic writes to the plist when building and where I might be encountering a problem?

Executing that command should add the value to your config.xml and package.json, also to a file in /plugins if I remember correctly.

If stuff doesn’t work, maybe remove and re-add your platforms. Cordova sometimes “hangs” a bit with this stuff - I never really figure out how and why.

1 Like

So it doesn’t seem to be the plugins. I removed both and submitted an .ipa to iTunes Connect just to check and I still get rejected for the same reason. I also removed and re-added the cordova platform.

I am really confused right now. No idea why I keep getting rejected.

Two thoughts:

  1. I may be wrong on that, but did you submit a different “version”. iTunes sometimes doesn’t accept the same version twice if it rejected it once.
  2. Did you also remove the code using these plugins?
1 Like

Yeah I keep having to change the version so iTunes connect will accept it. It’s afterwards that I get the email from apple saying there is a problem with the binary.

No I didn’t take out the code. That’s a good point, I just figured without the plugin it wouldn’t register, so maybe it still is the plugins. The plugins are integral to my app so I was just testing it out.

Not sure what the hell I could have done to cause this problem. I doubt it’s the contact plugin, but that’s the only thing I’ve really added since my last successful submission to apple.

Not sure how much this matters but when I go to my platforms folder and find the Info.plist the permission is clearly there.


<key>NSPhotoLibraryUsageDescription</key>
<string>Choose photos for submitted issues</string>

Ok solved it!

Basically following everyone’s advice. I removed the plugins, removed iOs cordova platform, re-added, and then reinstalled the plugin added the permission parameter to each. I had done all these separately, but I guess doing it all on the same build finally go it right. There must have been some conflicting writes to the plist or something.

To anyone else with this problem I would add and remove platform and re-add the plugins with the permission strings in the install command.

Thanks for the help everybody!

2 Likes

A post was split to a new topic: Info.plist never contains NSCameraUsageDescription I set