react-native-unity-view icon indicating copy to clipboard operation
react-native-unity-view copied to clipboard

Not working on iOS Xcode version(10.1) RegisterMonoModules.h' file not found

Open balu3083 opened this issue 5 years ago • 20 comments

Hi, I have tried to implement this module on react-native it is working fine in android but when I try to run on iOS I am getting error please check the below log "/Users/emvigo/Documents/Artist-Unity/Chasingcarrotdemo/node_modules/react-native-unity-view/ios/UnityUtils.mm:1:10: 'RegisterMonoModules.h' file not found"

Xcode Version: 10.1 (10B61) Mac OS: 10.14(mojave)

"dependencies": { "react": "16.6.3", "react-native": "0.58.4", "react-native-unity-view": "^1.3.3" }

Thanks Balakrishnan

balu3083 avatar Feb 21 '19 10:02 balu3083

What scripting backend you are using?

You can find this setting here:

Unity > File > Build Settings > iOS > Player Settings > Other Settings > Configuration > Scripting Backend

screenshot 2019-02-21 at 12 03 54

JanOwiesniak avatar Feb 21 '19 11:02 JanOwiesniak

Hi, The above settings are same. I found another issue on my unity export build "UnityConfig.xcconfig" file is not generating when I export the ios build from unity. I used the same Cube project.

Thanks Balakrishnan

balu3083 avatar Feb 22 '19 05:02 balu3083

@balu3083 do you still need any help here or is your problem already solved?

JanOwiesniak avatar Mar 15 '19 08:03 JanOwiesniak

I ran into this issue today trying to build out a project in Xcode by following the setup steps laid out on GitHub. I'm going to try and build this out in Android Studio.

mikeyamato avatar Apr 10 '19 15:04 mikeyamato

Same as @mikeyamato. Is the UnityConfig.xcconfig supposed to be copied as is from the demo repo? Or does it need to be modified somehow with variables for the current project?

talyh avatar May 13 '19 20:05 talyh

@talyh UnityConfig.xcconfig must be copied from the demo project (and often need adjustments depending on your project dependencies).

JanOwiesniak avatar May 14 '19 07:05 JanOwiesniak

@JanOwiesniak - thanks. I've followed the steps in the README, including step 4 for iOS Build, which is about "Setting .xcconfig to project.". This is a very basic project, just to see if the library will work, so my RN app is what you'd get from react-native init. There are no additional dependencies or anything. I assume no other changes toUnityConfig.xconfig in this scenario, right?

Looking at the demo again, I noticed that my UnityExport was created at the wrong place. The path for it is "../../ios", so it's assuming "RNproject >> unity >> projectFolderName >> Assets". My structure was just "RNProject >> unity >> Assets", which messed up the whole thing.

I'll start from scratch to see if I can get it to work now. 😄 If there's any additional setup I'd need to do at UnityConfig.xconfig, would you please point me to the changes needed?

talyh avatar May 14 '19 16:05 talyh

@talyh if you just want too see if "things are working", it is probably easier to use the demo project as a starting point. The dependencies are not up to date but it's way easier to get it up and running than the standalone library here.

JanOwiesniak avatar May 14 '19 16:05 JanOwiesniak

@JanOwiesniak - The demo is not working for me, as described at https://github.com/f111fei/react-native-unity-demo/issues/37.

I just finished running another pass of a blank RN project, super simple Unity project, and to the best of my perception followed the README steps to the letter (only deviation was adding ios/UnityExport to .gitignore. This is done using Unity 2019.1.0f2, RN 0.59.8 and RNUV 1.3.3

When building, I get several Semantic Issues inside UnityExport. image

This is separate from the problem tracked here, so I'm glad to open a separate issue if there's really something wrong (versus me doing something wrong). For reference, my basic project is here: https://github.com/talyh/RNUnityIntegrationTest-RNSide and https://github.com/talyh/RNUnityIntegrationTest-UnitySide

talyh avatar May 14 '19 17:05 talyh

@talyh Were you ever able to fix the errors you have above? Looking to use 2019.1 and the rest of your versions with this package.

abrowne2 avatar May 21 '19 16:05 abrowne2

@abrowne2 - I wasn't. At this point, I'm inclined not to try and use RN with Unity.

talyh avatar May 21 '19 17:05 talyh

I have additionally ran into this issue: using react-native 59.8

georgewwindsor avatar May 24 '19 08:05 georgewwindsor

As a workaround, use older version of Unity. I use 2018.2.17f (22 Nov, 2018 release) and it works fine. https://unity3d.com/get-unity/download/archive

ziyoshams avatar May 31 '19 20:05 ziyoshams

Encountering the same il2cpp and RegisterMonoModules missing headers issue. Using 2019.N (tried on 3, 6, and 10) with RN 0.59.9. Downgrading below 2019 is not acceptable for our use case due to lost features. Will continue exploring this problem, as well as other options beyond this project (Unity as a standalone library).

zbagley avatar Aug 05 '19 01:08 zbagley

have you tried to add -DNET_4_0 to OTHER_CFLAGS in UnityConfig.xxconfig?

igrir avatar Aug 05 '19 06:08 igrir

@igrir I personally have tried that with no luck. The libil2cpp library appears to be included as well: image

So I'm just trying to figure out why it's using an incorrect namespace: image

zbagley avatar Aug 05 '19 12:08 zbagley

@talyh Possibly relevant: https://github.com/f111fei/react-native-unity-view/issues/118#issuecomment-518304297

Unity reverted the OpenGLES2 settings change which resolved this issue and might be worth looking into.

zbagley avatar Aug 05 '19 17:08 zbagley

@igrir I personally have tried that with no luck. The libil2cpp library appears to be included as well: image

So I'm just trying to figure out why it's using an incorrect namespace: image

how to get libil2cpp.a? where is it? after I built export unity, i got libil2cpp but it is folder, not be file.a image

chellongCoder avatar Sep 26 '19 08:09 chellongCoder

@chellongCoder the file should be here

Screenshot 2019-09-26 at 10 26 31

XCode Version 10.3 (10G8) Unity 2018.4.2f1 react-native-unity-view 1.3.3

JanOwiesniak avatar Sep 26 '19 08:09 JanOwiesniak

I am having the same issues. I have tried all of the above and they do not work. Does anyone have any other ideas?

laura3100 avatar Oct 25 '19 17:10 laura3100