[[MFPPush sharedInstance] initialize];
[[MFPPush sharedInstance] registerDevice:^(WLResponse *response, NSError *error) {
if(error){
NSLog(@"Failed to register");
}else{
NSLog(@"Successfullyregistered");
}
}];
[MFPPush sharedInstance] unregisterDevice:^(WLResponse *response, NSError *error) {
if(error){
NSLog(@"Failed to unregister");
}else{
NSLog(@"Successfully unregistered");
}
}];
NSMutableArray *tags = [[NSMutableArray alloc]init];
[tags addObject:@"sample-tag1"];
[tags addObject:@"sample-tag2"];
[MFPPush sharedInstance] subscribe:tags completionHandler:^(WLResponse *response, NSError *error) {
if(error){
NSLog(@"Failed to unregister");
}else{
NSLog(@"Successfully unregistered");
}
}];
NSMutableArray *tags = [[NSMutableArray alloc]init];
[tags addObject:@"sample-tag1"];
[tags addObject:@"sample-tag2"];
[MFPPush sharedInstance] unsubscribe:tags completionHandler:^(WLResponse *response, NSError *error) {
if(error){
NSLog(@"Failed to unregister");
}else{
NSLog(@"Successfully unregistered");
}
}];
Server
Remove the WL.Server.sendMessage (if used), in your adapter.
You can also set up the credentials by using Update GCM settings (PUT) REST API, for Android applications or Update APNs settings (PUT) REST API, for iOS applications.