You can easily create a project that runs it in the simulator from the command line like this:
1, xcodebuild -project Someproject.xcodeproj -arch i386 -sdk iphonesimulator
2 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/Contents/MacOS/iPhone\ Simulator -SimulateApplication PATHTOAPPFILE/Someproject.app/Someproject
But in this way, the application does not have folders with documents and a library, as it would if it were created by Xcode and placed in /Users/SOMEUSER/Library/Application Support/iPhone Simulator/6.0/Applications/APPID/Someproject.app
Ergo [NSBundle mainbundle]will not work properly.
Question: How do I tell xcodebuild where the application should look for folders in its environment?
(By default, I believe that it is looking in /Users/USER/Library/Application Support/iPhone Simulator/IOSVERSION, but this creates problems, because there already is a library folder for other things)
I do not mind if I have to manually create folders before running the application in the simulator.
source
share