I created NativeCallProxy.cs in Unity

    public class NativeCallProxy: MonoBehaviour
        public static extern void iOSUnloadUnityGame();

        public static void UnloadUnityGame()
            // Now we check that it's actually an iOS device/simulator, not the Unity Player. You only get plugins on the actual device or iOS Simulator.
            if (Application.platform == RuntimePlatform.IPhonePlayer)

and created two files in Assets/Plugin/iOS NativeCallProxy.m

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

@implementation UnityBridgeAPI
id<UnityBridgeNativeCallsProtocol> api = NULL;
+ (void) registerAPIForNativeCalls:(id<UnityBridgeNativeCallsProtocol>)proxy {
    api = proxy;

and NativeCallProxy.h

#ifndef NativeCallProxy_h
#define NativeCallProxy_h

@protocol UnityBridgeNativeCallsProtocol
- (void)unloadUnityGame;

@interface UnityBridgeAPI: NSObject
+ (void) registerAPIForNativeCalls:(id<UnityBridgeNativeCallsProtocol>)proxy;

#endif /* NativeCallProxy_h */

and when I try to compile exported project I get an error in Xcode.

enter image description here

How can I figure out it?


1 Answer 1


Just as the error says. You haven't defined "iOSUnloadUnityGame" that you have used in your NativeCallProxy class. You do have a method called "unloadUnityGame".


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .