semiwhale
2019-09-19 11:11:13 +08:00
iOS 除非应用在前台,或者用户点通知栏进入应用。否则 iOS 也拿不到推送内容。
Let’s review the possible scenarios when the operating delivers a local notification or a remote notification for an application.
The notification is delivered when the application isn’t running in the foreground. In this case, the system presents the notification, displaying an alert, badging an icon, perhaps playing a sound.
As a result of the presented notification, the user taps the action button of the alert or taps (or clicks) the application icon. If the action button is tapped (on a device running iOS), the system launches the application and the application calls its delegate’s application:didFinishLaunchingWithOptions: method (if implemented); it passes in the notification payload (for remote notifications) or the local-notification object (for local notifications).
If the application icon is tapped on a device running iOS, the application calls the same method, but furnishes no information about the notification.