# Distributing plugins on MacOS (Part 2)

**URL:** <https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865>\
**Category:** Cabbage Stew\
**Created:** [22 September 2021 11:00 UTC](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865 "2021-09-22T11:00:27Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [22 September 2021 11:00 UTC](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865/1 "2021-09-22T11:00:28Z")

</div>

_ **tl;dr** you need to sign plugins if you want to share them on the latest versions of MacOS. I’ve provided a simple script below that will do this for you once you have Apple credentials._

* * *

As most Apple users will know by now, it’s getting harder and harder to distribute software on a Mac that hasn’t be verified by Apple. It means that users wishing to distribute Cabbage plugins on Mac will now need to adhere to Apple’s latest policy regarding signing and notarising of apps. I will also have to start doing the same with Cabbage itself. Anyhow, if you do wish to share plugin bundle with people, you will now need to do the following (take a deep breath…)

- Sign up for an Apple developer ID, this will cost 99$ yearly. 🤬

- Create a Developer ID Certificate.

> 1. Log into your Apple Developer Account and go to **Certificates, Identifiers & Profiles**.
> 2. In the upper-left corner, click **+** to add.
> 3. Under Software, select Developer ID then click **Continue**.
> 4. Click **Choose File**.
> 5. Select the certificate request file you created earlier (a file with a `certSigningRequest` file extension), then click **Choose**.
> 6. Click **Continue**.
> 7. Click **Download**.

When this is done, you should have in your KeyChain Access a certificate with a name like `"Developer ID Application: R Walsh (4R359YV9BF)`

That’s the apple ID stuff taken care of. Now you must do the following for each plugin you will to release.

- Generate an application/plugin specific password at [https://appleid.apple.com/](https://appleid.apple.com/) Click the generate application password link, give the password a general name, i.e, GranularPlugin, and then generate. It will show you a new password. copy and paste it somewhere. Note you never use your regular Apple password here. It’s also app specific ones you need to use.

- Assuming that you have exported your plugin, relink the binaries. These step is explaining in [Distributing Plugins on MacOS Part 1](https://forum-next.cabbageaudio.com/t/distributing-plugins-on-macos-part-1/2274). Note that you should really remove everything from the embedded Csound pacakge that you don’t need. In most case I wipe the contents of the Opcode64 folder too. The less binary files you have in there, the less work you have to do.

- The next step is to sign and notarise. You must `codesign` the plugin binaries, and the Csound library binaries. Then you prepare a zip file and upload this to Apple for verification. I use the following script to do this. [prepareForDistribution.sh](https://forum.cabbageaudio.com/uploads/short-url/6immsGfiMYnx1ZRyqXhhRUljOo.sh) (2.1 KB) I call it like this:

`sudo ./prepareForDistribution.sh ~/Library/Audio/Plug-Ins/VST/PluginName.vst PluginName "Developer ID Application: R Walsh (4R359YV9BF)" myAppleIdId my_app_password`

- After the final step, you should get message like this:

- Now you must check that the verification was Ok. To do this, you can pass the RequestUUID to the `xcrun altool` command, where `RequestUUID` below is the RequestUUID code from above. You will need to pass your app-password at this point.

`xcrun altool --notarization-info RequestUUID -u myAppleID`

- This will cause more information to be printed to the screen:

- If package is approved, great, you’re good to start distributing your plugins. If not, copy and pass the LogFileURL and see where the package failed. It’s usually because some of the binaries have not been code-signed. It will tell you which ones you need to sign. Take a look at the script I provided for details on how to do this.

Finally, I’ve been testing this with a new universal build of Csound which you can get from [here](https://1drv.ms/u/s!Ah4mHoWvP_Gcg6VnPPG_rYFvIiodYg?e=fBMfvg). It’s pretty barebones in that not all plugins are supported, but it’s will run natively on an M1 mac which is nice. Because it’s my own build of Csound, the relink script from the previous post will not work. You need to use this one instead.  
[relinkCsoundMacOS.sh](https://forum.cabbageaudio.com/uploads/short-url/cTd28JoWDH8THtHlzioTSEKnD2K.sh) (2.4 KB)

Of course I’m happy to answer any questions. I wish I could make this process easier, but Apple has put everyone in a real tight corner here. I don’t think we have any choice but to play ball.

---

<div class="post-metadata">

**Author:** ![mjmogo](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/mjmogo/32/3522_2.png) [@mjmogo](https://forum.cabbageaudio.com/u/mjmogo)\
**Post date:** [23 September 2021 02:17 UTC](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865/2 "2021-09-23T02:17:47Z")

</div>

Rory, do you know if this will only be applicable to the latest version of the os? Or is this going to be the model moving forward? Linux may be closer in my future than I thought!

---

<div class="post-metadata">

**Author:** ![t\_grey](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/t_grey/32/1234_2.png) [@t\_grey](https://forum.cabbageaudio.com/u/t_grey)\
**Post date:** [23 September 2021 03:44 UTC](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865/3 "2021-09-23T03:44:41Z")

</div>

Wow… a lack of foresight of this magnitude in such an important and impactful decision does not indicate intelligent leadership at the helm. It’s a real shame Apple thought this was the best way to solve security problems, and then chose to use it as an excuse for another cash grab at the same time.

I imagine lots of casual developers will abandoned the system very soon. I was already considering it strongly due to such poor support for older hardware and OS versions, but this has absolutely made the decision that much easier and final.

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [23 September 2021 10:24 UTC](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865/4 "2021-09-23T10:24:54Z")

</div>

> [@mjmogo](#):
>
> Rory, do you know if this will only be applicable to the latest version of the os?

I think the newest versions will enforce this more tightly. Gatekeeper has got progressively aggressive from Catalina onwards but it’s on a different level nowadays.

> [@mjmogo](#):
>
> Linux may be closer in my future than I thought!

If I didn’t have to consider Mac users I wouldn’t be using macOS at all.

> [@t\_grey](#):
>
> I imagine lots of casual developers will abandoned the system very soon. I was already considering it strongly due to such poor support for older hardware and OS versions, but this has absolutely made the decision that much easier and final.

It might certainly cause developers to think twice, but I don’t think it will have any affect on the typical end user. These new measures have always been in place for developers of iPhone apps. The problem is that you routinely hear stories of Apple removing 3rd part apps from the App Store, only to then release their own versions of the same app. You really have to feel for developers in these cases:

> **[The bitter lawsuit hanging over the Apple Watch’s new swipe keyboard](https://www.theverge.com/2021/9/16/22676706/apple-watch-swipe-keyboard-flicktype-lawsuit-kosta-eleftheriou)**
>
> Apple’s head of keyboards stands accused of trying to crush competition

Right now I can still release Cabbage outside of the App Store, but at some point I might be forced to deliver it exclusively from the App Store. This will inevitably lead to a world of pain. 🤬

---

<div class="post-metadata">

**Author:** ![mjmogo](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/mjmogo/32/3522_2.png) [@mjmogo](https://forum.cabbageaudio.com/u/mjmogo)\
**Post date:** [23 September 2021 12:26 UTC](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865/5 "2021-09-23T12:26:08Z")

</div>

Apple’s software is built on the back of Open Source, sadly it was the BSD license, which allowed for Commercial use, and then Apple found a way to privatize the rest of GNU. I appreciate that Steve Jobs embraced Open Source early on, and he is a big reason for the Open Source movement, but there comes a point when you have to say enough. Apple is one of the worst companies out there.

… Sorry, didn’t mean to get to worked up. Guess I’m just disappointed that I was so wrong about Apple. Just say no!

---

<div class="post-metadata">

**Author:** ![mjmogo](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/mjmogo/32/3522_2.png) [@mjmogo](https://forum.cabbageaudio.com/u/mjmogo)\
**Post date:** [23 September 2021 12:28 UTC](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865/6 "2021-09-23T12:28:49Z")

</div>

> [@t\_grey](#):
>
> I was already considering it strongly due to such poor support for older hardware and OS versions

But that’s part of them ploy to grab more cash. Now with their new hardware being encased in a closed plastic shroud, there will be little to no use for any of their future hardware.

---

<div class="post-metadata">

**Author:** ![mjmogo](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/mjmogo/32/3522_2.png) [@mjmogo](https://forum.cabbageaudio.com/u/mjmogo)\
**Post date:** [23 September 2021 12:31 UTC](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865/7 "2021-09-23T12:31:14Z")

</div>

> [@rorywalsh](#):
>
> If I didn’t have to consider Mac users I wouldn’t be using macOS at all.

And I think that is what Apple is banking on. Sadly, they know that the music industry is quite tied to their computers. They are going to pick everyone’s pockets until they can’t anymore!

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [23 September 2021 16:21 UTC](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865/8 "2021-09-23T16:21:41Z")

</div>

> [@mjmogo](#):
>
> Sadly, they know that the music industry is quite tied to their computers.

For sure. Many have totally bought into the Apple hype and won’t ever give it up. If Apple were a company I trust, I would say this is a genuine move toward better security for their users. But I don’t trust them one bit. And I’m writing this post from my Mac 😂

---

<div class="post-metadata">

**Author:** ![EoinSmith](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/eoinsmith/32/2153_2.png) [@EoinSmith](https://forum.cabbageaudio.com/u/EoinSmith)\
**Post date:** [26 September 2021 21:43 UTC](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865/9 "2021-09-26T21:43:22Z")

</div>

wow, so this maybe explains the ‘operation not permitted’ line after the linking process. Thanks, as always, Rory for getting this information up.

---

<div class="post-metadata">

**Author:** ![flaviogaete](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/flaviogaete/32/3119_2.png) [@flaviogaete](https://forum.cabbageaudio.com/u/flaviogaete)\
**Post date:** [27 September 2021 20:41 UTC](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865/10 "2021-09-27T20:41:53Z")

</div>

Thanks very much for this update, Rory. I happened to fall for the Apple trap some months ago and signed up for an Apple Developer account, so I wanted to give this a try but I’m such a neophyte at this, I couldn’t for the life of me get around this.

I understand we can use your script and modify the instructions so as to have our details here:

> [@rorywalsh](#):
>
> sudo ./prepareForDistribution.sh ~/Library/Audio/Plug-Ins/VST/PluginName.vst PluginName “Developer ID Application: R Walsh (4R359YV9BF)” myAppleIdId my\_app\_password

- I replaced both paths as I copied my AU plugin into a specific “Releases” folder inside a project folder (I just added your script to that same path for simplicity’s sake).
- I then added my certificate ID
- Then my Apple ID
- Then the password I generated for my app (as per the previous instructions)

…but got a “command not found” when I ran it in the Terminal.

Are we supposed to change the script as well? For example, the last line…

`xcrun altool --notarize-app --primary-bundle-id "com.cabbageaudio.CabbagePlugin" --username $APPLE_ID -password "$APP_PASS" --file $PLUGIN_ZIP.zip`

…or are we meant for us who are not under Cabbage pro yet, to keep your credentials?

Should the “PluginName” be the same as the name of the app we created when we created the app-specific password?

I know it’s only so easy to ask, but in case you ever find the time, It would be amazing to have a tutorial about this (especially to understand how a script can “invasively” code-sign all the related binaries?).

Either way, thanks very much!

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [27 September 2021 21:40 UTC](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865/11 "2021-09-27T21:40:21Z")

</div>

Some comments:

- You shouldn’t need to modify the script at all, but you can do. You can also change the bundle identify (com.company.product) tag. To be honest, none of this stuff is even visible to the end user.

- You probably may need to chmod the script so you can run it:

`chmod +x prepareForDistribution.sh`

- The PluginName is the name of the plugin binary that resides in the Contents/MacOS/ folder

- Does you certificate ID looks similar to the one I posted? i.e., _“Developer ID Application: R Walsh (4R359YV9BF)”_ You can get the exact name from the Keychain Access app.

> [@flaviogaete](#):
>
> I know it’s only so easy to ask, but in case you ever find the time, It would be amazing to have a tutorial about this

If I find some time. The new semester has just started, and on top of that we have a new family member at home, an extremely small and beautiful little girl. So time is at a premium 🙂

---

<div class="post-metadata">

**Author:** ![Retornz](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/retornz/32/2714_2.png) [@Retornz](https://forum.cabbageaudio.com/u/Retornz)\
**Post date:** [28 September 2021 17:01 UTC](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865/12 "2021-09-28T17:01:48Z")

</div>

Such a shame from them to apply that for open source softwares too…  
I won’t pay 99$/y … to distribute a free plugin… that’s so sad for Mac users but they will have to build the future versions of the plugin from themselves now…

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [28 September 2021 17:16 UTC](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865/13 "2021-09-28T17:16:49Z")

</div>

I don’t mind signing and notarising open source Cabbage plugins. Just drop me a line.

---

<div class="post-metadata">

**Author:** ![flaviogaete](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/flaviogaete/32/3119_2.png) [@flaviogaete](https://forum.cabbageaudio.com/u/flaviogaete)\
**Post date:** [28 September 2021 20:21 UTC](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865/14 "2021-09-28T20:21:22Z")

</div>

> [@rorywalsh](#):
>
> `chmod +x prepareForDistribution.sh`

Thanks! Will give this a shot 🙂

> [@rorywalsh](#):
>
> If I find some time. The new semester has just started, and on top of that we have a new family member at home, an extremely small and beautiful little girl. So time is at a premium 🙂

Wow, congratulations!!! Please don’t mind us nerds and may you go play some ukelele for the newcomer instead! Some things I’m sure we can figure out on our own eventually 😉 (and if I ever do figure this code-signing thing out myself, I’ll see to it to post a step-by-step here).  
🙂 🙂🙂

---

<div class="post-metadata">

**Author:** ![chronopolis](https://forum.cabbageaudio.com/letter_avatar_proxy/v4/letter/c/c37758/32.png) [@chronopolis](https://forum.cabbageaudio.com/u/chronopolis)\
**Post date:** [29 September 2021 15:26 UTC](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865/15 "2021-09-29T15:26:55Z")

</div>

> [@rorywalsh](#):
>
> You must `codesign` the plugin binaries

Not totally sure how to do this…

`codesign -s "Company Name" " /Applications/Utilities/My App.app"`

??

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [29 September 2021 15:29 UTC](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865/16 "2021-09-29T15:29:01Z")

</div>

> [@chronopolis](#):
>
> Not totally sure how to do this…
> 
> `codesign -s "Company Name" " /Applications/Utilities/My App.app"`

Right back at you 🤣

> [@rorywalsh](#):
>
> - I use the following script to do this. [prepareForDistribution.sh](https://forum.cabbageaudio.com/uploads/short-url/6immsGfiMYnx1ZRyqXhhRUljOo.sh) (2.1 KB) I call it like this:
> 
> `sudo ./prepareForDistribution.sh ~/Library/Audio/Plug-Ins/VST/PluginName.vst PluginName "Developer ID Application: R Walsh (4R359YV9BF)" myAppleIdId my_app_password`

---

<div class="post-metadata">

**Author:** ![chronopolis](https://forum.cabbageaudio.com/letter_avatar_proxy/v4/letter/c/c37758/32.png) [@chronopolis](https://forum.cabbageaudio.com/u/chronopolis)\
**Post date:** [29 September 2021 15:34 UTC](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865/17 "2021-09-29T15:34:11Z")

</div>

Oh I see - I didn’t get to that part yet. The instructions sound like you have to sign it first and then run the .sh to get it ready for the Cupertino posse. You’re saying the script will do the signing too?

Thanks for the detailed instructions btw, your efforts are really appreciated.

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [29 September 2021 15:36 UTC](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865/18 "2021-09-29T15:36:04Z")

</div>

Yeah, the script should do everything for you, well apart from sign your soul over to Apple. That part is on you 🙂 But I’ll update the instructions to make this super clear..

---

<div class="post-metadata">

**Author:** ![chronopolis](https://forum.cabbageaudio.com/letter_avatar_proxy/v4/letter/c/c37758/32.png) [@chronopolis](https://forum.cabbageaudio.com/u/chronopolis)\
**Post date:** [29 September 2021 15:42 UTC](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865/19 "2021-09-29T15:42:22Z")

</div>

My soul was signed over 3 iphones ago during the reign of “Jobs the Terrible”

Umm - just some more clarification here… are we signing then the actual au and vst package? Or just the binaries within (i.e. CabbagePlugin, CsoundLib64). The instructions make it sound like the former

`~/Library/Audio/Plug-Ins/VST/PluginName.vst`

But then would you also sign ?  
`~/Library/Audio/Plug-Ins/VST/PluginName.vst/Contents/Resources/CsoundLib64.framework/Versions/6.0/CsoundLib64`

and

`~/Library/Audio/Plug-Ins/VST/PluginName.vst/Contents/MacOS/CabbagePlugin`

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [29 September 2021 15:49 UTC](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865/20 "2021-09-29T15:49:02Z")

</div>

> [@chronopolis](#):
>
> are we signing then the actual au and vst package?

No, just the binaries.

> [@chronopolis](#):
>
> But then would you also sign ?

The script does this for you. The reason we pass the path to the plugin is so that the script knows where the embedded Csound framework is. By passing the path to the plugin, it means the script will work from any directory.

[Next page](https://forum.cabbageaudio.com/t/distributing-plugins-on-macos-part-2/2865.md?page=2)
