iPhone - 注册推送通知锁定 iPhone 在发布模式下运行 iOS3

Posted

技术标签:

【中文标题】iPhone - 注册推送通知锁定 iPhone 在发布模式下运行 iOS3【英文标题】:iPhone - Register for push notification lock iPhone running iOS3 on Release mode 【发布时间】:2012-01-11 18:01:56 【问题描述】:

我把下面的代码放在“applicationdidFinishLaunchingWithOptions”中

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
    
    // Let the device know we want to receive push notifications
    [[UIApplication sharedApplication] registerForRemoteNotificationTypes:
     (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];

...//other code

该应用在 ios 4、iOS 5(DEBUG 和 RELEASE 模式)下运行良好。 该应用程序在调试模式下的 iOS 3 中运行良好。 该应用程序在 iOS 3 的 RELEASE 模式下无法运行,应用程序启动时手机被锁定。 请看截图。 你知道如何解决吗?

【问题讨论】:

锁定是什么意思?你的意思是卡住了?它发生在真实设备上还是仅在模拟器上? 所以借了另外 2 部运行 iOS 3.0 的 iPhone,应用程序运行良好。可能只发生在我的设备上。 在黑暗中拍摄,但不知道这是不是因为您没有安装 SIM 卡... 我也是这么想的,但是我借来的2部iPhone(运行iOS 3)也没有SIM卡,应用程序运行良好。不错的尝试。 【参考方案1】:

所以借了另外 2 部运行 iOS 3.0 的 iPhone,该应用程序运行良好。可能只发生在我的设备上。

【讨论】:

以上是关于iPhone - 注册推送通知锁定 iPhone 在发布模式下运行 iOS3的主要内容,如果未能解决你的问题,请参考以下文章

我的 iPhone 应用程序可以注册以接收用于其他应用程序的推送通知吗?

并非所有 iPhone 推送通知都发送到 iPhone

iPhone客户端没有注册推送?

解锁 iPhone 时推送通知警报会打开应用程序

推送通知 iPhone 中的声音

推送通知警报在 ios 4.2 中解锁 iPhone 时应用程序无法打开