Embedded Swift running on iOS 6, built with Xcode 27 and Swift 6.4. Compiled for bare metal Armv7.
Just curious how this project is able to call Objective-C. That is something I am very curious about.
Embedded Swift can make C calls, and [foo bar] is three C calls in a trenchcoat. You wouldn't get Objective-C interop by default, but it's pretty straightforward to call objc_msgSend() manually.
Oh, I have an iPad 1st gen hanging around. I am intrigued ![]()
Ah darn - that's iOS 5 ![]()
I'm not aware of any reason that you couldn't get Embedded Swift working on iOS 5!
Ha! you forgot about "incompetence"! ![]()
Isn't that what Claude's for? ![]()
Yeah, that's a good technique that I used in a bridge a while back, but I saw actual .m files with ObjC classes defined. https://github.com/colemancda/Swift-iOS6/blob/main/SwiftUI/Sources/CSwiftUIBackend/Backend.m.
With subclassing
@interface SUIActionTarget : NSObject
@property (nonatomic) SUICallback action;
@property (nonatomic) void *context;
@end
And I wan't sure if this was actually a part of the build, or if this could only work up to the point of needing to pass the ObjC class into Swift.
You could probably make interop fairly ergonomic with dynamicallyCallable wrapping the objc runtime api
I have another version for iOS 9, tested in iPhone 4s. Main difference is the use of UIStackView and view resizing, vs iOS 6 SwiftUI is just explicit frames for UIViews. Also CoreBluetooth is actually usable.
That’s a good idea for v2. For this POC I just wanted something quick and dirty.

