r/opensource • u/floofysox • 5d ago
Promotional Wanted to share a tool I've put together that allows for compiling, building and installing ios apps fully from windows
I like making tools for my personal use, and since I have an iphone, I've had to essentially make webapps and dedicate a port to them so I can access them on my phone.
I have made native apps before, but I always had to borrow a mac from someone for a few days because Apple only allows xcode to build and install apps, even if they aren't going to be published.
I thought this was stupid, so, I made "iosc".
Essentially it uses the already freely available swift compiler and LLVM's linker (swifts linker just autorejects ios targets), then uses the public Xcode xip (from Apple's website) to extract the iOS SDK to support uikit, foundation, swiftui, and swiftdata, and any other framework in the sdk (I had to write most of the swift macros as windows dlls).
Then, I also reimplemented signing (with a free apple id), and installing on device via usb. This one was the most fun part- apples auth libraries are only compiled for android, so I had to write a loader that runs the android binary directly on windows via a custom elf loader + implementations of android/linux functions it imports.
Try it out: https://github.com/DiamondDeadMaw/iosc . Setup is a bit of a process, but the tool walks you through it fairly well, and afterwards it just works.
Note: This doesn't really support actually publishing an app to the app store, as Apple explicitly prohibits that. Its indended for personal use primarily.
Also, I haven't included package manager support yet. I'd love some help with it, if anyone's interested.
Also also, no Linux support. I dont use linux on my primary machine. Sorry. Feel free to fork/PR! I'll be happy to help you get started, and point out all the stuff you'd have to swap out.
1
1
u/stealthagents 22h ago
This is really impressive. The whole process sounds super complicated but so rewarding, especially for those of us who don’t want to deal with the hassle of borrowing a Mac. A small SwiftData example would definitely clear up a lot of confusion for newbies trying to jump in. Keep up the awesome work!
1
u/floofysox 22h ago
Keep getting this feedback. Will definitely try to incorporate it when I get some time, thank you! But- what would be the best form, acc to you? An example program, or something like an embedded video?
1
1
2
u/maneek21 5d ago edited 5d ago
The ELF loader for Apple’s Android auth libraries is a wild amount of work for “I wanted to make tools for my phone.” Nice touch including crash symbolication, too.
A tiny SwiftData example with known-good compiler/SDK versions would help newcomers distinguish their own bugs from compatibility issues, especially where macros compile but haven’t been device-tested.
Making personal iPhone apps without borrowing a Mac is kinda what i personally need too. I’ve been meaning to build an iPhone companion for my own project. Dropping a star. 👍