Xcode 11.4 之前必须使用第三方和真机来测试远程推送(APNS)。 但 Xcode 11.4 之后可以通过simctl命令在模拟器上进行测试。
使用命令行
Xcode 命令行工具允许从终端上使用模拟器:启动模拟器,触发通用链接等。 其中有一个命令就是将远程推送通知发送到 iOS 模拟器。
查看帮助
xcrun simctl push --help
Send a simulated push notification
Usage: simctl push <device> [<bundle ide...