简体   繁体   English

注册推送通知时,“没有有效的'aps-environment'权利字符串”

[英]“no valid 'aps-environment' entitlement string” when registering for Push Notifications

i used the code below to register for push notification inside applicationdidFinishLaunchingWithOptions but nothing happens why ? 我使用下面的代码在applicationdidFinishLaunchingWithOptions注册推送通知,但没有任何反应原因?

The code : 编码 :

    [[UIApplication sharedApplication] registerForRemoteNotificationTypes:
 (UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];

and my Push Notification setting is on. 并且我的推送通知设置已开启。

You should also check wether your server is using the right target and the iOS the right certificate as well. 您还应该检查您的服务器是否正在使用正确的目标,以及iOS也是正确的证书。 There are two certificates: one is for development (sandbox certificate) and the other is the production certificate. 有两个证书:一个用于开发(沙盒证书),另一个是生产证书。

Development: gateway.sandbox.push.apple.com:2195
Production: gateway.push.apple.com:2195

If you use the development certificate to talk to the production server address then you won't receive any push. 如果您使用开发证书与生产服务器地址通信,那么您将不会收到任何推送。

Also remind that the simulator doesn't support push. 还要提醒一下,模拟器不支持推送。 As it has no push token. 因为它没有推送令牌。

您是否实现了application:didRegisterForRemoteNotificationsWithDeviceToken:application:didFailToRegisterForRemoteNotificationsWithError:委托方法以查看注册的结束方式?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 “找不到有效的aps-environment权利申请” - “no valid aps-environment entitlement found for application” 苹果推送通知 - 没有有效的'aps-environment'尝试过我在网上看过的所有解决方案? - apple push notifications - no valid 'aps-environment' have tried all solutions I've seen on web? iPhone应用程序APNS无法获取设备令牌,错误:“找不到适用于应用程序的有效'aps-environment'授权字符串” - iphone app APNS can't get device token, error: “no valid 'aps-environment' entitlement string found for application” 配置文件中缺少aps环境! - Missing aps-environment in provisioning profile! Apple推送通知 - 注册通知时根本没有收到回叫 - Apple Push Notifications - When Registering for Notifications no Callbacks are received at all 在iOS 8中注册推送通知时如何访问deviceToken? - How to access deviceToken when registering for push notifications in iOS 8? 临时构建未注册推送通知 - Ad Hoc build not registering push notifications 注册获取Apple Push Notifications和Entitlements.plist - Registering for Apple Push Notifications and Entitlements.plist 推送通知未在App Store应用程序 - iphone上注册 - Push Notifications not registering on App Store application - iphone 注册推送通知时出现问题。 救命! - Problem registering Push Notifications. HELP!
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM