Hi again, I’m just following up on this, since I haven’t heard back in a little over a
week. Are other third-party plugins (as opposed to command bundles) able to run? If not,
can TextMate add the `com.apple.security.cs.disable-library-validation` entitlement, since
I think that’s the problem here?
Thanks,
Rob
On Sep 24, 2019, at 12:29 PM, Rob Brackett
<rob(a)robbrackett.com> wrote:
Howdy, I maintain the EditorConfig plugin for TextMate
(
https://github.com/Mr0grog/editorconfig-textmate
<https://github.com/Mr0grog/editorconfig-textmate>). I haven’t had much time to work
on it recently, but I was trying to update it for the latest TextMate this morning.
However, MacOS won’t actually load my bundle inside TextMate. I see this message when
TextMate starts:
Failed to load ‘editorconfig-textmate’ (~/Library/Application
Support/TextMate/PlugIns/editorconfig-textmate.tmplugin): The bundle
“editorconfig-textmate” couldn’t be loaded because it is damaged or missing necessary
resources.
I’m fairly certain the cause is that TextMate now uses the hardened runtime
(
https://github.com/textmate/textmate/commit/412e6798ca206b15cdc8f86a1387835…
<https://github.com/textmate/textmate/commit/412e6798ca206b15cdc8f86a1387835a3f4f82e7>).
I saw Allan’s message about a similar issue with the Emmet plugin on July 13th:
https://lists.macromates.com/textmate/2019-July/041039.html
<https://lists.macromates.com/textmate/2019-July/041039.html>
…but enabling the hardened runtime when signing the bundle doesn’t solve the issue for
me.
I think the actual problem in this case is that TextMate (not my plug-in) is missing the
`com.apple.security.cs.disable-library-validation` entitlement for hardening. Apple’s docs
(
https://developer.apple.com/documentation/bundleresources/entitlements/com_…
<https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_cs_disable-library-validation>)
say:
Typically, the Hardened Runtime’s library
validation prevents an app from loading frameworks, plug-ins, or libraries unless they’re
either signed by Apple or signed with the same team ID as the app. The macOS dynamic
linker (dyld) provides a detailed error message when this happens. Use the Disable Library
Validation Entitlement to circumvent this restriction.
Obviously I can’t and shouldn’t sign the plug-in with TextMate’s team ID! So it sounds
like this is probably required for third-party plug-ins. Are there other third-party
plug-ins that are functioning with the latest version of TextMate? Something else I might
be missing here?
Thanks,
Rob Brackett
rob(a)robbrackett.com <mailto:rob@robbrackett.com>
@Mr0grog