Bundle Identifier and push certificate… aps-environment entitlement error

前端 未结 19 2358
滥情空心
滥情空心 2020-11-29 17:38

I\'ve read Where does xcode take application's Identifier from? , XCode bundle identifier formatting from {PRODUCT_NAME} , and loads more but...

I\'m trying to g

相关标签:
19条回答
  • 2020-11-29 18:05

    Make sure you have selected correct. Provisioning Profile. I found that I was trying with Team Provisioning profile.(for application identifier: *) Further down in the list, there was correct one for the app.

    0 讨论(0)
  • 2020-11-29 18:07

    I just figured this out after a few hours, so in addition to what JulianB said,

    • make sure you have an application icon. You probably have one but i happened to add push when we were between icon versions. I tried allot of different things and in the end that was all it took so it might not even be a cert or signing setting issue.
    • I've also read a corrupt image file could also be the cause
    • i did not add/see an aps-environment key in my entitlements.plist
    • clean all targets before building
    0 讨论(0)
  • 2020-11-29 18:08

    I found this question when I was moving from a development environment to a production one on an application that I am working on. This process involved the creation of a new profile, a new app ID, etc. I created the app ID and a profile, but the Team Agent had to configure the push notifications. I ran into the problem of "no valid 'aps-environment' entitlement string found for application" when I tried to resume testing with the new profile (after the app had been configured for push notifications). I then remembered reading a little caveat in the documentation:

    "You have to modify the profile in some way (for example, toggle an option) for the portal to generate a new provisioning profile. If the profile isn't so "dirtied", you're given the profile without the push entitlements."

    Source: Local and Push Notification Programming Guide

    For me, "dirtying" the provisioning profile and reinstalling it was all that was needed to fix the issue. Per the documentation, this was required because the provisioning profile was created before the app was configured for push notifications. This may or may not help anyone, but this probably explains (and eliminates) the need to manually add anything to the provisioning profile.

    0 讨论(0)
  • 2020-11-29 18:08

    I ran into the same "no valid 'aps-environment' entitlement string found for application" problem, but the above solutions did not work for me.

    I could not find very good documentation about this error or even just the key "aps-environment".

    After some tinkering around, here is what solved the problem for me:

    Open your development provisioning certificate, "Appname.mobileprovision" with a text editor, look for the key "Entitlements" then add all of the values found here to your Entitlements file referenced by your Code Signing Entitlements setting.

    Here is an example of what keys/values you'll find inside:

    <key>application-identifier</key>
    <string>xyz.com.xyz.xyz</string>
    <key>aps-environment</key>
    <string>development</string>
    <key>com.apple.developer.ubiquity-container-identifiers</key>
    <array>
    <string>xyz.*</string>
    </array>
    <key>com.apple.developer.ubiquity-kvstore-identifier</key>
    <string>xyz.*</string>
    <key>get-task-allow</key>
    <true/>
    <key>keychain-access-groups</key>
    <array>
    <string>xyz.*</string>
    </array>
    

    After adding all of these values to my Entitlements file my app builds successfully and I can finally get back to working on Push Notifications.

    I'm not sure if these values are supposed to be automatically added to your entitlements file by XCode, but they certainly weren't being generated for me in my project.

    0 讨论(0)
  • 2020-11-29 18:09

    Using XCode4 and receiving the same "no valid 'aps-environment' entitlement string found for application" I had to do the following:

    • Delete old provisioning profiles from both Library + Device panels in Organizer
    • Regenerate new profile with APN dev enabled from the developer portal website
    • Make sure new profile is added to both Library + Device panels in Organizer
    • Manually delete my app off my device (holding till it jiggles and hitting X)
    • CMD+OPT+SHIFT+K (Clean Build Folder) and CMD+SHIFT+K (Clean)
    • Set the proper profile under Project > Build Settings > Code Signing
    • Make sure 'Use Entitlements' is not checked under Targets > Summary
    0 讨论(0)
  • 2020-11-29 18:12

    My solution was to remove and create again Development Provisioning Profile. It was listed as "Invalid" - not expired and also renew failed (Xcode 4.3.2 and iOS 5.1)

    0 讨论(0)
提交回复
热议问题