I modified the alias sample code from:
    [request addRequestHeader: @"Content-Type" value: @"application/json"];
    [request appendPostData:[[NSString stringWithFormat: @"{\"alias\": \"%@\"}", self.deviceAlias]
                          dataUsingEncoding:NSUTF8StringEncoding]];
to:
[request addRequestHeader: @"Content-Type" value: @"application/json"];
[request appendPostData:[[NSString stringWithFormat: @"{\"tags\": \"%@\"}", offsetStr]
                                                 dataUsingEncoding:NSUTF8StringEncoding]];
开发者_运维百科offsetStr is a string containing a Timezone offset (which can be any number between -12 and 12).
For some reason, Urban Airship is making each character of the string into its own tag.
I've tried to substitute the - for a string neg with the same results. 
What's wrong?
The problem is that "tags" should be a list, not a single value. Through square brackets around the value, and you'll be fine.
[request addRequestHeader: @"Content-Type" value: @"application/json"];
[request appendPostData:[[NSString stringWithFormat: @"{\"tags\": [\"%@\]"}", offsetStr]
                                             dataUsingEncoding:NSUTF8StringEncoding]];
But you really should use a JSON library, like json-framework or TouchJSON if you want to encode JSON on the client.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论