f111fei / react-native-unity-view

Show an unity view in react native
MIT License
402 stars 102 forks source link

iOS Simulator with Unity 2018.3.x #115

Open joel-bitar opened 5 years ago

joel-bitar commented 5 years ago

We are trying to upgrade our Unity version from 2018.2.21 to 2018.3.14. We got it to work for android and iOS devices by modifying the editor scripts a bit. For iOS we remove DynamicLibEngineAPI-functions.h and DynamicLibEngineAPI.mm from the xcode-project and it seems to run fine on devices.

When using Unity 2018.2.21 we were able to export to simulator by setting PlayerSettings.iOS.sdkVersion = iOSSdkVersion.SimulatorSDK; in Build.css. This doesn't seem to work after the update. First of it seems like the DynamicLibEngineAPI is used by Unity when setting Simulator as build target. So we tried to add the files back for simulator and added a Copy Files phase in xcode to copy in libiPhone-lib.dylib (Don't know if this is needed, or the correct way to do it? But before doing this it whined that it couldn't find the lib). But now it just crashes with some EXC_BAD_ACCESS exception when calling UnityInitRuntime in UnityUtils.mm.

So did anyone get the iOS simulator working with Unity 2018.3 or any later version?

Edit: Oh and yeah I know it says in the readme to not run in Simulator. But this worked fine with previous releases of Unity and is something we would like to be able to continue with if possible :/

kevinsperrine commented 5 years ago

@joel-bitar Were you able to make any progress here? I'd like to be able to get a simulator build working as it just helps the overall development processes, but I've made no progress so far.

joel-bitar commented 5 years ago

No, we didn't find any solution so far so we gave up on it for now. Might have a look at it again when we have more time or if anyone has any idea it would be great.