My talk/rant about Xcode Extensions, updated and given at #pragma Conference in Verona, Italy, October 2016.
Every iOS developer wants to tweak Xcode to get it to do exactly what they want it to do. For the last couple of years, a whole ecosystem of plugins grew around a package manager called Alcatraz. But In Xcode 8, Apple dropped the hammer on the undocumented plugin architecture. In its place, they've introduced Xcode Extensions: An official, documented way to start to make Xcode do what you want. Ellen will discuss the history and future of what can be done with these extensions, and walk through an example of creating one.
ESCAPE FROM ALCATRAZ
THE BRAVE NEW WORLD OF XCODE EXTENSIONS
BY ELLEN SHAPIRO
#PRAGMA CONF | VERONA, ITALIA | OCTOBER 2016
DESIGNATEDNERD.COM | SPOTHERO.COM | JUSTHUM.COM | @DESIGNATEDNERD
XCODE IS MY FRENEMY
XCODE GHOST !
EXTENSION GOOD NEWS
MAKING AN EXTENSION
1. MAKE A HOST MAC APP
2. ADD AN EXTENSION
3. PREPARE FOR LAUNCH
THEN TURN IT OFF AND ON AGAIN
(ONLY ON 10.11 EL CAPITAN, NOT NEEDED ON 10.12 SIERRA)
TEMPTING THE DEMO GODS
DISTRIBUTION: LIKE ANY OTHER MAC APP
(ON A SCALE OF ! TO ")
!: EXTENSIONS ARE
SANDBOXED AND CODE-SIGNED
!: NO DEFAULT KEY BINDINGS
(USERS HAVE TO SET THEM UP INDIVIDUALLY)
☹: MUST BE INVOKED BY THE USER
!: NO USER INTERFACE
!: NO ACCESS
TO FILE OR PROJECT STRUCTURE
!: CAN'T EMIT WARNINGS
DUMB THINGS I DID
WHICH YOU SHOULD NOT DO
FORGOT TO UNINSTALL
OLD PLUGIN TOOLS
ENABLE CODE SIGNING
AVOID THIS ENTIRELY
OBLIGATORY SUMMARY SLIDE!
▸ Alcatraz is dead in Xcode 8. RIP.
▸ Xcode extensions are officially supported, and that's good.
▸ Xcode extensions must have a host macOS app, but that app doesn't
actually have to do anything.
▸ Xcode extensions are pretty limited. File radars.
▸ WWDC 2016 Session 414: Using and extending the Xcode Source
▸ Daniel Jalkut at try! Swift NYC: https://realm.io/news/jalkut-
▸ Sam Davies for RayWenderlich.com [paid]: https://
QUICK OVERVIEWS FOR PEOPLE WHO PREFER TO READ!
▸ Roundup of extensions as of mid-August 2016: https://
▸ MMWormhole: https://github.com/mutualmobile/MMWormhole
! SLIGHTLY TERRIFYING LINKS! !
▸ Xcode Ghost details: https://en.wikipedia.org/wiki/XcodeGhost
▸ Strawhorse leaked document: https://theintercept.com/document/
▸ Strawhorse Context: https://theintercept.com/2015/03/10/ispy-
RADARS TO DUPE!
If you'd like any of this functionality, please dupe these radars:
▸ Allow callbacks anytime a file with a given extension is edited:
▸ No Default key bindings: http://www.openradar.me/28170032
▸ Can't emit warnings: http://www.openradar.me/28170362