小编use*_*103的帖子

适用于越狱应用的Apple Notification Service

我正在创建一个安装在/ Applications中的越狱应用程序.无论我做什么,我似乎无法使Push Notifications工作.

我有:

  • 在Apple Developer控制台中创建必要的App ID,
  • 创建所有必要的证书和规定,
  • 必要时安装上面的,
  • 使用相应的证书签署了应用程序,
  • 将.MobileProvision文件中找到的内容添加到权限中,
  • 把头靠在墙上.

症状如下.我成功注册了APNS并获得了设备令牌.设备令牌已成功发送到我的服务器.我的服务器成功连接到APNS服务器,成功发送推送通知到APNS服务器,没有任何类型的投诉,我的应用程序永远不会收到Push消息.它只是迷路了.无论我是使用越狱的ios 7设备还是越狱的ios 8设备进行测试都无关紧要.据我所知,这两款设备都成功获得了其他应用的APNS消息.

我尝试了开发人员和生产设置.

我是否缺少一些必要的越狱应用程序步骤,通常是在定期注册应用程序时为您完成的?系统应用程序是不是能够成为APNS应用程序(这看起来很奇怪)?

这是一些代码.电话侧(斯威夫特):

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool
{
    if Global.OSVersion() < 800
    {
        application.registerForRemoteNotificationTypes(UIRemoteNotificationType.Alert
                                                     | UIRemoteNotificationType.Badge
                                                     | UIRemoteNotificationType.Sound);
    }
    else
    {
        var types: UIUserNotificationType = UIUserNotificationType.Alert
                                          | UIUserNotificationType.Badge
                                          | UIUserNotificationType.Sound;
        var settings: UIUserNotificationSettings = UIUserNotificationSettings(forTypes: types,
                                                                              categories: nil);
        application.registerUserNotificationSettings(settings);
    }
    application.beginReceivingRemoteControlEvents();
}

func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData)
{
    let bytes: [Byte] = deviceToken.getBytes();
    var token: String = "";
    for …
Run Code Online (Sandbox Code Playgroud)

jailbreak apple-push-notifications ios

7
推荐指数
1
解决办法
631
查看次数

标签 统计

apple-push-notifications ×1

ios ×1

jailbreak ×1