https://developer.apple.com/documentation/xcodekit/creating_a_source_editor_extension
I created new MacOS project and added a Xcode Source Editor Extension target to the project.
I run the extension in debug mode with extension target, but the extension is not show up in Editor menu debug mode Xcode.
Xcode version is 15.3(released)
MacOS version is 14.4.1 Sonoma
XcodeKit
RSS for tagCreate extensions to add commands to the Xcode source editor.
Posts under XcodeKit tag
5 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello I am using 26.2 (25C56) on my m4 air. when I am working on a Flutter project suddenly my app crashed and after when I tried to build the application again this error occurs. How to fix it. ?
Launching lib/main.dart on iPhone 16e in debug mode...
Xcode build done. 2.4s
Failed to build iOS app
Uncategorized (Xcode): Unable to find a destination matching the provided destination specifier:
{ id:45967BD9-44E0-4D5D-8C43-C5437F48836A }Available destinations for the "Runner" scheme:
{ platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00008132-001E5102020B801C, name:My Mac }
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
Could not build the application for the simulator.
Error launching application on iPhone 16e.
I'm working on a plugin, and that target works just fine.
I made another target so I can test some computation functions. It doesn't need much from XcodeKit, just some of the structures. I added XcodeKit and Cocoa, but the import XcodeKit just says "no such module".
If I switch to the plugin target, it's just fine. I've compared both schemes, but I don't see difference which would affect finding the framework.
I'm learning XPC by inspecting the GitHub Copilot project.
I figured out that the schema works as follows:
The host app with a UI to manage settings
A Service Extension that controls the Xcode Editor
A communication bridge cli app that connects the first two
As far as I understand an app appears in the Accessibility Permission when it calls the next method:
let key = kAXTrustedCheckOptionPrompt.takeRetainedValue() as NSString
AXIsProcessTrustedWithOptions([key: true] as CFDictionary)
This method is only called by the Service Extension.
However, when I run a release build from the /Application folder (where launch agents point to), there are two records appearing in the Accessibility Permission list:
The host app
The needed Service Extension
I compared all metadata files from Copilot with my copy line-by-line, but still can't figure out why the host app record appears in the Accessibility Permission, since the host app does not call the AXIsProcessTrustedWithOptions() method at all.
Could you give me any clue to help me wrap my head around it?
I am trying to create a source editor extension in Xcode 16, I just created a blank macOS project and added an extension target. I also changed "XcodeKit.framework" to Embed and sign, but when I run the extension on my Mac, I can't see the command under "Editor" menu.
I even tried to clone a sample extension from online and run it, even in this project I'm unable to see the commands under "Editor" menu.
Has anyone faced this issue?