Error building game for OSX

I exported my project as xcode to notarise it. The PC build of this works great.

When I try play the game with the notarised (with developerID) export it just gives me spinning wheel of death.

When I try to play in code I get (I tried both intel64 only and silicon + intel64)

The line the error comes is (this appears to be unity specific code and not code I wrote)
return PlayerMain(argc, argv); }

and the error is
Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)

I have no clue how to fix this and get the app running on OSX, any help much appreciated.

This is the script throwing the error

// Copyright © 2018 Unity Technologies. All rights reserved.

int PlayerMain(int argc, const char *argv[]);

#if UNITY_ASAN
extern "C"
{
    extern void unity_asan_configure();
}
#endif

int main(int argc, const char *argv[])
{
#if UNITY_ASAN
    unity_asan_configure();
#endif

    return PlayerMain(argc, argv);
}

this is the line the error comes from return PlayerMain(argc, argv);

Hi there! Sorry to necro this post. But, I also am having this issue currently. Similar case, game works well on PC. But, having an issue with archiving via xcode due to this same PlayerMain error. We’re currently using Unity 2019.4.30f1 to make a build

I fixed by changing in the apple settings for backend scripting to use IC2CPP

1 Like

Fantastic. Thank you! I’ll give it a try this week. Have a great holiday!