unity-ios-framework
unity-ios-framework copied to clipboard
Crash at il2cpp::vm::MetadataCache::Initialize()
When trying to build the application and to encapsulate the didFinishLaunchingWithOptions call in the framework (when pressing a button on the test application), the application crashes on the call. I am using Unity 2017.4.1f1, Xcode 10.0.
The logs are the following :
.

According to some info gathered here, it should be due to the Unity code not finding a file name 'global-metadata.dat' in a Data/Managed/Metadata directory but I have no clue on where to put it, the Data/ folder is a reference to the one located in the framework folder as in the repository.
Try add -DINIT_SCRIPTING_BACKEND=1 -DRUNTIME_IL2CPP=1 in Other C Flags in Unity Out Framework Project
Try to delete Data folder and add with folder references again.
Try to change UnityInitApplicationNoGraphics([[[NSBundle mainBundle] bundlePath] UTF8String]); by: NSBundle * bundle = [NSBundle bundleForClass:[self class]]; UnityInitApplicationNoGraphics([[bundle bundlePath] UTF8String]);
Look here https://forum.unity.com/threads/il2cpp-anyone-else-seeing-metadatacache-initialize-crashes-sometimes-when-the-game-starts.383145/
how about change the mach-o type of the framework from static to dynamic, maybe it works.