iOS 点击通知栏跳转

不管是使用 iOS 自带推送, 还是三方推送.流程都基本一致

1. 调用系统(或三方) 的 DidRegisteredDeviceToken 方法, 注册 deviceToken

2. 通知弹窗弹出时触发系统(或三方) 的 willPresent notification 方法

3. App 位于前台或挂起时, 点击通知栏触发 didReceive response 方法, 如果使用三方, 则触发三方的 didReceive response 方法, 系统的 didReceive response 不会触发.

如果 App 在杀死状态, 点击通知栏时 App 启动, 可以在 didFinishLaunchingWithOptions 中判断 launchOptions 是否为空, 不为空说明有通知.

发布了79 篇原创文章 · 获赞 9 · 访问量 7万+

猜你喜欢

转载自blog.csdn.net/LeeCSDN77/article/details/103052678