Question

Has anyone had any luck running two instances of the iPhone simulator to test network code between the two?

Was it helpful?

Solution

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.

OTHER TIPS

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."

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.

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top