News for hackers. Stuff that matters.
Re:Hello-World iOS App in Assembly by internetter on Thursday October 30, 2025 @02:45AM (#45757063)
Is this really low level though? Because its hooking UIKit which is very high level relative to ASM. I'd be really curious to see an app draw on iOS without UIKit. I don't know if thats possible.
Re:Hello-World iOS App in Assembly by shreddit on Thursday October 30, 2025 @04:01AM (#45757464)
Of course it is. You just have to reimplement UIKit in ASM, no big deal…
Re:Hello-World iOS App in Assembly by pjmlp on Thursday October 30, 2025 @05:03AM (#45757829)
And even that won't do it, because within the constraints of iOS, eventually that framebuffer with software rendering has to be displayed on the screen via an OS API, which is UI Kit.
Re:Hello-World iOS App in Assembly by fingerlocks on Thursday October 30, 2025 @06:41AM (#45758436)
It should be possible.

If you enable the JIT entitlement for personal development, then bundle a mach-o into an entitled app. Or compile it directly on the app and mprotect-x to execute it. Is there something else you can’t do that I’m not considering? I might give this a try.

Re:Hello-World iOS App in Assembly by pjmlp on Thursday October 30, 2025 @07:03AM (#45758615)
The point is what is possible within the constrains of public APIs.
Re:Hello-World iOS App in Assembly by fingerlocks on Thursday October 30, 2025 @07:14AM (#45758714)
Everything I described is in a public header right inside your iOS SDK folder
Re:Hello-World iOS App in Assembly by pjmlp on Thursday October 30, 2025 @08:16AM (#45759186)
I doubt you can render an UI in pure Assembly and show it on the screen without going through UI Kit in a non-rooted device, given that even the device drivers extension points is quite limited.

Which was the whole discussion point that started the thread, how to make a iOS app with zero references to UI Kit.

This isn't an 8 and 16 bit home computers, or games console, with an address for the framebuffer.

Re:Hello-World iOS App in Assembly by Someone on Thursday October 30, 2025 @08:58AM (#45759556)
Is syscall a public API on iOS? In the end, you have to call that to get anything on the screen?

Looking at unistd.h, it seems marked as

  __OS_AVAILABILITY_MSG(ios,deprecated=10.0,"syscall(2) is unsupported; "
    "please switch to a supported interface. For SYS_kdebug_trace use kdebug_signpost().")
and syscall numbers seem wrapped by

  #ifdef __APPLE_API_PRIVATE
in *<sys/syscall.h>
Re:Hello-World iOS App in Assembly by pjmlp on Thursday October 30, 2025 @10:13AM (#45760251)
Not at all, it is a Linux thing to keep applications doing syscalls, like back in MS-DOS interrupt days.

All other modern OSes give zero guarantees about syscalls.

Indeed, you have to call UI Kit, that is the public API for userspace applications.

Even if via OpenGL ES or Metal, you need a drawing context and a Window to render it.

Re:Hello-World iOS App in Assembly by pjmlp on Thursday October 30, 2025 @03:15AM (#45757231)
As low level as it gets.

For lower level one needs something like ESP32, Arduino, retro-coding platforms.

Re:Hello-World iOS App in Assembly by saagarjha on Thursday October 30, 2025 @04:27AM (#45757623)
No, you’ll have to check in with backboard etc before it will let you do anything useful
Re:Hello-World iOS App in Assembly by fingerlocks on Thursday October 30, 2025 @06:24AM (#45758326)
You can write directly to the frame buffer, like a video game. You still need the UIKit import to publish, because it has to be bundled into a .ipa which requires an AppDelegate, a UIBundle, among other things.

If you want to “technically” avoid UIKit, you can drop one step lower. UIKit is implemented on CoreAnimation. A bare UIView is nearly a pass through wrapper around CALayer. It wouldn’t be hard to build your own custom UI on CALayers. The old CA tutorials for implementing a ScrollView from the ground up are still floating around out there.