Quantcast
Channel: Questions in topic: "native plugin"
Viewing all articles
Browse latest Browse all 376

Execute native ios code in unity

$
0
0
I want to execute native iOS code in unity. For this I have added two files in /plugins/ios. 1. ViewController.h 2. ViewController.m Code for each file represented as under. **ViewController.h** @interface ViewController -(void)sampleMethod; @end **ViewController.m** #import "ViewController.h" @implementation ViewController -(void)sampleMethod { NSLog(@"Sample Method Execute"); } @end For C# file I have added following code [DllImport("__Internal")] private static extern void sampleMethod(); and call to above method sampleMethod(); When I am export project for iOS, xCode give me following error that I can't able to understand. ![alt text][1] I can't able to understand how to solve this problem? Please give some suggestion here. [1]: /storage/temp/34651-screenshot+2014-11-02+13.02.11.png

Viewing all articles
Browse latest Browse all 376

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>