The Simulator app requires several other large directories from the Xcode distribution in order to work at all. The only official way to install all of those properly is to install the entire SDK from the dmg. Then you can experiment with deleting the hopefully "unneeded" directories. Be prepared to start over if you delete something that the Simulator requires.
Answer from hotpaw2 on Stack OverflowThe Simulator app requires several other large directories from the Xcode distribution in order to work at all. The only official way to install all of those properly is to install the entire SDK from the dmg. Then you can experiment with deleting the hopefully "unneeded" directories. Be prepared to start over if you delete something that the Simulator requires.
You would have to extract the Simulator pkg from the Xcode DMG. The only thing is that the Simulator depends on having an SDK installed, that way it knows which iOS to run the app in.
Videos
Assuming you have Xcode installed in /Applications, then you can do this from the command line to start the iPhone Simulator:
$ open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app
(Xcode 6+):
$ open /Applications/Xcode.app/Contents/Developer/Applications/iOS Simulator.app
You could create a symbolic-link from your Desktop to make this easier:
$ ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app ~/Desktop
(Xcode 6+):
$ ln -s /Applications/Xcode.app/Contents/Developer/Applications/iOS Simulator.app ~/Desktop
As pointed out by @JackHahoney, you could also add an alias to your ~/.bash_profile:
$ alias simulator='open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app'
(Xcode 6+):
$ alias simulator='open /Applications/Xcode.app/Contents/Developer/Applications/iOS\ Simulator.app'
(Xcode 7+):
$ alias simulator='open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app'
Which would mean you could start the iPhone Simulator from the command line with one easy-to-remember word:
$ simulator
The easiest way without fiddling with command line:
- launch Xcode once.
- run ios simulator
- drag the ios simulator icon to dock it.
Next time you want to use it, just click on the ios simulator icon in the dock.
I have been trying to do a experiment which involves not using Xcode for iOS and maOS development.
So far, I have been sucessful building the application with xcodebuild command, but as I'm really new to this space I don't how to launch and debug apps without xcode.
Is this even possible? Most of the other editors have DAP(Debugger Adapter Protocol) these days, can we utilize them for debugging?
PS:
Not hating on Xcode, this is just an experiment I am doing.
I am learning to build iOS apps. I am following some udemy course. from what I understand, you need to be enrolled into xcode developer program to build IPAs, install on iPhone (and also upload them on AppStore).
I am just learning and have no plans to release apps to AppStore. And most of these apps are simple anwyays. So I wanted to know if there is any way to build IPA without dev program. I already have my device jailbroken so I can install IPA easily. I checked into jailcoder, but it is not updated for latest xcode/mac
appreciate any help!
-
You have to select don't code sign in XCode and
-
Install AppSync Unified which is intended for development porposes from karen repo: http://cydia.angelxwind.net/
-
And patch Xcode with Jailcoder and it should work
From your screenshots looks like you are doing Paul Hegarty's iOS classes. Even I am doing same. I don't have iTunes dev account, so I was also looking for similar solution. After lots of trial and error, I have found following method to be working.
OS: OS X 10.10.1, Xcode: 6.1
-
Patch Xcode. In
Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/SDKSettings.plistsetCODE_SIGNING_REQUIREDtoNO -
Get
ldid. Do following, run line after line:git clone git://git.saurik.com/ldid.git cd ldid git submodule update --init ./make.sh sudo cp ldid /usr/bin/ -
Make
Don't Code Signinfor all in build settings. Your screenshot is correct -
Select any iOS Simulator. Usually same as your device.
-
Build the project. Now from Project Navigator > Products > YourApp.app, right click on it and open it in finder. Usually it opens 'Debug-iphoneos'. Copy that YourApp.app file to somewhere else.
-
Do ldid on this one:
ldid -S YourApp.app/YourAppIf above is successful, it does not print anything (No news is Good News!)
-
Copy YourApp.app to your phone's
/Applications -
Give permissions to executable:
chmod +x /Applications/YourApp.app/YourApp -
rebuild cache:
su mobile -c uicache
That's all! It should work now. Atleast it works for me :)
(To delete the app, I just delete the app folder from /Applications and rebuild the cache. Not sure if this is the correct way. Please confirm from an experienced dev)
Hope this helps :)
You can, by executing the command below in the Terminal app.
xcrun simctl install {simulator_udid} {path of .app file}
It will install the .app file in the referenced simulator.
Note: Make sure that the .app file is built for the simulator (i.e. i386 or x86_64).
As long as they are on the same version of the target O/S as you you should be fine. Look here on your local machine:
~/Library/Application Support/iPhone Simulator/User/Applications/
That is where the apps are stored.
Watch this directory and grab everything that is added when you install the app. Then you can zip those materials and have your client un-zip them under the same path.
So I do not have enough space for iOS simulator , thou I have 33gb left after downloading Xcode , it is showing not enough space for the iOS simulator so is there a solution where I connect iPhone directly and run it