更新时间:2022-05-30 22:12:17
此答案已过时.从 2020/Xcode 11.4 开始,现在可以在模拟器中测试推送通知
This answer is outdated. As of 2020 / Xcode 11.4 it's now possible to test push notifications in the simulator
抱歉,您需要找到一些硬件来测试此功能.
Sorry to say, but you'll need to find some hardware to test this functionality.
推送通知在模拟器中不可用.它们需要来自 iTunes Connect 的配置文件,因此需要安装在设备上.这也意味着您可能必须被 Apple iPhone 开发者计划接受并支付 99 美元.
Push notifications are not available in the simulator. They require a provisioning profile from iTunes Connect, and thus are required to be installed on a device. That also means you'll probably have to be accepted into the apple iPhone developer program and pay your $99.
好的一面是,随着 iPhone OS 3.0 更新,您可以在任何设备上测试此功能,包括第一代 iPhone.
On the bright side, with the iPhone OS 3.0 update, you can test this functionality on any device, including the first gen iPhones.