Build an iOS app faster than ever with xtool
Did you know that Xcode is not necessary anymore?
Yes, you’ve read that right, you don’t need Xcode anymore to build and run an iOS app on your device! A new open-source & cross-platform buildchain named xtool is now available.
It can build, sign, and run the most minimal Swift Package into an iOS app! On a device, if you’re on Linux or Windows, and even on the iOS simulator if you’re on macOS!
But most importantly, it can build and install an app in a sub-second, coming from the xcodebuild CLI, which is incredibly slow. It’s amazing!
Once installed, you can create a new project using
xtool new MediumApp
Creating package: MediumApp
Creating Package.swift
Creating xtool.yml
Creating .gitignore
Creating .sourcekit-lsp/config.json
Creating Sources/MediumApp/MediumAppApp.swift
Creating Sources/MediumApp/ContentView.swift
Finished generating project MediumApp. Next steps:
- Enter the directory with `cd MediumApp`
- Build and run with `xtool dev`
Then use :
xtool dev --simulator
To build it and install it (remove the — simulator
if you want to sign it), run it on your USB-connected device instead.
Can you believe it? I now have my new app on my simulator installed in less than a second!
The second most amazing thing is that it’s not creating an Xcode project; it’s just a small Swift Package.
You can edit the code, and just run it again, no Xcode, no Xcodebuild, no bullshit.
From there, be aware that xtool has many limitations for now; it doesn’t support most app entitlements or app extensions, and most dependencies that are not just Swift source code (with binary, for example) will not work for now.
But the repository and the project are evolving quickly, and many new features have already been merged, like supporting the iOS simulator I’ve asked for!
I’ll probably be my new default when I want to test a simple app idea or bootstrap an idea!