我怎么知道我的iPhone已连接到Apple Push Notification Service? [英] How can I know that my iPhone is connected to the Apple Push Notification Service?
本文介绍了我怎么知道我的iPhone已连接到Apple Push Notification Service?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎么知道我的iPhone已连接到Apple Push Notification Service?我有什么办法可以在iPhone上看到它吗?
How can I know that my iPhone is connected to the Apple Push Notification Service? Is there any way that I can see it in my iPhone?
谢谢.
推荐答案
在您的
- (void)applicationDidFinishLaunching:(UIApplication *)application
方法,您可以使用以下代码:
method, you can use this code:
if( !application.enabledRemoteNotificationTypes )
{
[[UIApplication sharedApplication] registerForRemoteNotificationTypes: UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert];
}
这篇关于我怎么知道我的iPhone已连接到Apple Push Notification Service?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文