How to integrate Framework in iOS exported game?

Hi,

I just exported my game project from Cocos Creator 2.0.1 to iOS project. Now I want to integrate AppsFlyerFrameworkwith it to track install on iOS devices.

I followed everything on their guide but it produces this error on self variable as you can see from screen shot

To fix this issue I try to follow Build Box tutorial but it generates more errors as you can see from following screen shots

I’m totally new to Objective-C and I don’t exactly know how to fix this issue except getting the help from experts here…

I’ll appreciate your help,

Thanks,

It looks like you are implementing the AppsFlyerTrackerDelegate in the AppDelegate interface, and then trying to assign an AppController class. I would assume to implement the delegate in the AppController interface.

First of all - delegate MUST support the interface, so if you wish to write something like:

[AppsFlyerTracker sharedTracker].delegate = self;

the “self” (which is pointer to instance of this class, in your case AppController) must support required interface. In your case, if you wish realizing interface methods in AppController class, then you must declare interface in AppController, not in AppDelegate:
AppController.h

@interface AppController : NSObject <UIApplicationDelegate, AppsFlyerTrackerDelegate>
{

}

then in AppController.mm you must implement all methods, required by AppsFlyerTrackerDelegate interface.

1 Like

WoW, It fixed the issue, thank you very much

I confirm it’s worked, thk so much.