yasirkula / UnityIonicIntegration

A guide to integrating Unity 3D content into an Ionic app and sending messages between them (for Android & iOS)(tested with Vuforia plugin)
104 stars 32 forks source link

Undefined symbols for architecture arm64 #57

Closed zoix closed 5 years ago

zoix commented 5 years ago

I understand that you have talked about the same error here and in some other threads, but this time the problem becomes trickier due to the symbols that Xcode are trying to find:

Undefined symbols for architecture arm64: "_uSendResultToIonic", referenced from: _IonicComms_uSendResultToIonic_m6A030EFB9AECE9C557303D758B7D6F09D29D12E6 in Bulk_Assembly-CSharp_0.o (maybe you meant: _IonicComms_uSendResultToIonic_m6A030EFB9AECE9C557303D758B7D6F09D29D12E6) "_uSendMessageToIonic", referenced from: _IonicComms_uSendMessageToIonic_m28E0488427154F9634F105FEF3EA996139A58433 in Bulk_Assembly-CSharp_0.o (maybe you meant: _IonicComms_uSendMessageToIonic_m28E0488427154F9634F105FEF3EA996139A58433) "_uNotifyUnityReady", referenced from: _IonicComms_uNotifyUnityReady_m54277C789EE5451D2965A5EDAFE85DB81254ECEC in Bulk_Assembly-CSharp_0.o (maybe you meant: _IonicComms_uNotifyUnityReady_m54277C789EE5451D2965A5EDAFE85DB81254ECEC) "_uHideUnity", referenced from: _IonicComms_uHideUnity_m40EBD5104C2DBC0CD0B0B011C91B7E8F5CCE21D3 in Bulk_Assembly-CSharp_0.o (maybe you meant: _IonicComms_uHideUnity_m40EBD5104C2DBC0CD0B0B011C91B7E8F5CCE21D3) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Screenshot here:

Screen Shot 2019-08-20 at 1 03 01 AM

As you may notice, the symbols are related to the uIonicComms.mm file, so I could not get rid of that easily.

I tried with Unity 2019.1 and Unity 2018.4 LTS. I am using Xcode 10.3. Empty projects from both sides (Unity and Cordova/Ionic), not even using Vuforia. The uIonicComms.mm file was properly located in Assets/Plugins/iOS and I double-checked every step on the README file.

Any clue on this will be seriously appreciated.

yasirkula commented 5 years ago

Can you see the uIonicComms.mm file in Unity's Xcode project? How about the combined Ionic Xcode project? If it is not shown in Ionic Xcode project, can you try adding the file manually to the Unity group in the combined Ionic Xcode project?

zoix commented 5 years ago

Sometimes we spend more than the expected trying to configure and resolve issues and we forget the basics. Then awesome people like @yasirkula come back and remind us of the obvious, and then everything works.

Tested in the latest versions of Cordova, Xcode and Unity and still working. Awesome plugin. Thank you for still supporting it.