1

I am working on push notification on IOS 10. When App is inactive/closed and gets notifications I able to get the userinfo(notification payload) with

NSDictionary *info = launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey];

But if I directly click the app icon (not notification badge) I am not able to find get the notification payload. Referred this post and tried to access by writing to file in

 didReceiveRemoteNotification:userInfo
 fetchCompletionHandler:^(UIBackgroundFetchResult handler)
 { Logging userinfo with NSLog  to verify, but I don't see any log entry}

And reading it back at didFinishLaunchingWithOptions, but no luck. Is there any other IOS method available for this use case?

piet.t
  • 11,718
  • 21
  • 43
  • 52
leela
  • 62
  • 7
  • see this for iOS 10 https://stackoverflow.com/questions/39382852/didreceiveremotenotification-not-called-ios-10/39383027#39383027 – Anbu.Karthik Jun 22 '17 at 09:08

1 Answers1

0

You can't get push notification userInfo in this case, you must store it on server, see my answer here

Arthur Sahakyan
  • 566
  • 3
  • 17