推送devicetoken

2020-12-09  本文已影响0人  _风雨

Swift

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

OC

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

猜你喜欢

热点阅读