Best way to cross compile to Mac

Hey everyone,
What would be the recommended way to cross compile so I can support Macs? I have a Mac laptop somewhere but it would be a tedious process to get it to compile. Is there a better way where I can do it all on my Windows laptop? Thanks

There’s this thread where they say you could do it in the cloud:

But the point is that you will want to test the plugin after compilation, so if you have a Mac around then the best thing to do is to use it, at least for testing.

Thanks, I just got the Mac vst3 and component files to exist, but I realize that Apple requires signing the software to run it. How would I go about this on Windows, or is it only possible with Xcode?

yes you’re right, now that I remember I have a dev account in XCode… so you probably want to do the same

I’m curious did you actually compile macOS AU and VST on Windows? I wouldn’t think it would work too well since you’ll need to compile against the mac libraries and you need the signing tool etc… But either way, you can use Azure Pipelines, Github Actions, or similar services to build on both macOS and Windows for you, the issue is just getting a pipeline set up to do all the things you need.

For that matter, you’d be missing all the SDKs, frameworks and headers needed to even generate the code that expects to call the libraries. Not understanding how this would work at all, unless you’re using Visual Studio to compile an executable and naming it like a macOS bundle…that is NOT going to work.

I used the GitHub template repo that Oli talked about. It used Github’s actions feature to build for Mac in the cloud. I haven’t tested it on a Mac yet because they’re weird when it comes to unauthorized software, so the next step is to get an Apple Developer account and sign it. I really don’t feel like spending an afternoon getting Xcode to work, so I believe there is a way to sign your software using the Apple Terminal. Ironically, the biggest issue right now is that I’m only 17 and an Apple Developer account requires you to be at least 18 :expressionless:

@sstillwell I see your confusion and yes, if I did manage to get it working on a Windows computer there’s definitely something bigger going on :sweat_smile:

1 Like

Sure, you can sign code from the command line using the codesign tool, which is in /usr/bin, so I don’t think that’s installed by Xcode. Worst case you might need to install the Xcode Command Line Tools.

You WILL need Xcode to get the certificates from Apple, though, so I’m not sure why I brought that up. :slight_smile:

The certificates are obtained through Xcode > Preferences > Accounts > add an account and log it in > click Manage Certificates button in the lower right.

And sorry, yeah, you have to be of age to sign a legally-binding contract with Apple. It’s even worse if you try to do it as a company and not an individual - you have to have an account and be registered with Dun & Bradstreet so Apple can check whether your business is legitimate and properly registered with a state’s registry (Secretary of State, usually). At least that’s how I remember it…

Yikes, glad I’m still in prototyping! I suppose developing good plugins take months and months so who knows, I’ll hopefully be 18 at the time of release :grinning:

1 Like

Great that you can do C++ plug-ins at that age!

1 Like

Continuing on this thread…

Im doing most of my coding on Windows + VS. But I want to be able to produce plugins for Mac. Can I open up iPlug projects on my Mac with XCode? Any known issues?

Thanks /Bo

Looking at the IPlug2 source code you can see that it’s full of preprocessor directives that check for the OS you’re using so my guess is that a copy/paste from one to the other should compile if all the dependencies are properly linked. I haven’t tried this though.

1 Like

Yes, it’s a cross platform plugin framework. You have to make sure to add any extra source code cpp files to both your visual studio and Xcode projects, but if you duplicate a project like in the getting started guides a project should be ready to compile on Mac, windows and iOS.

1 Like

Hi Ric

Thanks for replyig. I´ll have a go at it as the occasion arises. Just wanted to make sure its doable before I start installing and setting up my Mac.

Sincerely /Bo

1 Like

Hi Oli

Thanks for replying. Coming directly from the source Im now certain that its doable :slight_smile:

On another note. Would you like to join in on our youtube live stream and talk about iPlug2? Me and a couple of online friends are doing a live stream where were talking about audio DSP and coding. Its usually on tuesdays @17:30 UTC… But were flexible on the day and time.

We’d love to have you as a guest on a stream. Let me know what you think.

Were usually streaming on Leandros channela + he is our coding guru:

Sincerely /Bo

Hi Bo,

Sorry I didn’t reply to your email about the stream… I am a bit busy at the moment but I’ll try and join at some point. I’ll let you know via email

Hi Oli

No worries. Let us know when you have the time. Looking forward to hear from you :slight_smile:

Sincerely /Bo