Open ahwulf opened 3 years ago
Appears to require this: https://developer.apple.com/forums/thread/666434
Comment in Xcode 12 release notes: "A new Xcode Source Editor Extension target doesn’t automatically set up embedding XcodeKit.framework in the extension. (59274389) Workaround: Embed XcodeKit.framework in the extension manually." No mention of fixing this in 12.1 or 12.2
@ahwulf I don't have Bug Sur to test with yet - would you mind trying to fix this and open a PR if you get it working?
Never dealt with an extension before. Does it work for you in Xcode 12.X on Catalina? The release notes for Xcode were not very clear as to whether it was a 12 bug or an OS bug (maybe some kind of security thing).
@ahwulf it works on Catalina.
OK I see XCodekit is Embed & Sign in your extension, which seems to be what is required, yet it does not work. Not a clue what else to try. Maybe someone else out there has some idea? The only thing I see in console at the end of the process is swift format reporting Invalidating assertion 215-35016-20762 (target:[xpcservice<com.charcoaldesign.SwiftFormat-for-Xcode.SourceEditorExtension([app<application.com.apple.dt.Xcode.8655004951.8655170801(501)>:35016])(501)>:35026]) from originator [app<application.com.apple.dt.Xcode.8655004951.8655170801(501)>:35016]
I downloaded it from the release assets and it works for me for both macOS 10.15 and 11.0 with Xcode 12.2
Interesting, I am not seeing any Xcode extensions anymore, even for those downloaded from the App Store.
Looks like a system bug. I build this project again and signed it. However, it does not show.
@imWildCat do you have multiple copies of Xcode installed? That might explain it. Also, try moving Xcode out of the applications folder and then moving it back again.
@nicklockwood I have Xcode 12.0 in the Downloads
folder. After removing it completely, Xcode extensions are still now shown in the Preferences window. I am rebooting my laptop now.
No luck.
Found a potential issue:
default --:--:--.796921+0800 Xcode [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-17535/IDEKit/NavigableItems/IDENavigableItem.m:1248
Details: No match from <IDEKeyDrivenNavigableItem 0x7f962fdc3d50: (supports Any NSObject, represents: <Xcode3EditingGroup: 0x7f964870d3a0>)> to <Xcode3Target:0x7f969ffe1420:SwiftFormat for Xcode>. Iterating the whole tree might have taken a significant amount of time.
Object: <IDEKeyDrivenNavigableItem_Xcode3EditingGroup_Any: 0x7f962fdc3d50>
Method: -_descendantItemForRepresentedObject:stopAtClass:
Thread: <NSThread: 0x7f96efc19e70>{number = 1, name = main}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
@imWildCat did you try this?
try moving Xcode out of the applications folder and then moving it back again.
@imWildCat did you try this?
try moving Xcode out of the applications folder and then moving it back again.
Sorry, I missed this one. It works, thank you!
I will try that later today too.
On Tue, Dec 1, 2020 at 6:40 AM Daohan Chong notifications@github.com wrote:
@imWildCat https://github.com/imWildCat did you try this?
try moving Xcode out of the applications folder and then moving it back again.
Sorry, I missed this one. It works, thank you!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nicklockwood/SwiftFormat/issues/808#issuecomment-736480295, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUAZTAASTT4FB3UVUE576LSSTIZBANCNFSM4T6RT63Q .
I also had this issue today, and I also solved it by moving Xcode out of /Applications and then moving it back.
@imWildCat do you have multiple copies of Xcode installed? That might explain it. Also, try moving Xcode out of the applications folder and then moving it back again.
Helped me too! I haven't seen the plugin in the System Preferences > Extensions
at all until I did this.
Have you check this: https://nshipster.com/xcode-source-extensions/
Section Using pluginkit start with this:
During development, Xcode can become confused as to which extensions it sees. It can be useful to get an overview of installed extensions using the pluginkit tool. This allows us to query the private PluginKit framework that manages all system extensions.
I have used the instruction in that section in the past when I was not able to see the extension from Xcode after an upgrade.
Hi @VinceBurn
Thanks for the link above. Looked promising, but unfortunately it has not changed anything. I've run
PATH=/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support:"$PATH"
lsregister -f /Applications/Xcode-12.3.app
I've restarted both Xcode and the Extensions dialog, but still Xcode is not showing up in the list :(
When I again run
pluginkit -m -p com.apple.dt.Xcode.extension.source-editor
it still does not print anything.
I guess this is not what should happen, right?
By the way, I'm using xcode-install, resp. xcversion
for managing my Xcode installations (https://github.com/xcpretty/xcode-install).
Linking #804 for cross referencing...
I installed SwiftFormat and SwiftFormat For Xcode and followed the instructions. But no matter what I do Xcode never shows it in the Edit menu. The extension is clearly checked in Preferences. I even ran the whole thing multiple times, but Xcode never changes. Is this some limitation in 12.X or Big Sur?