是否可以在 iOS 模拟器中使用蓝牙测试应用程序?
文档没有说明可以运行多少个实例。它也没有说明是否支持/不支持蓝牙 https://web.archive.org/web/20110510000057/http://developer.apple.com/library/ios/documentation/Xcode/Conceptual/iphone_development/125-Using_iOS_Simulator/ios_simulator_application.html
我刚刚阅读了以下内容,发现不可能运行多个 iOS 模拟器实例: 有没有办法在以下位置运行多个 iOS 模拟器一次?
我想知道模拟器是否支持蓝牙。我需要多个物理设备来测试蓝牙吗?
我可以通过在一台物理设备上安装我的应用程序来测试蓝牙并与 iOS 模拟器中托管的另一个应用程序通信吗?
测试需要蓝牙的 iPhone 应用程序的最佳方法是什么?
更新...
iPhone 运行 4.3.3 - 蓝牙位于
Mac OS 10.6.7 上 - 蓝牙已打开且可发现。提前下。
我自制的应用程序或 iOS 4 SDK 附带的 GKRocket 演示应用程序都不会显示应用程序内的其他设备。
两者都会在网络设置中发现另一个应用程序;但是,不在应用程序内。目前我不知道这是配置问题还是iOS模拟器的问题。
The documentation does not say how many instances can run. Also it does not say if it does/does not support bluetooth
https://web.archive.org/web/20110510000057/http://developer.apple.com/library/ios/documentation/Xcode/Conceptual/iphone_development/125-Using_iOS_Simulator/ios_simulator_application.html
I just read the following and found out that it is not possible to have multiple iOS simulator instances running:
Is there a way to run multiple iOS Simulators at once?
I wondered if the simulator supports bluetooth at all. Do I need multiple physical devices to test bluetooth?
Can I get away with testing bluetooth by installing my app on one physical device and communicate to another app hosted in the iOS Simulator?
What is the best way to test iPhone Apps that require Bluetooth?
Update...
iPhone running 4.3.3 - Bluetooth is on
Mac OS 10.6.7 - Bluetooth is on and discoverable. Under advance.
Neither my home made app or the GKRocket demo app that ships with the iOS 4 SDK will show the other device from within the app.
Both will discover the other app in the network settings; however, not within the app. I don't know if this is a problem with config or the iOS simulator at this point.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
当然可以,即使您有内置蓝牙,您也应该拥有 Le 蓝牙 USB 适配器,
请检查此链接:
of course you can you should have Le Bluetooth USB adapter even if you have a built in Bluetooth
check this link: http://developer.apple.com/library/ios/#technotes/tn2295/_index.html
不确定您希望进行哪种蓝牙测试,但我可以肯定地告诉您,它适用于在模拟器和 iPhone 之间创建 GameKit 会话 - 我经常使用它来测试我的一个应用程序。您一次只能运行一个模拟器实例,因此您无法测试同一台计算机上的 2 个模拟器实例之间的通信。
Not sure what kind of bluetooth testing you're hoping to do, but I can tell you for certain that it works for creating a GameKit session between the simulator and an iPhone - I use that quite frequently to test one of my apps. You can only have one instance of the simulator running at a time, so you can't test communication between 2 instances of the simulator on the same machine.
根据 WWDC 2013 上的 Core Bluetooth 演示,Apple
正在放弃 iOS 模拟器对 Core Bluetooth 的支持:
http://devstreaming.apple.com/videos/wwdc/2013/703xcx2xljtlq481grxurla4/703/703-HD.mov?dl=1
(演讲大约在 7 点 28 分左右宣布)。
According to the Core Bluetooth presentation at the WWDC 2013, Apple
is dropping iOS simulator support for Core Bluetooth:
http://devstreaming.apple.com/videos/wwdc/2013/703xcx2xljtlq481grxurla4/703/703-HD.mov?dl=1
(announcement is ca. 7:28 into the talk).