Search code examples
iosswiftinfo.plistremote-notifications

Distributing app to App Store Connect upload fails with invalid NSExtention key error in info.plist


I'm trying to upload an app to use Test Flight to test it. All goes well until the actual upload when it fails with the error:

Distribution failed with errors:   
App Store Connect Operation Error invalid Info.plist Key.  The key 'NSExtension' in the Info.plist file is not valid. With error code
    STATE_ERROR.VALIDATION_ERROR.90190 for id...'

I also get:

Distribution failed with errors:
App Store Connect Operation Error
ERROR ITMS-90190: "Invalid Info.plist Key. The key 'NSExtension' in the Info.plist file is not valid."

The pertinent section of the Info.plist is:

<plist version="1.0">
<dict>
    <key>NSExtensionAttributes</key>
    <dict>
        <key>UNNotificationExtensionCategory</key>
        <string>actionCategory</string>
        <key>UNNotificationExtensionDefaultContentHidden</key>
        <true/>
        <key>UNNotificationExtensionInitialContentSizeRatio</key>
        <integer>1</integer>
        <key>UNNotificationExtensionUserInteractionEnabled</key>
        <true/>
    </dict>
    <key>NSExtensionMainStoryboard</key>
    <string>Main</string>
    <key>NSExtensionPointIdentifier</key>
    <string>com.apple.usernotifications.content-extension</string>
    <key>NSExtensionPrincipalClass</key>
    <string>$(PRODUCT_MODULE_NAME).NotificationService</string>
</dict>
</plist>

I know that the NSExtensionMainStoryboard and NSExtensionPrincipalClass keys are mutually exclusive. I've tried submitting with just one or the other key included and received the same result.

I've checked this as best I can with Apple docs and I can't figure out what is wrong with it.

Any help is greatly appreciated.


Solution

  • Does your app's Info.plist have an NSExtension key? Only your extension's Info.plist should contain the NSExtension attributes.