• gorkish 2 minutes ago

    This is great; for your next trick, can you please figure out how to install MacOS on an iPad so that we can all finally get the dang computer we want Apple to build?

    • ChrisMarshallNY 2 hours ago

      Very cool!

      I have a feeling that the reason that Apple hasn't made their Simulator into an Emulator, is because they don't want folks digging into the substrate of iOS.

      • ChocolateGod 15 minutes ago

        Another reason it was a Simulator and not an Emulator to begin with could be because a lot of iOS (or iPhone OS) components at the time were forks of existing Mac OS X libraries.

        • astrange an hour ago

          Developers still use Intel Macs, and you can't virtualize ARM iOS on that.

          • ChrisMarshallNY an hour ago

            Yeah, I was thinking about the ARM Macs. They are common enough, now, to make it worthwhile.

        • cedws 2 hours ago

          According to the author's GitHub profile they are a fresh CS grad - seriously impressive work.

          • valval 38 minutes ago

            I bet this one never used ChatGPT to cheat at homework then!

          • MYEUHD an hour ago

            Apple already provides an iOS simulator in XCode. So, what's the benefit of this project over the apple-provided one?

            • ykl an hour ago

              The simulator is not actually running real iOS or the iOS build of your app. Instead, when you run an app in the simulator, your app is being compiled to the current Mac’s native instruction set and links/runs against a set of Mac frameworks and libraries that _simulate_ and in some cases only stub in the expected iOS behavior. So as an example, you can’t just take an iOS binary off of the App Store and run it in the iOS Simulator (especially not on an Intel Mac). You also can’t use the simulator to probe and learn anything about how real iOS works internally, because the simulator isn’t really running full iOS. If you drill down in the simulator’s frameworks far enough you eventually just find yourself back in macOS.

              Contrast with an emulator, where you are just running the full iOS build identical to the build on a real device. You would in theory be able to run any iOS binary unmodified and probe how the real os works.

              It’s sort of like the difference between running an app through Wine versus running an app in a Windows VM, except in the case of the simulator it’d be like if you had to custom recompile/link a Windows app first against the Wine environment before being able to run it. If you wanted to study how Windows works internally, there's not much you can learn about that from running Wine, but there is quite a lot you could learn from probing a VM running Windows.

            • heavyset_go 2 hours ago

              Slightly tangential, but has anyone virtualized ARM macOS on x86-64?

              • grishka 27 minutes ago

                You can't. The term "virtualize" is generally used to mean running an OS via hardware virtualization, where your host CPU natively runs its code but forwards all I/O to a hypervisor. You can only do that with an OS built for the same CPU architecture as your host system.

                For everything else, like running ARM software on x86 (and vice versa), you'll have to resort to emulation, which involves either interpreting the code or dynamically recompiling it. By definition, you can emulate anything on anything else (someone recently booted Linux for MIPS on an Intel 4004, the first ever microprocessor), but the performance might be a problem.

                • aliher1911 an hour ago

                  You can try to virtualize generic ARM in qemu and see that it won't reach Raspberry Pi performance. Recent versions should have it available out of the box afaik. Virtualizing Mn cpus would be even less useful.

                  • 3abiton 2 hours ago

                    You should look into the hackintosh project.

                    • aspenmayer an hour ago
                      • fl0id an hour ago

                        But that’s not arm on x86 is it? My understanding was that it ‘just’ enables things to work on unsupported intel macs, by enabling stuff that still works on newer Intel Macs.

                        • aspenmayer an hour ago

                          It’s complicated, but you have the right intuition about it. OCLP re-inserts drivers removed by Apple and patches the OS to enable functionality that doesn’t rely on hardware verification or ARM hardware. According to the devs, that’s about all they are currently able to do with current approaches.

                          UTM might do what you want but likely not on x86.

                          https://mac.getutm.app/

                          > Virtualize macOS as well.

                          > Run multiple instances of macOS on your Apple Silicon Mac with UTM. This can be useful for developers as well as security conscious users.

                          > Note that macOS VM support is limited to ARM based Macs running macOS Monterey or higher.