Repository navigation
peek: live SwiftUI previews on device, built with xtool #445
kimikr
started this conversation in
Show and tell
Replies: 1 comment
|
neat! I've actually been working on my own version of hot reloading for a while, too. It currently only supports the Simulator (so requires macOS) but it has some benefits like not resetting app state on reload. I just released xtool 2.0.0-beta.1 with initial support if you want to check it out: #449 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Thanks for xtool. It made iOS development possible for me without a Mac.
I built peek on top of it:
peek dev MyApp/watches your sources, compiles them into a dylib with xtool's toolchain and Darwin SDK, signs it, and a host app on the iPhone loads it, so you see SwiftUI changes on the device about a second after saving.For packages it uses
swift build --build-system swiftbuild --triple arm64-apple-ioswith the SDK's toolset, the same wayxtool devdoes, then links the dependencies once and reuses them across reloads.A couple of things I ran into that might be useful to others:
-ld-path=<bundle>/toolset/bin/ld64.lldplus-Xclang-linker -mlinker-version=1100, andlibclang_rt.ios.aforif #available.-platform_version ios <min> <sdk>, and then iOS 26+ runs the app with the old design (legacy tab bar, no bottom accessory).https://github.com/kimikr/peek
All reactions