Plugin Bundle Doesn't work when built on M1 Mac

I have created a very simply Unity plugin. It works on iOS, Android and MacOS. For MacOS I have created a bundle according to the instructions on the Unity website. I did this a few years ago, so maybe it is out of date, BUT.

I am transitioning from a 2018 macbook pro Intel to a 2021 MBP M1 Max.

I have the latest xcode installed on both computers.

This library just has a single .h and single .mm Obj-C files.

I have it set to build both M1 and Intel architectures.

When I build this on the Intel mac I can copy my bundle to the M1 mac and use it from the Unity editor and it seems to work fine.

When I build the exact same project on my new mac with M1 and try to run it in the Unity editor says it can’t find the DLL.

Is there something I need to know about building on the M1 versus Intel?

Solved this for my current build of Unity 2021.3.9f1 LTF

Unity does not run natively as an arm64 application, so having arm64 inside the bundle seems to confuse the internal DLL loading logic.

The fix is you have to produce a bundle with JUST the x86_64 arch in there - I did this by setting the build architecture directly to x86_64, not leaving anything else up to chance.

HTH.