How to debug with beta iOS SDK on a stable Xcode
June is passed and, as usual, the WWDC conference gave to us a new set of iOS beta versions to try.
While the first days of September are usually committed to test our apps on a pretty-usable iOS beta, these months are an irresistible opportunity to have fun (and swear) by playing with early iOS versions on our device.
If we can tolerate a certain amount of bugs and strage behaviours we should also to run our projects on these devices using the stable version of Xcode and not the beta one.
However “old” Xcode version are not able to run projects inside devices with iOS betas.
The trick is to dig inside the .../Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport of our Xcode-beta and copy/link desired SDK folders inside the old stable Xcode DeviceSupport’s folder. While it’s really easy it also a bit annoying procedure, so I’ve just created a really simple script in Swift.
xcbetarunner is a tool you can install in your terminal and allows you to sync SDKs between stable and beta versions of Xcode. It’s really simple to use.
sudo xcbetarunner -a sync
and you’re done!
All stable SDKs are now available on stable Xcode version and you can run your project using your Xcode.app inside your iOS beta.
There are several other interesting commands; just checkout the github repository here.
#xcbetarunner is a small #cli utility written in #swift which allows you to run & debug projects using stable #xcode version on #iOS beta devices. Just a painless shortcut to save time. Take a look at #github page #swiftlang https://t.co/iUMqkEasy4 pic.twitter.com/RDlSoOsapy
— daniele margutti (@danielemargutti) July 13, 2018