Upgrading to New AF API (v2.5.3.x) SDK

Remove Old SDK

  • Remove the .a and the header file from the project.
  • Make sure the files were not copied into the project library. (Click on the project in x-code and select “show in Finder”. If the old SDK (.a and header files exists there please delete them as well)
  • Delete the #import AppsFlyer.h line from your appDelegate file.
  • Clean and build your project and it should throw few errors.

Import New SDK

  • Drag both the library and the header file into the project
  • Import AppsFlyerTracker.h file
  • In your "didFinishLaunchingWithOptions" add the following lines:
    • [AppsFlyerTracker sharedTracker].appsFlyerDevKey = @"Dev_Key";
    • [AppsFlyerTracker sharedTracker].appleAppID = @"App_ID";
  • Replace the app open events API ( located at "applicationDidBecomeActive" ): 

[AppsFlyer notifyAppID:@"App_ID;Dev_Key"]; with [[AppsFlyerTracker sharedTracker] trackAppLaunch];

  • Replace the in-app events API: 

[AppsFlyer notifyAppID:@"App_ID;Dev_Key"]; with [[AppsFlyerTracker sharedTracker] trackEvent:@"" withValue:@""];

Was this article helpful?
2 out of 2 found this helpful