Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Extending Xcode 8 - try! Swift NYC 2016

Avatar for Daniel Jalkut Daniel Jalkut
September 01, 2016

Extending Xcode 8 - try! Swift NYC 2016

Daniel Jalkut's talk about the new extension support in Xcode 8.

Avatar for Daniel Jalkut

Daniel Jalkut

September 01, 2016
Tweet

Other Decks in Programming

Transcript

  1. Source Editor Extensions ⊕ Debuting with Xcode 8 ⊕ Extend

    Xcode’s source text editor only ⊕ Only Apple-supported mechanism
  2. Bad News ⊕ Alcatraz is dead ⊕ Scope of extension

    impact is limited ⊕ Delivery is by host-application only
  3. Good News ⊕ Apple approved ⊕ Designed for security and

    stability ⊕ Signal of things to come?
  4. World of Possibilities… ⊕ Transform text and selection ⊕ Access

    web resources ⊕ Display rudimentary UI ⊕ Anything the host app can do…
  5. … and Impossibilities ⊕ Anything outside the text editor ◦

    Project manipulation ◦ Leveraging Xcode’s compiler state ⊕ Dynamic responses to user actions ◦ Only menu and keyboard shortcut
  6. Build & Run ⊕ Built upon App Extensions ⊕ Delivered

    by host application ⊕ Debuggable within Xcode itself
  7. New Project ⊕ Create a new Mac application ⊕ Add

    a new extension target ⊕ Build & Run ⊕ Select Xcode as the target
  8. Caveats ⊕ Additional setup for 10.11 ⊕ You must sign

    your app and extension! ⊕ Run app to nudge extension registration ⊕ Wait a few moments after launching
  9. Hot Tips ⊕ Select Xcode as the debug target ⊕

    Pass a source file path to Xcode
  10. Hot Tips ⊕ Select Xcode as the debug target ⊕

    Pass a source file path to Xcode ⊕ Give your command a keyboard shortcut
  11. Hot Tips ⊕ Select Xcode as the debug target ⊕

    Pass a source file path to Xcode ⊕ Give your command a keyboard shortcut ⊕ Keep an eye on Apple’s own extensions
  12. Try! Harder ⊕ Manipulate text efficiently ⊕ Open a web

    page ⊕ Display rudimentary UI ⊕ Insert placeholder text ⊕ More?