no valid 'aps-environment' entitlement string

落花浮王杯 提交于 2019-12-05 21:30:23

问题


I've searched on Google and Stack Overflow, but I'm unable to resolve this problem.

My app has an AdHoc and Appstore provisioning profiles, both of which are giving the error "no valid 'aps-environment' entitlement string found for application" in my X Code console, and I'm unable to send push notifications. So far the steps I've taken are: - edited profile in development portal, downloaded new profile and inspected the .mobliprovision file. Found

aps-environment: production get-task-allow : false

I submitted it to the App store anyway, and it passed validation and it is awaiting review. When I inspect the binary detail in iTunes Connect portal, I can ses that aps-environment is listed as "production" as well

What could I be doing wrong?


回答1:


Did you create the provisioning profile AFTER you generated the push certificates from the Application ID you are using?

It is very likely you created the provisioning profile first and then generated the push certificates.

For future reference PushIO has a handy step-by-step guide to creating a PEM file that includes the warning about re-generating the provisioning profile after generating the PEM certificate :

http://docs.oracle.com/cloud/latest/marketingcs_gs/OMCFA/ios/distribution-pem/




回答2:


It took me hours to solve it. Given that someone is using custom scripts to sign and pack while others are using xcode itself, there's only one way to check what ended in your app. Dump you entitlements with

codesign --display --entitlements :- path/to/MyApp.app

and check aps-environment and application-identifier.

You should also check that hose entries are in your profile and that they match



来源:https://stackoverflow.com/questions/12644751/no-valid-aps-environment-entitlement-string

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!