简体   繁体   中英

iOS Invalid code signing Entitlements

I created an app in Xamarin, that I am going to upload to TestFlight, but I am getting an error when trying to upload it.

It says

ERROR ITMS-90045: "Invalid Code Signing Entitlements. Your application bundle's signature contains signing entitlements that are not supported on iOS. Specifically, key 'UIBackgroundModes' in **app-path**' is not supported."

My Info.plist are as shown below

<?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>UIDeviceFamily</key>
    <array>
      <integer>1</integer>
    </array>
    <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>
    <key>MinimumOSVersion</key>
    <string>7.1</string>
    <key>CFBundleDisplayName</key>
    <string>**app-name**</string>
    <key>CFBundleIdentifier</key>
    <string>**app-path**</string>
    <key>CFBundleVersion</key>
    <string>10</string>
    <key>CFBundleIconFiles</key>
    <array>
      <string>Icon@2x.png</string>
      <string>Icon.png</string>
      <string>Icon-60@2x.png</string>
    </array>
    <key>CFBundleShortVersionString</key>
    <string>1.6.4</string>
    <key>UIStatusBarTintParameters</key>
    <dict>
      <key>UINavigationBar</key>
      <dict>
        <key>Style</key>
        <string>UIBarStyleDefault</string>
        <key>Translucent</key>
        <false/>
        <key>BackgroundImage</key>
        <string></string>
      </dict>
    </dict>
    <key>UIPrerenderedIcon</key>
    <false/>
    <key>UIStatusBarHidden</key>
    <true/>
    <key>UIStatusBarStyle</key>
    <string>UIStatusBarStyleBlackOpaque</string>
    <key>UIAppFonts</key>
    <array>
      <string>icomoon.ttf</string>
      <string>TitilliumWeb-Light.ttf</string>
    </array>
    <key>UIBackgroundModes</key>
    <array>
      <string>remote-notification</string>
    </array>
  </dict>
</plist>

The Entitlements.plist is shown below

<?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>keychain-access-groups</key>
    <array>
      <string>$(AppIdentifierPrefix)**app-path**</string>
    </array>
    <key>UIBackgroundModes</key>
    <array>
      <string>remote-notification</string>
    </array>
  </dict>
</plist>

What can I have done wrong?

In the example below I have replaced the app-name and app-path with **app-name** and **app-bath**

UIBackgroundModes is not a valid entitlement key - this key should be included in Info.plist instead.

Info.plist key reference:

https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html

Entitlements.plist key reference:

https://developer.apple.com/library/ios/documentation/Miscellaneous/Reference/EntitlementKeyReference/Chapters/AboutEntitlements.html

Hope this helps.

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