azesmway / react-native-unity-play

Play an unity view in react native
MIT License
40 stars 16 forks source link

[libil2cpp] ERROR: Could not open .../UnityFramework.framework/Data/Managed/Metadata/global-metadata.dat #20

Open cdiddy77 opened 2 years ago

cdiddy77 commented 2 years ago

Running on iPhone 13 emulator. Using unity 2021.2.5f1.

My test app runs fine as standalone Unity app. When I follow instructions, and fix the RN code up a bit, then when I hit the start button, I see the following in xcode output window

2022-01-18 20:31:55.697528-0800 rnun1[36530:7446830] Built from '2021.2/staging' branch, Version '2021.2.5f1 (4ec9a5e799f5)', Build type 'Development', Scripting Backend 'il2cpp'
no boot config - using default values
2022-01-18 20:31:55.698152-0800 rnun1[36530:7446830] MemoryManager: Using 'Dynamic Heap' Allocator.
[UnityMemory] Configuration Parameters - Can be set up in boot.config
    "memorysetup-bucket-allocator-granularity=16"
    "memorysetup-bucket-allocator-bucket-count=8"
    "memorysetup-bucket-allocator-block-size=4194304"
    "memorysetup-bucket-allocator-block-count=1"
    "memorysetup-main-allocator-block-size=16777216"
    "memorysetup-thread-allocator-block-size=16777216"
    "memorysetup-gfx-main-allocator-block-size=16777216"
    "memorysetup-gfx-thread-allocator-block-size=16777216"
    "memorysetup-cache-allocator-block-size=4194304"
    "memorysetup-typetree-allocator-block-size=2097152"
    "memorysetup-profiler-bucket-allocator-granularity=16"
    "memorysetup-profiler-bucket-allocator-bucket-count=8"
    "memorysetup-profiler-bucket-allocator-block-size=4194304"
    "memorysetup-profiler-bucket-allocator-block-count=1"
    "memorysetup-profiler-allocator-block-size=16777216"
    "memorysetup-profiler-editor-allocator-block-size=1048576"
    "memorysetup-temp-allocator-size-main=4194304"
    "memorysetup-job-temp-allocator-block-size=2097152"
    "memorysetup-job-temp-allocator-block-size-background=1048576"
    "memorysetup-job-temp-allocator-reduction-small-platforms=262144"
    "memorysetup-temp-allocator-size-background-worker=32768"
    "memorysetup-temp-allocator-size-job-worker=262144"
    "memorysetup-temp-allocator-size-preload-manager=262144"
    "memorysetup-temp-allocator-size-nav-mesh-worker=65536"
    "memorysetup-temp-allocator-size-audio-worker=65536"
    "memorysetup-temp-allocator-size-cloud-worker=32768"
    "memorysetup-temp-allocator-size-gfx=262144"
-> applicationDidFinishLaunching()
Found 1 interfaces on host : 0) 10.0.0.218
Multi-casting "[IP] 10.0.0.218 [Port] 55000 [Flags] 2 [Guid] 2230572895 [EditorId] 0 [Version] 1048832 [Id] iPhonePlayer(8,Charless-MacBook-Pro.local):56000 [Debug] 0 [PackageName] iPhonePlayer [ProjectName] <no name>" to [225.0.0.222:54997]...
[libil2cpp] ERROR: Could not open /Users/charlesparker/Library/Developer/CoreSimulator/Devices/92D8AEF7-C54A-4306-8DF2-54FC08C6BA8A/data/Containers/Bundle/Application/55C78046-AACB-4DD0-941D-15A1C3423F48/rnun1.app/Frameworks/UnityFramework.framework/Data/Managed/Metadata/global-metadata.dat
   IL2CPP initialization failed

When I poke around, I see that the path in the error message exists up to .../UnityFramework.framework, but there is no Data directory beneath it.

cdiddy77 commented 2 years ago

Found a solution here : In xcode, Project Navigator | Unity-iPhone | select Data folder | in Target Membership, check UnityFramework

Now I have a different error:

Setting UIViewControllerBasedStatusBarAppearance to NO is no longer supported.
Apple actively discourages that, and all application-wide methods of changing status bar appearance are deprecated

-> applicationWillEnterForeground()
-> applicationDidBecomeActive()
[Subsystems] Discovering subsystems at path /Users/charlesparker/Library/Developer/CoreSimulator/Devices/92D8AEF7-C54A-4306-8DF2-54FC08C6BA8A/data/Containers/Bundle/Application/C6A0BD42-8342-4A60-B26E-EE7C8BC6B3AD/rnun1.app/Frameworks/UnityFramework.framework/Data/UnitySubsystems
GfxDevice: creating device client; threaded=1; jobified=1
Initializing Metal device caps: Apple iOS simulator GPU
Initialize engine version: 2021.2.5f1 (4ec9a5e799f5)
2022-01-18 20:47:48.119650-0800 rnun1[38553:7462830] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600001bfb6a0> F8BB1C28-BAE8-11D6-9C31-00039315CD46
2022-01-18 20:47:48.139772-0800 rnun1[38553:7462830]  HALC_ProxyObjectMap::_CopyObjectByObjectID: failed to create the local object
2022-01-18 20:47:48.140002-0800 rnun1[38553:7462830]  HALC_ShellDevice::RebuildControlList: couldn't find the control object
2022-01-18 20:47:48.930441-0800 rnun1[38553:7463028] fopen failed for data file: errno = 2 (No such file or directory)
2022-01-18 20:47:48.930795-0800 rnun1[38553:7463028] Errors found! Invalidating cache...
2022-01-18 20:47:50.223148-0800 rnun1[38553:7463028] fopen failed for data file: errno = 2 (No such file or directory)
2022-01-18 20:47:50.223879-0800 rnun1[38553:7463028] Errors found! Invalidating cache...
2022-01-18 20:47:50.470718-0800 rnun1[38553:7462512] Unbalanced calls to begin/end appearance transitions for <UnityDefaultViewController: 0x7fa1b70518d0>.
UnloadTime: 4.284932 ms

Nothing shows up in the UI

ryanjoneswork1999 commented 2 years ago

As far as I know, looking at the react-native unity and react-native unity view which this was modified from it doesn't support simulators and only physical devices.

HolovisSoftwareDev commented 2 years ago

Did you manage to resolve this?

azesmway commented 2 years ago

Did you manage to resolve this?

Hi, what exactly do you mean?

cdiddy77 commented 2 years ago

I don't use the simulator. My app needs a camera and so the simulator is pointless anyway.