简体   繁体   中英

Xcode 8 Extension Not Visible In Editor Menu

I have the Xcode 8 GM installed and am trying to mess around with the editor extensions. I've followed the tutorial on this site:

https://littlebitesofcocoa.com/239-creating-an-xcode-source-editor-extension

but for some reason when I run the extension to test it, it doesn't show up in the editor menu at all.

Is there something that the tutorial is missing or is there something else I need to do to get the extension to show up in the editor menu?

Thanks for the help.

I figured it out.

By default, the project was not signed. Clicking on the project and going to the general settings and selecting Enable Development Signing on both the macOS app and the Extension target fixed the issue.

If you attempt to follow Apple's Create Xcode Extension guide , and then attempt to test your extension , you'll notice that the menu option doesn't show up.

If you examine the log, you'll notice it says:

IDEExtensionManager: Xcode Extension does not incorporate XcodeKit

Elise van Looij's solution pointed me in the right direction.

What I had to do was:

  1. Xcode Extension Target > General tab

  2. Update XcodeKit.framework to Embed & Sign .

    By default Apple's template has it as Do Not Embed . Note: You should leave Cocoa.framework as Do Not Embed .

  3. Importantly, you should kill the test instance of Xcode (the one with a black background).

    If you don't kill the app, it'll continue to not show up.

  4. You can now run your extension and it'll show up as the last menu option in the Editor menu.

This was tested in Xcode 12.4.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM