Silent Push Notification not getting processed in iOS 11.2.6
Asked Answered
B

1

7

I am trying to implement Silent Push Notification in my app for periodically i.e. once in a day upload data to server.
But on iOS 11.2.6 it's consistently failing to call the delegate method

-(void) application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))

completionHandler of Silent Push Notification.

In device logs, I can see that the Silent Push Notification is received, but application launch is cancelled by DuetActivitySchedulerDaemon (as per the logs).

Can you please help me in resolving this issue? Following is the log of device.

Apr 11 21:44:59 iPhone- SpringBoard(UserNotificationsServer)[2696] <Notice>: [com.***.***-myapp] Received remote notification request 91E8-DC24 [ hasAlertContent: 0, hasSound: 0 hasBadge: 0 hasContentAvailable: 1 hasMutableContent: 0 ]
Apr 11 21:44:59 iPhone- SpringBoard(UserNotificationsServer)[2696] <Notice>: [com.***.***-myapp] Deliver push notification request 91E8-DC24. 
Apr 11 21:44:59 iPhone- SpringBoard(UserNotificationsServer)[2696] <Notice>: [com.***.***-myapp] Passing content-available push to Duet. 
Apr 11 21:44:59 iPhone- SpringBoard(DuetActivityScheduler)[2696] <Notice>: SUBMITTING: <private>. 
Apr 11 21:44:59 iPhone- SpringBoard(UserNotificationsServer)[2696] <Error>: Ignoring notification with no alert, sound or badge (com.***.***-myapp): 91E8-DC24
Apr 11 21:44:59 iPhone- SpringBoard(UserNotificationsServer)[2696] <Notice>: [com.***.***-myapp] Not saving push notification 91E8-DC24 to store [ error=Error Domain=UNErrorDomain Code=1401 "Notification has no user-facing content" UserInfo={NSLocalizedDescription=Notification has no user-facing content} ]
Apr 11 21:44:59 iPhone- dasd(DuetActivitySchedulerDaemon)[163] <Notice>: Submitted Activity: com.apple.pushLaunch.com.***.***-myapp:88F855 <private>
Apr 11 21:44:59 iPhone- dasd(DuetActivitySchedulerDaemon)[163] <Notice>: Daemon Canceling Activities: {(
com.apple.pushLaunch.com.***.***-myapp:88F855 )}
Apr 11 21:44:59 iPhone- dasd(DuetActivitySchedulerDaemon)[163] <Notice>: CANCELED: com.apple.pushLaunch.com.***.***-myapp:88F855 <private>!

It does work for some time in other OS and stops completely till next launch.

Beatification answered 12/4, 2018 at 7:32 Comment(0)
D
0

There is nothing to resolve. This is a intended behavior. Since WWDC13 it was always made clear that background activities will get limited to apps that are actually used. It was possible to bypass this restriction with silent pushes pre 11, but as always it became a common abuse. Actually surprised that dasd wasn't more aggressive in previous versions.

Ditch answered 12/4, 2018 at 13:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.