Live data from Hacker News

Hello-World iOS App in Assembly

gist.github.com

11–20 of 62 posts

Re: Hello-World iOS App in Assembly

#11
post #7
post #5

I’m guessing even this still requires that I use XCode.

It probably doesn't, as you practically never need Xcode for simple apps. From my experience, currently, you need Xcode to compile storyboards (NIB/XIB files) and bundle Assets.car (macOS BOM files); and compile Xcode projects, btw. I may be missing another important feature used in a lot of apps but otherwise for the most part you can build an iOS app without Xcode (or even macOS).

The command line tools are still XCode, in a way.

Re: Hello-World iOS App in Assembly

#12

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.

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.

Of course it is. You just have to reimplement UIKit in ASM, no big deal…

Re: Hello-World iOS App in Assembly

#14

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.

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.

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

#15

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.

This is an excellent argument for not using assembly, actually

Re: Hello-World iOS App in Assembly

#17
post #5

I’m guessing even this still requires that I use XCode.

Is that true? What about the command-line version?

The Command Line Tools doesn't include the iOS SDK; or a simulator; or any of the other tools required to get it deployed to actual device.

Re: Hello-World iOS App in Assembly

#18
post #2

Super cool! Would love to see the build/deploy steps needed.

xcrun -sdk iphoneos clang yellow.asm, pack it into an IPA and sign it

Hmm doesn't work. Here's the error log (I'm on Mac M2):

https://gist.github.com/anta40/60f62c803a091ad0415d60f8cac55...

Re: Hello-World iOS App in Assembly

#19

Earlier quoted context omitted.

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.

Of course it is. You just have to reimplement UIKit in ASM, no big deal…

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

#20

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.

This is an excellent argument for not using assembly, actually

The argument is that learning assembly is useful, it gives some insights into what happens under the hood. That seems like a no brainer to me.

Would I use it for production iOS app, no, I don't hate myself that much.

Post reply on HN