deviceToken 去掉空格,去掉<>

    //去掉<>
     NSString *dt = [devices_token stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"<>"]];
    NSString *dn = [dt stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
    //空格用别的代替
    dt = [dn stringByReplacingOccurrencesOfString:@" " withString:@""];

你可能感兴趣的:(device)