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

undeclared identifiers #43

Closed cc5tudio closed 5 years ago

cc5tudio commented 5 years ago

I'm getting the following errors after following all the instructions:

Classes/AppDelegate.mm:45:13: Use of undeclared identifier 'UnityRegisterRenderingPlugin'

Classes/AppDelegate.mm:50:12: Use of undeclared identifier 'UnityGetMainWindow'

Classes/AppDelegate.mm:109:9: Use of undeclared identifier 'UnitySendMessage'

Classes/AppDelegate.mm:123:9: Use of undeclared identifier 'UnitySendMessage'

I can see these methods are in the file UnityInterface.h so I added an import line to the file but then I get linking errors.

Undefined symbols for architecture arm64: "_UnityGetMainWindow", referenced from: -[AppDelegate unityWindow] in AppDelegate.o "_OBJCCLASS$_VuforiaRenderDelegate", referenced from: objc-class-ref in AppDelegate.o "_OBJCCLASS$_UnityAppController", referenced from: objc-class-ref in AppDelegate.o "_UnitySendMessage", referenced from: -[AppDelegate sendMessageToUnity:] in AppDelegate.o -[AppDelegate sendMessageToUnity:parameter:] in AppDelegate.o "_VuforiaRenderEvent", referenced from: -[AppDelegate shouldAttachRenderDelegate] in AppDelegate.o "_UnityRegisterRenderingPlugin", referenced from: -[AppDelegate shouldAttachRenderDelegate] in AppDelegate.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Any ideas? Any help is appreciated.

cc5tudio commented 5 years ago

I figured out the issue on this. I did not properly do the step regarding the Prefix.pch.