- Home /
iOS framework integration
Hi all!
I've made a framework in Objective-C and now i want to use it like a plugin in mine Unity project.
Now, for making it possible i've read a lot of things and i basically know the DllImport etc, but i've some doubts about the way of doing it (and maybe also with the code).
This is mine code in C# for calling the framework (that is pretty easy, just return a string):
using UnityEngine;
using System.Collections;
using System.Runtime.InteropServices;
public class CallPlugin : MonoBehaviour {
[DllImport ("__Internal")]
private static extern string _append(string test);
public string append (string test) {
Debug.Log(_append(test));
}
void Start () {
append("test");
}
}
So i pass a string and the framework just print this string on screen with other random words that i've set in the framework. I've also placed all the framework file (without folder) in Assets/Plugins/iOS but for now i cant see the things working like i want :)
Maybe im wrong in somethings?
Thank you all for your support ;)
P.s. Im using Unity 4
Your answer
Follow this Question
Related Questions
Custom swift framework in Unity iOS game 0 Answers
Using a .embeddedframework (ios) in Unity - EntryPointNotFoundException 0 Answers
iOS C++ plugin that itself relies on framework 1 Answer
SystemInfo.batteryStatus integration 2 Answers
UniClipboard iOS Compile issue - Undefined symbols for architecture armv7 0 Answers