2015-05-29 98 views

回答

0

是的,可能的。请参阅下面的屏幕截图,您可以在哪里上传多个iOS应用的多个p12证书文件。然后,您将根据应用发送推送。使用渠道。一个应用的一个频道名称,第二个应用的另一个频道。您也可以将额外的字段添加到安装类,以便您可以通过查询用户向用户发送预先推送通知。

enter image description here

还有一个helpful link

0

Guide

与连接一个parse.com

[Parse setApplicationId:@"xxxx" 
        clientKey:@"xxxx"]; 

获取设备TOCAN

PFInstallation *currentInstallation = [PFInstallation currentInstallation]; 
[currentInstallation setDeviceTokenFromData:deviceToken]; 
     currentInstallation.channels = @[ @"globle" ]; 
[currentInstallation saveInBackground]; 
NSString * udid=[[[[deviceToken description] 
          stringByReplacingOccurrencesOfString: @"<" withString: @""] 
          stringByReplacingOccurrencesOfString: @">" withString: @""] 
         stringByReplacingOccurrencesOfString: @" " withString: @""]; 

发送PushNotification

NSMutableArray * arrUserParseQuery=[[NSMutableArray alloc]init]; 
//add user to send pushNotification 
    for (NSString * strObjectId in arrUsers) { 
     PFQuery * objUserQuery=[PFQuery queryWithClassName:@"_User"]; 
     [objUserQuery whereKey:@"objectId" equalTo:strObjectId]; 
     [arrUserParseQuery addObject:objUserQuery]; 
    } 
    [pushQuery whereKey:@"UserId" matchesQuery:[PFQuery orQueryWithSubqueries:arrUserParseQuery]]; 
    PFPush *push = [[PFPush alloc] init]; 
    [push setQuery:pushQuery]; // Set our Installation query 
    [push setMessage:@"Notification text"]; 
    [push sendPushInBackgroundWithBlock:^(BOOL succeeded, NSError *error) { 
      NSLog(@"Errer of push notification %@",error); 
    }]; 

必须设置Certificates在parse.com发送pushNotification。

+0

请仔细阅读我的问题,我的问题是,我可以用一个parse.com应用连接两个iOS应用的推送通知 –

+0

你看我的答案在发送PushNotification,你可以发送可能的用户通知。 – Lalji

相关问题