Swiftformat: Doesn't work with latest Xcode 10.2

Created on 18 Apr 2019  路  5Comments  路  Source: nicklockwood/SwiftFormat

Most helpful comment

See the section: "Using pluginkit", I was able to solve similar issue with information in that section.

Re-registering both Xcode and SwiftFormat.app with LaunchServices did the job for me:

  1. PATH=/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support:"$PATH"
  2. lsregister -f /Applications/Xcode.app
  3. lsregister -f /Applications/SwiftFormat\ for\ Xcode.app/

To confirm that all extensions are visible to the system: pluginkit -m -p com.apple.dt.Xcode.extension.source-editor

All 5 comments

@alokc83 what do you mean by "doesn't work"?

I have the same issue. If you are running the following:
System Version: macOS 10.14.4 (18E226)
Kernel Version: Darwin 18.5.0
Version 10.2.1 (10E1001)

It doesn't show up in the menu any more like it used to. Even if I run the 'SwiftFormat for Xcode.app' and the 'About dialog' displays with details of how to hook it into Xcode. It never shows up in the Settings-Extensions window for me to check so it shows up as a menu option after Xcode relaunch.

My guess is Apple changed yet another API call on you and all you need to do is rebuild. I wanted to rebuild the app locally for me to use but to do that I need to refactor the bundle ID of "com.charcoaldesign.SwiftFormat" which seems like the wrong path.

Thanks!

Same problem for me after updating to Xcode 10.3

In this article https://nshipster.com/xcode-source-extensions they talk about some issues with Xcode extension especially when multiple copies are installed on the same computer.

See the section: "Using pluginkit", I was able to solve similar issue with information in that section.

See the section: "Using pluginkit", I was able to solve similar issue with information in that section.

Re-registering both Xcode and SwiftFormat.app with LaunchServices did the job for me:

  1. PATH=/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support:"$PATH"
  2. lsregister -f /Applications/Xcode.app
  3. lsregister -f /Applications/SwiftFormat\ for\ Xcode.app/

To confirm that all extensions are visible to the system: pluginkit -m -p com.apple.dt.Xcode.extension.source-editor

Was this page helpful?
0 / 5 - 0 ratings