How to install Xcode source editor extension?

6.9k Views Asked by At

I created a source editor extension but don't understand how to use it. It works fine in debugging version of Xcode (with gray icon) but I cannot find a way to install this extension to "real" Xcode. Documentation is quite obscure for this topic. What I have tried - 1. Build and run host application. 2. Move resulting .appex file into PlugIns directory of Xcode. Nothing worked for me.

I use macOS Sierra and Xcode 8.

2

There are 2 best solutions below

0
On BEST ANSWER

There is a nice tutorial on github page of SwiftInitializerGenerator extension: https://github.com/Bouke/SwiftInitializerGenerator#installation

0
On

Installation:

  1. Archive extension project (Product > Archive).
  2. (From Organizer window) 'Export...' > 'Export as a macOS App'.
  3. Double click the app you just exported, (it will run the App). Quit it. That is the actual install.

A few notes:

If you open 'System Preferences' > Extension, it should show under 'Xcode Source Editor'.

Move extension to the trash, reopen 'System Preferences', extension is gone. Guessing this is the uninstall how to.

Move extension out of the trash and reopen 'System Preferences', it will reappears.

You must run the Extension App at least once. The registration is managed through macOS Launch Services.