【发布时间】:2013-11-16 23:59:16
【问题描述】:
我有一个城市飞艇帐户,并且我的 iOS 应用程序已经配置了系统。我的设备令牌在服务器上,如果我从服务器发送测试通知,我会在我的 iphone 上收到通知。 但是如何从我的 iphone 向另一个用户发送消息? 我还没有找到任何关于通过 iphone 发送的东西。 这是我的代码:
NSMutableURLRequest * request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://go.urbanairship.com/api/push/"]];
[request setHTTPMethod:@"POST"];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSDictionary *push;
push = @{@"aps":@{@"alert":@"How are you?"},@"device_tokens":@[@"87892382J393FS77789S90909N82022312332"]};
然后我必须将它作为 json 或其他东西发送???
【问题讨论】:
标签: ios iphone xcode push urbanairship.com