简体   繁体   English

查找设备令牌Xcode? 对于推送通知

[英]find Device Token Xcode? For Push Notifications

I am trying to find the device token so that i can send push notifications but this is not sending anything to my NSLog. 我正在尝试查找设备令牌,以便可以发送推送通知,但这没有向我的NSLog发送任何信息。

(void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken
{
      NSLog(@"My token is: %@", deviceToken);
}

have enabled notifications with the following command? 使用以下命令启用了通知?

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

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM