Jintin / Swimat

An Xcode formatter plug-in to format your swift code.
https://jintin.github.io/Swimat/
MIT License
1.65k stars 89 forks source link

Small update to enable extension to run in Xcode 12 on macOS 11 #225

Closed hyperphonic0 closed 4 years ago

hyperphonic0 commented 4 years ago

Added XcodeKit.framework to extension so it works with Xcode 12 (beta 2).

saagarjha commented 4 years ago

I understand that Swimat doesn't work in Xcode 12, but why is this necessary? Apple should be providing this framework, do we have the wrong rpath?

hyperphonic0 commented 4 years ago

So, according to the release notes, it is now required to build extensions with Xcode 12 - if you want to them to work on future versions of macOS (i.e. Big Sur and later).

From the release notes:

For compatibility with new security features in macOS 11, Xcode extensions must be built using Xcode 12 and must embed XcodeKit.framework. An Xcode extension rebuilt with these tools remains compatible with older versions of Xcode and macOS. (51822755)

saagarjha commented 4 years ago

Huh, that's a strange change but I guess that means I should merge this. Thanks!

sourcelocation commented 4 years ago

I am still having issues. Swimat does not appear in Xcode...

saagarjha commented 4 years ago

Does the workaround in the pinned issue help?

sourcelocation commented 4 years ago

Does the workaround in the pinned issue help?

Nope

saagarjha commented 4 years ago

Can you run pluginkit -vmAp com.apple.dt.Xcode.extension.source-editor and xcode-select -p and paste the output?

hyperphonic0 commented 4 years ago

It all worked as expected for me. Installed Swimat, OK'd the security prompt, then enabled it as an Xcode Source Editor extension in system preferences. Then restarted Xcode.

(I'm assuming you have downloaded the source and built it yourself? There is no release that includes this yet.).

Post your log output if it's still not working.

sourcelocation commented 4 years ago
iMac-Matthew:~ imac$ pluginkit -vmAp com.apple.dt.Xcode.extension.source-editor
+    com.jintin.Swimat.Extension(1.6.2) 42166614-6902-4AC1-BFCD-89E4D6B65164    2020-07-17 14:50:57 +0000   /Applications/Swimat.app/Contents/PlugIns/Extension.appex
 (1 plug-in)
iMac-Matthew:~ imac$ xcode-select -p
/Applications/Xcode-beta.app/Contents/Developer
hyperphonic0 commented 4 years ago

If there is nothing in the logs (you should see something!), the only thing I can suggest is to build it again, with the deployment target raised to 10.15 (rather than the current 10.11).