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

Extending Xcode 8 - try! Swift NYC 2016

2773fb278535f8d2f0c193800a3b8e09?s=47 Daniel Jalkut
September 01, 2016

Extending Xcode 8 - try! Swift NYC 2016

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

2773fb278535f8d2f0c193800a3b8e09?s=128

Daniel Jalkut

September 01, 2016
Tweet

Transcript

  1. daniel jalkut @danielpunkass Extending Xcode 8

  2. A Good Developer…

  3. Source Editor Extensions

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

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

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

    stability ⊕ Signal of things to come?
  7. World of Possibilities…

  8. World of Possibilities… ⊕ Transform text and selection ⊕ Access

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

    Project manipulation ◦ Leveraging Xcode’s compiler state ⊕ Dynamic responses to user actions ◦ Only menu and keyboard shortcut
  10. Build & Run

  11. Build & Run ⊕ Built upon App Extensions ⊕ Delivered

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

    a new extension target ⊕ Build & Run ⊕ Select Xcode as the target
  13. None
  14. None
  15. None
  16. None
  17. None
  18. None
  19. None
  20. None
  21. None
  22. None
  23. 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
  24. Hot Tips

  25. Hot Tips ⊕ Select Xcode as the debug target

  26. None
  27. Hot Tips ⊕ Select Xcode as the debug target ⊕

    Pass a source file path to Xcode
  28. None
  29. None
  30. Hot Tips ⊕ Select Xcode as the debug target ⊕

    Pass a source file path to Xcode ⊕ Give your command a keyboard shortcut
  31. None
  32. 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
  33. Try! Harder

  34. Try! Harder ⊕ github.com/danielpunkass/tryharder ⊕ Standalone project with example extensions

  35. Try! Harder ⊕ Manipulate text efficiently ⊕ Open a web

    page ⊕ Display rudimentary UI ⊕ Insert placeholder text ⊕ More?
  36. As Good As Your Tools

  37. None