News for hackers. Stuff that matters.
Re:iOS on QEMU by nobleach on Thursday September 16, 2021 @10:27AM (#28552254)
I 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.

Re:iOS on QEMU by bitexploder on Thursday September 16, 2021 @11:12AM (#28552817)
Technically those were simulators for iOS, not emulators. Lots of things behaved a little different on the phone itself.
Re:iOS on QEMU by Aspos on Thursday September 16, 2021 @10:39AM (#28552401)
These 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.

Re:iOS on QEMU by MichaEiler on Thursday September 16, 2021 @10:50AM (#28552553)
VmWare 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.
Re:iOS on QEMU by ginja on Thursday September 16, 2021 @11:03AM (#28552703)
I use this: 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).

Re:iOS on QEMU by handrous on Thursday September 16, 2021 @01:34PM (#28554640)
I'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)

Re:iOS on QEMU by Teknoman117 on Thursday September 16, 2021 @12:53PM (#28554175)
I passed a GPU into mine to get around the slow graphics.
Re:iOS on QEMU by 411111111111111 on Thursday September 16, 2021 @10:54AM (#28552610)
a 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

Re:iOS on QEMU by sneak on Thursday September 16, 2021 @12:33PM (#28553891)
It's fine for professional things, too. Just follow the 11th commandment and you'll be fine.
Re:iOS on QEMU by ronsor on Thursday September 16, 2021 @03:13PM (#28555965)
11th commandment? "Everything's ok as long as you don't get caught"?
Re:iOS on QEMU by sneak on Thursday September 16, 2021 @03:38PM (#28556349)
There'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.
Re:iOS on QEMU by plorkyeran on Thursday September 16, 2021 @10:51AM (#28552573)
We have iPhones connecting to macOS VMs for our CI system and have never had any issues with it?
Re:iOS on QEMU by Aspos on Thursday September 16, 2021 @04:12PM (#28556869)
Well, 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.
Re:iOS on QEMU by xuki on Thursday September 16, 2021 @11:03AM (#28552705)
Same, I have multiple iPhones connected to a VM running on ESXi on non-Apple hardware.