为什么我使用 UIApplicationLaunchOptionsLocalNotificationKey 接收远程通知时有效?

Why it works when I use UIApplicationLaunchOptionsLocalNotificationKey to receive remote notifications?

当我尝试获取远程通知时,我犯了一个错误,即使用 UIApplicationLaunchOptionsLocalNotificationKey 作为 LaunchingOptions 字典的键来获取信息。但这一切都适用于我的真实 iPhone(10.2).

我可以点击远程通知来启动我的应用程序。这是为什么?

我分享的link里面有一段:

When to Use Local and Remote Notifications

Because apps on iOS, tvOS, and watchOS are not always running, local notifications provide a way to alert the user when your app has new information to present. For example, an app that pulls data from a server in the background can schedule a local notification when some interesting piece of information is received. Local notifications are also well suited for apps such as calendar and to-do list apps that need to alert the user at a specific time or when a specific geographic location is reached.

Remote notifications are appropriate when some or all of the app’s data is managed by your company’s servers. With remote notifications, you decide when you want to push a notification to the user’s device. For example, a messaging app would use remote notifications to let users know when new messages arrive. Because they are sent from your server, you can send remote notifications at any time, including when the app is not running on the user’s device.