在模拟器中推送通知-不起作用的Xcode 11.4beta

问题描述:

最近,苹果公司也在模拟器中添加了推送通知.我现有的应用程序通知未在模拟器中收到.

Recently Apple has added push notifications in simulators as well. My existing app notifications are not being received in simulators.

如何在模拟器中模拟推送通知?

How to simulate push notification in simulator?

Simulator支持模拟远程推送通知,包括后台内容获取通知.

Simulator supports simulating remote push notifications, including background content fetch notifications.

参考: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_4_beta_release_notes

Simulator支持模拟远程推送通知,包括后台内容获取通知...

Simulator supports simulating remote push notifications, including background content fetch notifications...

Apple并未向模拟器添加推送通知,而是添加了对模拟推送通知的支持.因此,这意味着您无法接收任何推送通知,只需模拟即可.

Apple didn't added push notifications to simulator, they added support for simulating push notifications. So this means that you cannot receive any push notifications, you can just simulate them.

您可以在下的 Xcode Beta发行说明中了解更多信息.模拟器部分.

You can read more about this in Xcode Beta Release Notes under the Simulator section.