nicklockwood / SwiftFormat

A command-line tool and Xcode Extension for formatting Swift code
MIT License
7.77k stars 630 forks source link

Xcode extension not registering after reboot. #1077

Open drekka opened 2 years ago

drekka commented 2 years ago

This may have already been discussed, but after a reboot the "Xcode Source Editor" and SwiftFormat extension disappears from the system extensions list. To fix it I have to drag Xcode out of Applications, then drag it back in. This gives the registration a kick and I'm back to formatted code.

Any idea why this is occurring and if there is a fix? It's not a serious problem but annoying all the same.

nicklockwood commented 2 years ago

This is a known issue. I'm not aware of any workaround other than the one you mentioned.

drekka commented 2 years ago

I've since found that this command triggers a refresh without having to drag things around:

PATH=/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support:"$PATH"
lsregister -f /Applications/Xcode.app
kb100824 commented 2 years ago

@drekka very tks