10 ms·
This would be interesting to see, I'm guessing the implications are being able to build iOS projects without requiring a Mac at any stage of the development pro
by giancarlostoro 5y ago
This would be interesting to see, I'm guessing the implications are being able to build iOS projects without requiring a Mac at any stage of the development process.
- sneak 5y agoYou'd need to emulate macOS hardware, not iOS, to do that. In that sense, what you describe is already possible (running Xcode in a macOS VM on commodity hardware).
- nobleach 5y agoI did this exact think back in 2012 with a PhoneGap/Apache Cordova app. It had to use Xcode to run the app in the iOS Emulator. So I spun up a virtual machine on my Linux box. It worked extraordinarily well! In the case of the poster you are replying to. Yes, Swift is open source and there are compilers for other platforms. The problem comes in with Apple's SDK and their proprietary libraries. Those are what are required to build an app that'll run on an iOS device. Those only run on macOS/OSX.
- Aspos 5y agoThese days, unfortunately, it is not possible. Well, you can virtualize MacOs, but you can not connect iOS device to it, nor you can run a virtual iOS device inside it. Apple went out of its way to deliberately disable physical phones connecting to a virtual MacOS. Any other USB device can be connected, but not an iphone.
- MichaEiler 5y agoVmWare Player with USB configured to version 2.0 did the trick for me. I tested it with an iPAD Pro and iOS 14. The VM was running the newest macOS release from a few months ago.
- plorkyeran 5y agoWe have iPhones connecting to macOS VMs for our CI system and have never had any issues with it?
- xuki 5y agoSame, I have multiple iPhones connected to a VM running on ESXi on non-Apple hardware.
- Aspos 5y agoWell, may be I am unlucky one, but I just tried and freshly installed MacOS in VirtualBox VM can see any other USB device except iPhone XR. This setup used to work find a few years ago but stopped a at least on 2018. Will try VMWare.
- 411111111111111 5y agoa motivated individual can still accomplish it, there are multiple ways documented on the web if you google a little. its however not permissable, as you cannot buy apple software without agreeing to their licence, which disallows running it on anything but apple hardware. for private fun projects: possible for professional things: a very bad idea
- sneak 5y agoIt's fine for professional things, too. Just follow the 11th commandment and you'll be fine.
- ronsor 5y ago11th commandment? "Everything's ok as long as you don't get caught"?
- sneak 5y agoThere's no difference in the binaries built by Xcode running directly on Apple-branded hardware and Xcode running in a macOS VM in a generic (or perhaps metal, if nested virtualization isn't available) ec2 instance.
- ginja 5y agoI use this: https://github.com/kholia/OSX-KVM https://github.com/kholia/OSX-KVM It works quite well for me. Simulator works fine (though graphics are slow) and so does connecting a physical phone (by passing through the USB controller).
- Teknoman117 5y agoI passed a GPU into mine to get around the slow graphics.
- handrous 5y agoI'd like to chime in here that it's very fucking frustrating that the best & most convenient free tools for virtualizing macOS aren't available on macOS, considering macOS has shipped with a damn hypervisor for years. Setting up a vanilla installation of arbitrary, older version of macOS for testing, or for maintaining build environments for long-support-life Mac software, should be one command, shipped with the dev tools. But no, instead it's "pay for a 3rd party solution" or "break the EULA and run it on Linux". (yes, I'm aware of a bunch of fragile solutions involving VirtualBox, but they tend to be slowish, that's also supposed to be paid if you're using the extensions for commercial operation IIRC, and several versions of macOS/OSX remain a huge pain in the ass to set up on it regardless)
- bitexploder 5y agoTechnically those were simulators for iOS, not emulators. Lots of things behaved a little different on the phone itself.
- tapirl 5y agoAdobe AIR has done this for at least 10 years.
- pojntfx 5y agoYou can actually do this now, without emulation: https://github.com/tpoechtrager/cctools-port https://github.com/tpoechtrager/cctools-port Zig are also working on it: https://zig.news/monthly/zig-monthly-august-2021-ios-support-tutorials-tree-sitter-a-pathtracer-and-more-4im8 https://zig.news/monthly/zig-monthly-august-2021-ios-support... The pioneer of software dictatorship will probably make this impossible or illegal as soon as it gains any traction though. And people will probably congratulate them for it in the name of "security".
- colejohnson66 5y agoAs a “closed iOS” advocate, I personally believe the ability to do development outside of a macOS is a great idea. I’ve long wanted to make iOS apps, but I don’t have the money to shell out for a Mac. Yes, Hackintoshes are a thing, but you need certain hardware to do so, and even then, it’s still difficult (last I checked).
- zaptrem 5y agoFor casual app development I just run MacOS in a free VMWare instance on my Windows machine. It has no graphics acceleration but otherwise works flawlessly.
- dorfsmay 5y agoHow do you load MacOS in VMWare? Where/how do you get the install media?
- barkingcat 5y agoThis has been possible for a long time. For the install media, Apple hosts them and will give you the dmg file for free. The only concern is the terms of the EULA so that's why the earlier poster says "for casual development" There are a lot of guides online, including "one command" shell/powershell scripts that will automatically pull down the right files for you, and use the vmware/virtualbox api to create the vm automatically, and patch the bootloader to get Catalina or Big Sur loading, etc - if past experience is any indication, people probably already have Monterey beta loading fine already. again, it's not a matter of "how" it's whether you (or Apple lawyers) care about the EULA.