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.
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.
Slightly OT but the first iPhone ran OS X at launch.
I think as time went by and the "OS X" running on phones diverged more and more, they renamed to iPhone OS and then iOS some time later? Something like that anyway.
https://web.archive.org/web/20070112064939/http://www.apple....
You could argue that the iPhone currently still runs macOS if you used the same definition today. They share kernels (iirc Apple always kept the ARM patches to Darwin closed-source), BSD-based userlands and the iPhone used versions of the macs application libraries.
A big difference is the iOS and macOS use different compositors.
EDIT: You can run a iOS apps on macOS without recompilation, but it uses Mac Catalyst which is a user-space shim for iOS apps to work on macOS. Even then, not everything works.
> Your apps use the same frameworks and infrastructure that Mac Catalyst apps use to run, but without the need to recompile for the Mac platform.
> Although you can run your iOS apps unmodified on a Mac with Apple silicon, Mac Catalyst lets you build your app specifically for macOS and customize your app’s behavior on that platform.
Mac Catalyst was a multi-year effort by Apple. Doing the same to run macOS apps on iOS would probably be even harder due to how complicated macOS is compared to iOS.
[0] https://developer.apple.com/documentation/apple-silicon/runn...
iOS applications are sandboxed by the kernel, with no opt out. macOS applications are not sandboxed by default and are opt in.
Then there are the API and UI differences.
EDIT: That linked blog post in the parent blog post also shows how different the userspace is: https://worthdoingbadly.com/macappsios/
EDIT: iPadOS 16 enables virtual memory swap [1]
[0] https://developer.apple.com/library/archive/documentation/Pe...
[1] https://www.apple.com/newsroom/2022/06/ipados-16-takes-the-v...
Not sure what you meant by that, you always could `mmap` files into memory on iOS. Back in the 32 bits days there was a ~700 MB limit due to the address space, but there aren't anymore nowadays with 64 bits. If `didReceiveMemoryWarning` is called on your app, then you need to free resident memory but the kernel will take care of dumping file-backed memory pages for you.
Not true, unless something changed recently (definitely more recently than the 32->64 transition). All iPhones have a virtual memory limit (although the limit is higher on phones with more physical RAM).
I know this for sure because several years ago I was the main person in charge of reducing OOM kills on the Facebook iPhone app and virtual memory exhaustion on 64-bit phones was definitely an issue.
See here for where this is enforced in XNU: https://github.com/apple-oss-distributions/xnu/blob/xnu-1121...
I assume Apple does this specifically because they want to prevent apps from simulating swap space by mapping a big file and allocating from it.
As evident by the limited Virtual Memory Swap enabled on iPadOS 16, but not iOS.
All Apple devices use the XNU kernel. But, as the parent blog post shows, the kernel configuration, device tree, and drivers are different.
Probably a lot of iOS AAA apps are still in ObjC.
It is unwise to pull the rug from established developers.
And no, C++ isn't as prevalent on Apple platforms as on other vendors.
Hence why you will find out most of the C++ related documentation is for IO and Driver Kit, the Metal Shading Language dialect (based on C++14), LLVM, and that is about it.
Even Metal is actually implemented in Objective-C, with Swift and C++ bindings, and the C++ bindings are really low effort versus the Swift tooling.