美文网首页
推送devicetoken

推送devicetoken

作者: _风雨 | 来源:发表于2020-12-09 17:16 被阅读0次

Swift

let token = deviceToken.reduce("") { $0 + String(format: "%02x", $1) }

OC

NSString *token = [[[[deviceToken description] stringByReplacingOccurrencesOfString:@"<"
                                                                             withString:@""]
                        stringByReplacingOccurrencesOfString:@">"
                        withString:@""]
                       stringByReplacingOccurrencesOfString:@" "
                       withString:@""];

相关文章

网友评论

      本文标题:推送devicetoken

      本文链接:https://www.haomeiwen.com/subject/ernniktx.html