I know how to create silent push notifications (with playing a sound file that is silent). I would also like to send a push notification that doesn\'t vibrate phone.
I did it this way: server send a push to device with sound file name which is silent. That's it.
Example:
Incomming payload from server:
{ aps = { "content-available" = 1; sound="silence.mp3" }; data-id = 1234; }
And device handle it in AppDelegate:
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
NSInteger data_id= [userInfo[@"data-id"] integerValue];
NSLog(@"Data-id: %i", data_id);
//
// code...
//
// UIBackgroundFetchResultNoData/UIBackgroundFetchResultFailed/UIBackgroundFetchResultNewData
completionHandler(UIBackgroundFetchResultNewData);
}