如何运行 iPhone 模拟器 (Aspen) 的两个实例来尝试 WiTap 示例?
有没有人有幸运行 iPhone 模拟器的两个实例来测试两者之间的网络代码?
Has anyone had any luck running two instances of the iPhone simulator to test network code between the two?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
不需要,但您可以在手机上运行模拟器和 WiTap 代码。 我已经做到了,这非常酷。
只需为您的开发配置文件配置 WiTap 代码并将其加载到手机上。 然后,确保手机位于同一网络 wifi 上,您可以使用运行 WiTap 的模拟器和运行 WiTap 的手机来运行您的开发机器。
奇迹般有效。
No but you can run the Simulator and the WiTap code on your phone. I've done that and it's pretty cool.
Just provision the WiTap code for your development provisioning profile and load it on the phone. Then, making sure the phone is on the same network wifi, you can run your development machine with the Simulator running WiTap, and the phone running WiTap.
Works like a charm.
仅供参考,frankodwyer 以不同用户身份运行 iPhoneSimulator 的想法行不通。 Quoth Finder:“您无法打开应用程序“iPhone Simulator”,因为其他用户已打开该应用程序。请要求其他用户退出该应用程序,然后重试。”
FYI, frankodwyer's idea of running iPhoneSimulator as a different user doesn't work. Quoth Finder: "You can't open the application 'iPhone Simulator' because another user has it open. Ask the other user to quit the application, then try again."
只是一个想法,但您可以尝试将另一个用户添加到您的 Mac 并在两个帐户中运行模拟器。 (我非常确定模拟器配置是相对于用户主目录存储的)
第一步是在用户切换下进行。 如果可行的话,它应该可以设置模拟器第二个实例所需的一切。 然后注销第二个帐户,返回到您常用的帐户。 现在尝试从终端中的命令行运行第二个模拟器实例,但作为第二个用户帐户(在运行模拟器之前使用“su -”切换其他用户帐户)。
我不在我的 Mac 旁,我不知道模拟器二进制文件的名称,否则我会尝试一下并为您粘贴一些代码。
Just an idea, but you could try adding another user to your mac and run the simulator within both accounts. (I am pretty sure that the simulator config is stored relative to the user home directory)
First step would be to get that going under user switching. If that works, it should hopefully set up everything the simulator needs for a second instance. Then log out the second account, go back to your usual account. Now try running a second simulator instance from the command line in a terminal, but as the second user account (use 'su -' to switch the other user account before running the simulator).
I'm not at my mac and offhand I don't know the name of the simulator binary or I would try this out and paste some code for you.
请按照以下步骤测试您的应用程序。
整个过程你必须先做一件事:转到项目-> 编辑项目设置 -> 勾选选项 - 并行构建独立目标。
调试将在模拟器中创建应用程序的代码例如,您的应用程序名称是 - 实例
关闭模拟器
转到项目->新目标-> Instance2 在 Instance2.info.plist 文件中添加“Bundle display name : Instance2” 设置可执行文件名称 : Instance2 选择 Instance2 Target ->; 转到项目 -> 设置活动目标 -> Instance2 使用 Instance2 构建
注意:请小心操作,否则您必须重置模拟器 对于重置模拟器 -> 运行模拟器-> iPhone 模拟器 -> 重置内容和 设置...
现在您在模拟器中有两个应用程序,您可以在所有实例上测试应用程序。
希望它能帮助你:)
Ravikant Nagar
Follow these steps to test your app.
You have to do one thing for whole process first : Go to Project - > Edit Project Settings -> tick on option - Build independent targets in parallel.
Debug code that will create your app in simulator For Example your App name is - Instance
Close Simulator
Go to Project->New Target -> Instance2 Add "Bundle display name : Instance2" in Instance2.info.plist file Set Executable Name : Instance2 Select Instance2 Target -> Go to Project -> Set Active Target -> Instance2 Build with Instance2
Note : Do all carefully otherwise you have to reset your simulator For Reset Simulator -> Run Simulator -> iPhone Simulator -> Reset Content & Settings...
Now You have two apps in simulator and you can test app on all instance.
Hope it will help you :)
Ravikant Nagar