Live data from Hacker News

Hello-World iOS App in Assembly

gist.github.com

31–40 of 62 posts

Re: Hello-World iOS App in Assembly

#31
post #19

Earlier quoted context omitted.

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.

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.

The point is what is possible within the constrains of public APIs.

Re: Hello-World iOS App in Assembly

#32
post #31

Earlier quoted context omitted.

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.

The point is what is possible within the constrains of public APIs.

Everything I described is in a public header right inside your iOS SDK folder

Re: Hello-World iOS App in Assembly

#33

This kind of thing is how you actually learn what's under the hood. Everyone's building with React Native and Flutter, which is fine until something breaks. Then you're stuck Googling black magic. Starting from assembly teaches you the real cost of abstraction.

Assembly is fine until it breaks too

Re: Hello-World iOS App in Assembly

#34

This kind of thing is how you actually learn what's under the hood. Everyone's building with React Native and Flutter, which is fine until something breaks. Then you're stuck Googling black magic. Starting from assembly teaches you the real cost of abstraction.

You still have whole Objective-C runtime and CoreAnimation, UIKit abstraction under the hood.

Re: Hello-World iOS App in Assembly

#35

This kind of thing is how you actually learn what's under the hood. Everyone's building with React Native and Flutter, which is fine until something breaks. Then you're stuck Googling black magic. Starting from assembly teaches you the real cost of abstraction.

Assembly is fine until it breaks too

[dead]

Re: Hello-World iOS App in Assembly

#36

This kind of thing is how you actually learn what's under the hood. Everyone's building with React Native and Flutter, which is fine until something breaks. Then you're stuck Googling black magic. Starting from assembly teaches you the real cost of abstraction.

You have a very long way between assembly and RN/Flutter. I do agree that it helps to know these things, but you need to learn a lot more before it becomes more generally applicable.

Re: Hello-World iOS App in Assembly

#37
post #23

Earlier quoted context omitted.

snibbetracker is an example of a C/SDL iOS app. https://apps.apple.com/de/app/snibbetracker/id1065797528

<1MB is also relatively easy to reach with swiftui apps. I had two fully working ones in the app store below 1MB. They are removed now since I didnt pay the yearly 100€

Do you need to pay the license to keep your apps in store? Or did they deprecate some APIs and therefore removed your apps?

Honestly wild if you need to upkeep the license just to have it in store once it is published.

Re: Hello-World iOS App in Assembly

#38
post #31

Earlier quoted context omitted.

The point is what is possible within the constrains of public APIs.

Everything I described is in a public header right inside your iOS SDK folder

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

#39

Very cool, if impractical (it’s likely that you’d never get an ASM app through the App Store Approval process). ARM Assembly is a much more Byzantine creature, than the old 8- and 16-bit versions I used, way back in the Pleistocene. I’m always a fan of starting from the “bare metal,” to learn, but these days, it’s a long trip. When I was just a wee sprog, it was only a couple of steps away.

How would that impact the App Store approval? AFAIK they review binaries anyway…

Re: Hello-World iOS App in Assembly

#40
Feels like a disassembly of a boilerplate app, as opposed to handcrafted, minimal assembly code.

For instance I’m pretty sure the autorelease pool is unnecessary as long as you don’t use the autorelease mechanism of Objective-C, which you’re most likely not going to do if you’re writing assembly in the first place.

Post reply on HN