I just want to know how I can determine what action to do on a silent push:
This is the aps that I sent to the client:
\"aps\": {
\"
As i understand, you want extra data inside payload, so you can identify what push notification type is,or what action need to be handled.
For that edit your payload as:
$body = array(
'content-available' => 1,
'sound' => ''
);
$payload = array();
$payload['aps'] = $body;
$payload['action'] = 'order_update';
Then in your iOS Code:
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
{
NSString *action = userInfo["action"];
if([userInfo[@"aps"][@"content-available"] intValue]== 1 && [action isEqualToString:@"order_update") //order update notification
{
//handle Your Action here
return;
}
}
Hope this solves your problem!