12

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

vikingosegundo
  • 51,126
  • 14
  • 131
  • 172
bobadil
  • 123
  • 1
  • 6

3 Answers3

14

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

ChrisH
  • 4,348
  • 2
  • 30
  • 42
  • Indeed it works, thank you very much, i tested the app, the simulator and the iphone are changing messages!Now i will test a number of things! – bobadil Dec 19 '13 at 08:26
  • 1
    Was looking through these posts for hours and finally figured out that my devices weren't finding each other only because the serviceType on my browser didn't exactly match that of my advertiser. Check that first and be smarter than me. – JordanC Aug 25 '14 at 23:38
4

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.

  • Thanks for your reply, unfortunately the mac mini makes the pair but keeps me disconnected. Makes a connection with the iphone but it lasts 1 sec then it disconnects and a notification says "network is unavailable - make sure network access is enabled". The connection is between an iphone4 and a new mac mini – bobadil Dec 16 '13 at 18:01
2

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.

user2577923
  • 166
  • 5