Jake Alsemgeest
Jake Alsemgeest

Reputation: 702

UIRequiredDeviceCapabilities is invalid for iOS application

I'm trying to upload an iOS application to iTunes Connect, however every time I attempt to upload the application I get the following message:

Performance - 2.3

We were unable to install the app. The UIRequiredDeviceCapabilities key in the Info.plist is set in such a way that the app will not install.

Next Steps

Please check the UIRequiredDeviceCapabilities key to verify that it contains only the attributes required for your app features or the attributes that must not be present on the device. Attributes specified by a dictionary should be set to true if they are required and false if they must not be present on the device.

I don't understand what I'm doing wrong with the UIRequiredDeviceCapabilities.

My application requires the device to have a camera as it involves reading a QR code.

The following is my 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>UIRequiredDeviceCapabilities</key>
    <array>
        <string>still-camera</string>
    </array>
    <key>CFBundleDevelopmentRegion</key>
    <string>en</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</string>
    <key>CFBundleIcons</key>
    <dict/>
    <key>CFBundleIcons~ipad</key>
    <dict/>
    <key>CFBundleIdentifier</key>
    <string>pw.whatsyourwifi.ios</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.1</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>5</string>
    <key>ITSAppUsesNonExemptEncryption</key>
    <false/>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIMainStoryboardFile</key>
    <string>Main</string>
    <key>LSApplicationCategoryType</key>
    <string></string>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
    </array>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
</dict>
</plist>

I have looked at a number of resources provided by Apple such as: Expected App Behaviours List of Possible Values

Any help is appreciated, just don't know what I'm doing wrong at this point.

Upvotes: 0

Views: 2590

Answers (2)

Manu Kanthan
Manu Kanthan

Reputation: 197

FYI, this was resolved for me when I simply replied to the app rejection stating that my plist file was correct per the docs (assuming yours is correct to your app and the docs). They accepted me.

Upvotes: 1

user149341
user149341

Reputation:

The contents of UIRequiredDeviceCapabilities must be a dictionary, not an array; the capability is used as a key in the dictionary, and the value must be set to a boolean true or false to indicate whether the device must have the capability, or must not have the capability.

(The utility of prohibiting capabilities in an app is a little questionable. I'm not sure why it'd make sense to have an app that would refuse to install on a device with a camera, for instance. But that's what Apple put in there, so…)

In your case, this would look like:

<key>UIRequiredDeviceCapabilities</key>
<dict>
    <key>still-camera</key>
    <true/>
</dict>

Upvotes: 0

Related Questions