I’ve been scouring the internet/these forums for an answer to this to no avail. I’m sorry if this has already been answered.
I’ve been working on creating an (internal) API at my company and I’ve written the API in native iOS and Android so far. I’m trying to port it to Unity and to reduce code duplication, I’m making a Unity plugin that calls/uses the native libraries. I’ve gotten it all done in Android and I’m almost done with the iOS version.
Here’s my problem, I have some calls in the iOS that call a server. When the call comes back I need to send a message back to Unity with the json’d data. From what I’ve read I need to call:
UnitySendMessage(const char* obj, const char* method, const char* msg)
The problem is that this function doesn’t exist when I’m running the iOS code natively without Unity. I could just write in/uncomment the line that calls this function whenever I move the library into the Unity code, but that one step I’m bound to forget at some point. Can anyone tell me where the definition of this function is and how I can include it in my native libraries? I found a definition in “iPhone_target_Prefix.pch” but I cannot seem to include this file into the native code and still compile.
Thanks for taking the time to read!