Bundle Identifier and push certificate… aps-environment entitlement error

前端 未结 19 2533
滥情空心
滥情空心 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: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:

    application-identifier
    xyz.com.xyz.xyz
    aps-environment
    development
    com.apple.developer.ubiquity-container-identifiers
    
    xyz.*
    
    com.apple.developer.ubiquity-kvstore-identifier
    xyz.*
    get-task-allow
    
    keychain-access-groups
    
    xyz.*
    
    

    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.

提交回复
热议问题