Xcode 8 APS Environment Entitlement won't set to production

后端 未结 4 873
清酒与你
清酒与你 2020-12-25 10:51

I have push notifications working on my app.
I went to go submit a new app update and I ran into an error with APS environment not being set.
I hit fix issue and it c

相关标签:
4条回答
  • 2020-12-25 11:02

    Turn off the "push notifications" in Capabilities then re-build.

    Update

    After hours of debugging, no matter how you configure Xcode8 or build with whatever scheme(debug or production), you will always get a deviceToken for development environment from APNS. I tried to remove my app on my test device which build directly from Xcode8.1 with production scheme. Then I installed my app from AppStore, which was archived from Xcode8.1 with same configuration two weeks ago, the AppStore version's notification service works fine, which proves that Xcode did set the right entitlement value for production environment. So, the solution is: leave the entitlements file alone, and keep "Push Notifications" switch on in Capabilities, do any fixes Xcode asked for. Hope this would help you.

    0 讨论(0)
  • 2020-12-25 11:05

    Try to re-enable "Push Notifications" capabilities in , it worked for me, if this don't help, try to delete file with entitlements in your project, and again re-enable "Push Notifications" capabilities in your project settings

    0 讨论(0)
  • 2020-12-25 11:11

    After trying all the answers in stack over flow found out the problem is in entitlement.plist file can be debugged flag was set to TRUE.

    1. Try to disable and re-enable push notifications in Xcode target capabilities.
    2. Can be debugged flag should be set to NO to submit it to AppStore.

    Build and archive. You should be able to see environment set to production.

    0 讨论(0)
  • 2020-12-25 11:23

    For me XCode 8 'Automatically manage signing' feature do it automatically & correctly when archiving according to provisioning profile we select for deployment method.

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