Missing info.plist key - build rejected


#1

The issue

I’m having an issue when submitting a build to Apple. It keeps getting rejected, they send me this message:

We have discovered one or more issues with your recent delivery for “appName”. To process your delivery, the following issues must be corrected:

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.

Suggested solution [still not working for me]

There is a thread suggesting a solution here. It suggests removing the plugin, removing the ios platform, adding the ios platform and re-installing the plugin with the needed parameter(s) as such:

cordova plugin add cordova-plugin-camera --variable CAMERA_USAGE_DESCRIPTION="your usage message" --variable PHOTOLIBRARY_USAGE_DESCRIPTION="your usage message"

I did everything that was suggested. The config.xml and package.json file now show the correct lines with the camera usage description.

When I open the project in Xcode, in the Info tab, it shows the correct property in the info.plist file:

Privacy - Camera Usage Description : your usage message

When I search my project for info.plist (in Finder), I have a file called MyProjectName-Info.plist, which shows the key NSCameraUsageDescription as expected. So far, so good.

Where it got stuck

When I build the project, and/or create an archive, for every build an info.plist file is generated. This file never contains the NSCameraUsageDescription property as I would expect. In fact, it shows a lot less properties then are shown in the info.plist in the Xcode project. I don’t understand why this happens. My builds all get rejected as a result.

Any help or suggestions are appreciated.


#2

This is what I’m gonna try: I will manually change the archive’s Info.plist.
I’d still prefer a proper solution to this though.

I’ll add the differences in here to elaborate the issue.

This is the project’s Info.plist source:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>English</string>
	<key>CFBundleDisplayName</key>
	<string>${PRODUCT_NAME}</string>
	<key>CFBundleExecutable</key>
	<string>${EXECUTABLE_NAME}</string>
	<key>CFBundleIcons</key>
	<dict/>
	<key>CFBundleIcons~ipad</key>
	<dict/>
	<key>CFBundleIdentifier</key>
	<string>be.domain.appname</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>${PRODUCT_NAME}</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0.2</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleVersion</key>
	<string>1.0.2</string>
	<key>LSRequiresIPhoneOS</key>
	<true/>
	<key>NSAppTransportSecurity</key>
	<dict>
		<key>NSAllowsArbitraryLoads</key>
		<true/>
		<key>NSExceptionDomains</key>
		<dict>
			<key>192.168.0.155</key>
			<dict>
				<key>NSExceptionAllowsInsecureHTTPLoads</key>
				<true/>
			</dict>
			<key>192.168.0.166</key>
			<dict>
				<key>NSExceptionAllowsInsecureHTTPLoads</key>
				<true/>
			</dict>
			<key>192.168.0.168</key>
			<dict>
				<key>NSExceptionAllowsInsecureHTTPLoads</key>
				<true/>
			</dict>
			<key>192.168.0.175</key>
			<dict>
				<key>NSExceptionAllowsInsecureHTTPLoads</key>
				<true/>
			</dict>
			<key>ionic.local</key>
			<dict>
				<key>NSExceptionAllowsInsecureHTTPLoads</key>
				<true/>
			</dict>
			<key>youtube-nocookie.com/*</key>
			<dict>
				<key>NSExceptionAllowsInsecureHTTPLoads</key>
				<true/>
				<key>NSIncludesSubdomains</key>
				<true/>
			</dict>
			<key>youtube.com/*</key>
			<dict>
				<key>NSExceptionAllowsInsecureHTTPLoads</key>
				<true/>
				<key>NSIncludesSubdomains</key>
				<true/>
			</dict>
		</dict>
	</dict>
	<key>NSCameraUsageDescription</key>
	<string>Camera usage description here.</string>
	<key>NSLocationWhenInUseUsageDescription</key>
	<string></string>
	<key>NSMainNibFile~ipad</key>
	<string></string>
	<key>NSPhotoLibraryUsageDescription</key>
	<string></string>
	<key>UIInterfaceOrientation</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
	</array>
	<key>UIRequiresFullScreen</key>
	<true/>
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationPortraitUpsideDown</string>
	</array>
	<key>UISupportedInterfaceOrientations~ipad</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationPortraitUpsideDown</string>
	</array>
</dict>
</plist>

This is the generated Build Archive’s Info.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>ApplicationProperties</key>
	<dict>
		<key>ApplicationPath</key>
		<string>Applications/Appname.app</string>
		<key>CFBundleIdentifier</key>
		<string>be.domain.appname</string>
		<key>CFBundleShortVersionString</key>
		<string>1.0.2</string>
		<key>CFBundleVersion</key>
		<string>1.0.2</string>
		<key>SigningIdentity</key>
		<string>iPhone Developer: name (identifier)</string>
	</dict>
	<key>ArchiveVersion</key>
	<integer>2</integer>
	<key>CreationDate</key>
	<date>2017-07-07T08:57:19Z</date>
	<key>Name</key>
	<string>Appname</string>
	<key>SchemeName</key>
	<string>Appname</string>
</dict>
</plist>

#3

@dagjanklaas, have you ever found a solution? I mean, another one then changing Info.plist directly in the archive.


#4

Hi @skydive, nope, I didn’t manage to find a proper solution - other than manually changing the Info.plist.


#5

The way these usage descriptions are added changed in the plugin. Reading the plugin docs should show the new way and should work as expcted.