差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版 两侧同时换到之后的修订记录
im:ios:apns:deploy [2019/09/29 04:22]
huanxinfudh [客户端如何申请DeviceToken]
im:ios:apns:deploy [2019/09/29 04:27]
huanxinfudh [客户端如何申请DeviceToken]
行 165: 行 165:
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,​ 0), ^{     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,​ 0), ^{
          const unsigned *tokenBytes = [deviceToken bytes];          const unsigned *tokenBytes = [deviceToken bytes];
-         ​NSString *token = [NSString stringWithFormat:​@"​%08x%08x%08x%08x%08x%08x%08x%08x",​ +         ​NSString *hexToken ​= [NSString stringWithFormat:​@"​%08x%08x%08x%08x%08x%08x%08x%08x",​ntohl(tokenBytes[0]),​ntohl(tokenBytes[1]),​ntohl(tokenBytes[2]),​ntohl(tokenBytes[3]),​ntohl(tokenBytes[4]),​ntohl(tokenBytes[5]),​ntohl(tokenBytes[6]),​ntohl(tokenBytes[7])];​
-                          ​ntohl(tokenBytes[0]),​ ntohl(tokenBytes[1]),​ ntohl(tokenBytes[2]),​ +
-                          ​ntohl(tokenBytes[3]),​ ntohl(tokenBytes[4]),​ ntohl(tokenBytes[5]),​ +
         [[EMClient sharedClient] bindDeviceToken:​token];​         [[EMClient sharedClient] bindDeviceToken:​token];​
     });     });