Adobe Omniture Integration Problem

Hi!

I my company i have got the task to integrate Adobe Omniture in an app to track events and statistics.
Omniture comes with three files: ADBMobile.h, ADBMobileConfig.json and ADBMobileLibrary.a
ADBMobile.h is a Objective-C Header and I think ADBMobileLibrary.a is written in Objective-C as well.

I copied the three files to Assets/Plugins/iOS and wrote a C# class that shall call some functions from the library.
In my class i define the functions from ADBMobileLibrary.a like this:

[DllImport(“__Internal”)]
extern static string version();

In Xcode the Apple-Mach-O-Linker says that there is no function called “_version()”.
I also tried to add the ADBMobileLibrary.a in Build Phases → Link Binary With Libraries and i have done

#import “ADBMobile.h”

in UnityAppController.mm.

Now my question is if it is even possible to call raw Objective-C functions from Unity or do I have to write my own .a library written in C which has some wrapper functions that call the Objective-C functions from the actual Library?

EDIT:
I recognized that I call “version()” in C# as it would be a public function without a class. In Objective-C you would do [ADBMobile version]. How can i call this from C#?

You need to write a C/Objective-C wrapper, then your C# code calls the C layer. Something like this:

OmnitureWrapper.h:

#import <Foundation/Foundation.h>
#import "ADBMobile.h"

void _version();

OmnitureWrapper.m:

#import "OmnitureWrapper.h"

void _version() {
    [ADBMobile version];
}

C#:

#if UNITY_IPHONE
[DllImport("__Internal")]
private static extern void _version();
#endif

public static void Version() {
    #if UNITY_IPHONE
        if (Application.platform == RuntimePlatform.IPhonePlayer) {
            _version();
        }
    #endif
}

Also, I don’t think the automatic plugin import will include .json files, so that may not be included in your build automatically. See here: Unity - Manual: Native plug-ins for iOS

Also here: http://www.ad-dispatch.com/native-plugins-from-the-ground-up/