xcode 在 iOS 模拟器中测试 SMS

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9012393/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 23:06:22  来源:igfitidea点击:

Testing SMS in the iOS Simulator

iosxcodeios-simulator

提问by Aldee

Is it possible to open the message composer interface in the iPhone simulator in xcode? if it is can someone tell me how.. I really need it now and having hard times finding a solution how and why my code does not work on simulator. thanks.. :D

是否可以在 xcode 中打开 iPhone 模拟器中的消息编辑器界面?如果是的话,有人可以告诉我如何..我现在真的需要它并且很难找到解决方案,我的代码如何以及为什么在模拟器上不起作用。感谢:D

回答by Hyman Humphries

It is not possible. This is one of the limitations of iOS Simulator. You also cannot test push notifications, iCloud, etc. If you need to test your code, you will have to join Apple's iOS Developer Program and test the app on your device. It's $99 per year. Hope this helps.

这不可能。这是 iOS 模拟器的限制之一。您也无法测试推送通知、iCloud 等。如果您需要测试您的代码,您必须加入 Apple 的 iOS 开发人员计划并在您的设备上测试该应用程序。每年 99 美元。希望这可以帮助。

回答by John T

Just as an update to this post, it's still true that you can't test these features on the iOS simulator; however, you CANrun your apps on your own personal device withouthaving to pay for the $99/year developer license.

就像这篇文章的更新一样,你仍然无法在iOS模拟器上测试这些功能;然而,你CAN运行你自己的个人设备上的应用程序,而不需要支付的$ 99 /年的开发许可证。

You can now just plug your phone in, wait for XCode to download and process some files, and then select your device from the "Devices" dropdown.

您现在只需插入手机,等待 XCode 下载并处理一些文件,然后从“设备”下拉列表中选择您的设备。

Here are a couple of resources that helped me out when getting this set up:

以下是一些帮助我进行设置的资源:

Xcode "Device Locked" When iPhone is unlocked

iPhone解锁时Xcode“设备锁定”

https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/LaunchingYourApponDevices/LaunchingYourApponDevices.html

https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/LaunchingYourApponDevices/LaunchingYourApponDevices.html