react-native-unity-view
react-native-unity-view copied to clipboard
iOS Build crash
I'm trying to follow the README with an empty new project. It builds successfully to my iPad, but it immediately crashes. Sorry, I'm new to xCode, don't know whats going on.
From xCode:
2020-03-03 19:04:03.108 [info][tid:main][RCTRootView.m:293] Running application unityTest ({ initialProps = { }; rootTag = 1; }) 2020-03-03 19:04:03.162944-0300 unityTest[1736:1593257] [] nw_socket_handle_socket_event [C3.1:1] Socket SO_ERROR [61: Connection refused] 2020-03-03 19:04:03.164193-0300 unityTest[1736:1593257] [] nw_socket_handle_socket_event [C3.2:1] Socket SO_ERROR [61: Connection refused] 2020-03-03 19:04:03.164519-0300 unityTest[1736:1593260] [] nw_connection_get_connected_socket [C3] Client called nw_connection_get_connected_socket on unconnected nw_connection 2020-03-03 19:04:03.164569-0300 unityTest[1736:1593260] TCP Conn 0x2838f12c0 Failed : error 0:61 [61] 2020-03-03 19:04:18.711 [info][tid:com.facebook.react.JavaScript] Running "unityTest" with {"rootTag":1,"initialProps":{}} 2020-03-03 19:04:18.718125-0300 unityTest[1736:1593258] [] nw_socket_handle_socket_event [C5:1] Socket SO_ERROR [61: Connection refused] 2020-03-03 19:04:18.718994-0300 unityTest[1736:1593262] [] nw_connection_get_connected_socket [C5] Client called nw_connection_get_connected_socket on unconnected nw_connection 2020-03-03 19:04:18.719501-0300 unityTest[1736:1593262] TCP Conn 0x2838f4900 Failed : error 0:61 [61] 2020-03-03 19:04:18.742680-0300 unityTest[1736:1593056] Built from '2019.3/staging' branch, Version '2019.3.0f6 (27ab2135bccf)', Build type 'Release', Scripting Backend 'il2cpp' UnityFramework was compiled with optimization - stepping may behave oddly; variables may not be available. (lldb)


If it can help you, I have the same issue. I figured it commenting the line 102 _mainDisplay.surface->allowScreenshot = 1;
of file UnityAppControlle+Rendering.mm
I am having the same crash, but removing the _mainDisplay.surface->allowScreenshot = 1;
line does not solve my problem unfortunately.
EDIT: I got it to work, I forgot to add InitArgs(argc, argv);
to the main.m file.
@RemyLivewall can you share the code how to added InitArgs to main.m file?