简体   繁体   中英

Remote Notification 'application:didFinishLaunchingWithOptions:' method not called

Target: 7.0 and UP

Testing on: iPhone6 Device

I have been testing Regular Push Notifications (Remote).

I have discovered that if a user clicks on the app icon -- the "applicationDidFinishLaunching:" method is never called.

I have been reading and re-reading the guide on "Handling Local and Remote Notifications" and to confirm that I understood everything referred to: Handling Remote Notifications

It says If a user taps the default button in the alert or taps (or clicks) the app icon, then the app should call its delegate "application:didFinishLaunchingWithOptions" method. And if its a remote notification, it should call "application:didReceiveRemoteNotification:fetchCompletionHandler:".

Neither one of these methods get called if I click on the app icon.

The only method that does get called is applicationWillEnterForeground .

I do have a storyboard file. So the way it loads:

--> navigation controller --> table view controller --> so on

Am I supposed to somehow set the appDelegate in the storyboard file?

I have done a lot of research and so far I have had no luck.

My push alerts do come through so I know that it works. I just haven't been able to determine why these other methods are not being called when the user clicks on the app icon.

Any suggestions or help is appreciated.

如果要在用户单击应用程序图标时进行处理,唯一的解决方案是A.)设置静默通知或B.)在服务器上设置某些内容,以便您可以向服务器发出请求以了解是否存在是一个新的更新。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM