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

Multiple commands produce

Open MuratDemirel opened this issue 10 months ago • 5 comments

I need to add a Unity project to my own project using @azesmway/react-native-unity. Source project using @azesmway/[email protected] To do this, I copied the Unity folder into my project, installed the @azesmway/react-native-unity package using yarn, and installed the pods. When I tried to run my project in Xcode, I encountered 56 errors. All of them are related to repeated copying in the headers section of the react-native-unity pod. Some of the files are as follows:

Allocator.h Array.h Assemply.h AssemplyName.h Assert.h Atomic.h COM.h ConditionVariable.h Debugger.h Encoding.h Enum.h Environment.h Error.h Event.h EventImpl.h Exception.h FastReaderReaderWriterLockImpl.h

Screen Shot 2024-03-26 at 23 23 09 PM Screen Shot 2024-03-26 at 23 23 36 PM

MuratDemirel avatar Mar 26 '24 20:03 MuratDemirel

You need to completely remove everything that relates to Unity in XCode and only then install a new one according to the instructions

azesmway avatar Mar 27 '24 05:03 azesmway

I've created a brand new react native project and did everything in the instructions step by step. Multiple commands errors fixed but now have i another errors.

Screenshot 2024-03-28 at 03 22 02

MuratDemirel avatar Mar 28 '24 00:03 MuratDemirel

all errors on the screenshot refer only to Unity - the plugin does not use such errors

azesmway avatar Mar 28 '24 03:03 azesmway

@MuratDemirel how did you fixed it?

jannisringwald avatar Jun 11 '24 09:06 jannisringwald

Just wanted to chime in here after I ran across this exact same error. The solution is to delete and extra Headers folder that might be in your ./unity/builds/ios/ folder. In my case i had a Headers folder that contained the exact same files as my ./unity/builds/ios/Unityframework.framework/Headers/* folder.

Deleting the duplicated header files fixed this issue for me. The ONLY thing in the unity/builds/ios folder should be the UnityFramework.framework folder.

Opening the project and selecting the pods project and then the react-native-unity pod, selecting "Build Phases" and then Headers->Public showed the extra header entries:

Before After
Screenshot 2024-09-06 at 1 37 32 PM Screenshot 2024-09-06 at 1 55 48 PM

markrickert avatar Sep 06 '24 20:09 markrickert