multipeer connectivity test on iphone and a simulator simultaneously

戏子无情 提交于 2019-12-04 17:49:28

问题


Hello I was searching in all topics of the forum about how can i test an app which uses multipeer connectivity framework. Can someone tell me how can i test an app by using an iPhone device and a simulator simultaneously, player one for device and player two on the simulator and vice versa. I already test the app by using two simulators one per mac - user on a mac and its working but it is not convenient to continuously switch users to test an app. I tried all the alternatives, running once in simulator and one on device at the same time,make second target, nothing happened.

Thanks in advance


回答1:


If you put your iPhone and your Mac on the same WiFi network they should able to discover each other without any problem.




回答2:


Yes you can test your app on Device an Simulator simultaneously. I'm developing an app with Multipeer Connectivity right now and communication between Iphone and Simulator works fine. I'm running it on a MacBook Air. All you have to do is to make sure, that Bluetooth is enabled on your Mac. You can do this in System Preferences -> Bluetooth.




回答3:


In addition to testing on WiFi, you can also test your app based on "Multipeer Connectivity framework" on simulator and any IOS device using Bluetooth, As long as simulator and devices are connected in same Personal area network.

For example, on Iphone you can turn on Personal Hotspot (in your phone General settings) to connect your phone with your mac in same personal area network via bluetooth or WiFi and then try testing your app sharing messages between simulator and Iphone using any personal network based on Bluetooth or WiFi.

All the combination will work as long as app using "Mutlipeer connectivity framework" are on same personal area network.



来源:https://stackoverflow.com/questions/20594714/multipeer-connectivity-test-on-iphone-and-a-simulator-simultaneously

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!