开发者

Push notification not working

I am trying to send push notifications to myself.

I have copied the code from Apple. But I am getting the error no valid 'aps-environment' entitlement string found for application.

I made a 开发者_运维问答new project with the same code (without adding entitlements.plist)and it's working fine. so it's not the problem of my provisioning profile or my code, then what is?

Can someone tell me why it isn't working on my main project?

thanks in advance


This means that the provisioning profile used to build the application does not have push notifications enabled. Push notifications must be enabled for that application ID in the iTunes Developer Portal.

If you’ve already enabled push notifications and still receive this error, it might be because you enabled push notifications after the provisioning profile was created. In this case, the profile will not have the required push notification settings, and must be regenerated.

To regenerate the provisioning profile, find it in the iTunes Developer Portal, and click Edit->Modify and save it. When you download the new profile, we recommend removing the existing profile from the device and XCode before installing the new one. Many developers continue to report problems unless they do this step.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜