21. Push Messages from one iphone to multiple end points
NSMutableArray *arr = [DataSource getFriendAWS:kk list:self.all];
NSString *msg= [NSString stringWithFormat:
@"您在%@有%@KTV邀請喔 ~ 快來看看吧 ~",begindate,self.subject.text];
for( NSString *tt in arr) {
if (tt.length>5) {
dispatch_queue_t queue = dispatch_get_global_queue
(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_async(queue, ^{
dispatch_async(dispatch_get_main_queue(), ^{
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
});
[[MessageBoard instance] pushToMobileEnd:msg to:tt];
dispatch_async(dispatch_get_main_queue(), ^{
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
NSLog(@"---Mobile Push Done--");
});
});
}
}
沒有留言:
發佈留言