Videos
Hi, like the title says. I want to run some apps for iPhone on my mac, but they’re only available for iPhone and iPad. I tried installing Xcode and running a simulator, but that one doesn’t have an app store. What are my options?
Edit: it is an M2-macbook pro.
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.
There is a recently announced service Corellium that offers virtualised cloud instances of iOS. It's not publicly available yet though and no word of how much it will cost. I'm not aware of any way of running them on your desktop though other than the Xcode simulator.
It is the kind of thing I imagine Apple would have been quick to clamp down on in the past although there is lots of talk about the two app stores converging in the near future so who knows what will happen.
See these links for more info on that:
- https://9to5mac.com/2017/12/21/apple-cross-platform-apps-opinion/
- https://www.bloomberg.com/news/articles/2017-12-20/apple-is-said-to-have-plan-to-combine-iphone-ipad-and-mac-apps
UPDATE:
Apparently a number of researchers have had varying degrees of success booting iOS in QEMU. Here is an article providing a guide on getting iOS 12 to the point of launchd and recoveryd running:
https://worthdoingbadly.com/xnuqemu2/
In it's current state it will not allow you to run apps but very interesting none the less and worth keeping an eye as Corellium still appears to be invite only.
UPDATE 2:
Apple is attempting to slowly destroy Corellium. The user daeken on Twitter has been developing an emulator for iOS simulator on macOS that they have stated they are close to releasing (May 2020) though, but will be a commercial product. They appear to have put in a huge amount of work and have demonstrated a number of apps working on it.
On your Mac terminal, type the following:
open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/
It will open an iOS simulator that allows you to select which specific iOS device you want to emulate. This works in the latest versions of Mac (I'm using High Sierra).
Ok so I fixed my problem. Here is how I did it:
If you are trying to start a new simulator and there are no options for OS Version, then it means that there are no simulator runtimes installed. Here are the steps I took:
Open Xcode.
On the menu bar, click on "Window"
Click "Devices and Simulators"
In the Devices and Simulators Window click on the "Simulators" tab. At this point, you won't see anything in the tab.
At the bottom left corner press the
+icon. This will open a window to create a new simulatorin the window, click the dropdown menu next to "OS Version". Then, select the option "Download more simulator runtimes...".
From here, you can download which platforms you want to simulate (Which in my case is IOS).
Hope this helps anyone who are experiencing the same issues I had!
Close xcode and all running simulators
Run command in terminal-
rm -r ~/Library/Developer/CoreSimulator/Caches
Open simulator again