Coder Social home page Coder Social logo

curiousdustin / appsflyerframework Goto Github PK

View Code? Open in Web Editor NEW

This project forked from appsflyersdk/appsflyerframework

0.0 1.0 0.0 98.72 MB

AppsFlyer Apple SDK

Home Page: https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS

License: Other

Objective-C 98.19% Ruby 1.81%

appsflyerframework's Introduction

AppsFlyerFramework

Version Carthage Compatible

Table of contents

Introduction

AppsFlyer helps mobile marketers measure and improve their performance through amazing tools, really big data and over 2,000 integrations.

In order for us to provide optimal support, we would kindly ask you to submit any issues to [email protected]

When submitting an issue please specify your AppsFlyer sign-up(account) email, your app ID, production steps, logs, code snippets and any additional relevant information

Requirements

  • iOS 8.0+ / macOS 10.11+ / tvOS 9.0+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate AppsFlyer into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'AppsFlyerFramework'

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

To integrate AppsFlyerFramework 5.1.0 version or higher for Carthage into your Xcode project, specify it in your Cartfile:

binary "https://raw.githubusercontent.com/AppsFlyerSDK/AppsFlyerFramework/master/AppsFlyerLib.json"

Starting from the version 5.1.0 and higher, AppsFlyerLib.framework is a static framework. In order to successfully integrate it, please follow next steps:

  • In your project settings General -> Frameworks, Libraries and Embedded Content add AppsFlyerLib.framework and set Do not embed option for it;
  • Make sure you remove and do not add any static frameworks as input/output files for /usr/local/bin/carthage copy-frameworks Run script.

In order to integrate AppsFlyerFramework version 5.0.0 and lower, specify following contents in your Cartfile:

binary "https://raw.githubusercontent.com/AppsFlyerSDK/AppsFlyerFramework/master/AppsFlyerTracker.json"
  • Add AppsFlyerTracker.framework file to General -> Frameworks, Libraries and Embedded Content;
  • Make sure to add AppsFlyerFramework Build path as input file for /usr/local/bin/carthage copy-frameworks Run script.

Integration AppsFlyer

Basic iOS integration

  1. Add `pod 'AppsFlyerFramework' in Podfile
  2. Run pod update
  3. Implement in AppDelegate:
import AppsFlyerLib

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?
    
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        AppsFlyerTracker.shared().isDebug = true
        AppsFlyerTracker.shared().appsFlyerDevKey = "devkey";
        AppsFlyerTracker.shared().appleAppID = "1234567890"
        AppsFlyerTracker.shared().delegate = self
    }
}

func applicationDidBecomeActive(_ application: UIApplication) {        
        AppsFlyerTracker.shared().trackAppLaunch()
}
  1. Implement delegates:
extension AppDelegate: AppsFlyerTrackerDelegate {
    func onConversionDataSuccess(_ conversionInfo: [String : Any]) {
        print(conversionInfo)
    }
    
    func onConversionDataFail(_ error: Error) {
        print(error)
    }
    
    func onAppOpenAttribution(_ attributionData: [String : Any]) {
        print(attributionData)
    }
    
    func onAppOpenAttributionFailure(_ error: Error) {
        print(error)
    }
}    

Basic macOS integration(BETA)

  1. Add pod 'AppsFlyerFramework', '5.1.0' in Podfile
  2. Run pod update
  3. Implement in AppDelegate:
import AppsFlyerAttribution

@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
    func applicationWillFinishLaunching(_ notification: Notification) {
        AppsFlyerTracker.shared().isDebug = true
        AppsFlyerTracker.shared().appsFlyerDevKey = "devkey";
        AppsFlyerTracker.shared().appleAppID = "1234567890"
        AppsFlyerTracker.shared().delegate = self
        AppsFlyerTracker.shared().trackAppLaunch()
    }
}    

Note: AppsFlyerTracker setup must be in -applicationWillFinishLaunching: and not in -applicationDidFinishLaunching:

Note: -trackAppLaunch call in -applicationWillFinishLaunching:

  1. Implement delegates:
extension AppDelegate: AppsFlyerTrackerDelegate {
    func onConversionDataSuccess(_ conversionInfo: [String : Any]) {
        print(conversionInfo)
    }
    
    func onConversionDataFail(_ error: Error) {
        print(error)
    }
    
    func onAppOpenAttribution(_ attributionData: [String : Any]) {
        print(attributionData)
    }
    
    func onAppOpenAttributionFailure(_ error: Error) {
        print(error)
    }
}    

Changelog


You can find the release changelog here.



appsflyerframework's People

Contributors

af-fess avatar af-obodovskyi avatar andr-ggn avatar cbowns avatar coeur avatar curiousdustin avatar pablolerma avatar pyrou avatar rkrim avatar wesfieldj avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.