Hi, I discovered that iOS build does not compile in Release mode in Xcode after building Unity iOS player. The reason is PlayFabEvents.cs file from PlayFab SDK containing 3K lines of C# code in 2 functions, after being compiled by Unity`s il2cpp to C++ file it generates 210K+ lines of code and that C++ file cannot be compiled by Xcode in Release configuration because those 2 functions are too big, on my Mac it never compiles and clang allocates 30+ GB of memory trying to do it.
In Debug mode the game compiles in Xcode and runs on device.
I`ve tried setting Unity iOS player Managed Stripping Level to Medium from current Low - it helped bring the offending .cpp file to 40K lines of code, the game compiles in Release mode but crashes on startup - because the game uses reflection in our scripts some classes get stripped too, need to find them all and manually annotate them not to be stripped. This seems like a painful solution to the problem.
The simplest fix is splitting 2 functions in PlayFabEvents.cs into several smaller ones.
Using PlayFab SDK 2.88.200615
The offending functions are in PlayFabSDK\Shared\Public\PlayFabEvents.cs they are UnregisterInstance and OnProcessingEvent.
I have attached a fixed file which makes it compilable on xcode, it still takes around 4 mins and 6GB of ram, so you can chop them further if you intend to fix this.playfabevents.zip