How to install iPhone application in iPhone Simulator
Solution 1:
Please note: this answer is obsolete, the functionality was removed from iOS simulator.
I have just found that you don't need to copy the mobile application bundle to the iPhone Simulator's folder to start it on the simulator, as described in the forum. That way you need to click on the app to get it started, not confortable when you want to do testing and start the app numerous times.
There are undocumented command line parameters for the iOS Simulator, which can be used for such purposes. The one you are looking for is: -SimulateApplication
An example command line starting up YourFavouriteApp:
/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/Contents/MacOS/iPhone\ Simulator -SimulateApplication path_to_your_app/YourFavouriteApp.app/YourFavouriteApp
This will start up your application without any installation and works with iOS Simulator 4.2 at least. You cannot reach the home menu, though.
There are other unpublished command line parameters, like switching the SDK. Happy hunting for those...
Solution 2:
This thread discusses how to install the binary on the simulator. I've done it and it works: http://forums.macrumors.com/showthread.php?t=547557
From the thread:
Look inside your ~/Library/Application Support/iPhone Simulator/User/Applications/ directory and see what happens inside this directory when you install and run apps using XCode, and also when you delete apps using the Simulator.
You can run the Simulator by itself (without starting XCode).
If you start the Simulator, delete an app, quit the Simulator, put back copies of the files that were deleted from the support directory, and restart the Simulator, the app will reappear in the Simulator. Email those files with instructions about how to copy them into the appropriate support directory.
Solution 3:
You can install apps in simulator from Xcode 8.2
From Xcode 8.2,You can install an app (*.app) by dragging any previously built app bundle into the simulator window.
Note: You cannot install apps from the App Store in simulation environments.