之前写了一个关于Apns 的 Demo,是可以运行了。
现在,想在原有的App里面添加Apns特性。
需要1-3:
1.重新申请证书enabling push notifications
2.重新建描述文件provisioning profile
3.修改App唯一标识与appIDs设置一致
出现问题:无法注册 Remote Notifications
did Fail To Register For Remote Notifications With Error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application"
解决方法:
如果1-3步都确认无误后,仍然没有解决no valid 'aps-environment 的问题,那么有可能是XCode更新证书失败(Xcode的BUG)。