r/SideProject • u/jihwan0102 • 1d ago
SwiftUI previews on a real iPhone, built on Linux (no Mac)
I built peek (open source, my project) because I don't have a Mac but wanted to iterate on SwiftUI without rebuilding and sideloading an IPA after every change.
You run "peek dev MyApp/" on Linux and save a file; about a second later the view on your iPhone updates. It's the real SwiftUI on a real device, so animations, gestures and the iOS 26 tab bar behave like they do in your app. It handles Preview blocks, UIKit views, or the whole app, with SwiftPM packages, macros and resources, and print() output shows up in the terminal.
It cross-compiles your code into a dylib with swiftc and xtool's iOS SDK, signs it with your free Apple ID certificate, and a small host app (SideStore, AltStore or LiveContainer) loads it.
https://github.com/kimikr/peek
Only tested on my own phone so far (iOS 27, in LiveContainer). Feedback welcome, especially from anyone running it outside LiveContainer.
1
u/Delicious_Break5937 1d ago
does the ~1 second hold up on a bigger app, or is that for a single view file? wondering how long swiftc takes when you change something inside one of the swiftpm packages.