Skip to content

rudderlabs/integration-swift-appsflyer

Repository files navigation

RudderStack
The Customer Data Platform for Developers

Website · Documentation · Community Slack


AppsFlyer Integration

The AppsFlyer integration allows you to send your event data from RudderStack to AppsFlyer for mobile measurement and user acquisition.

Installation

Swift Package Manager

Add the AppsFlyer integration to your Swift project using Swift Package Manager:

  1. In Xcode, go to File > Add Package Dependencies
add_package_dependency
  1. Enter the package repository URL: https://github.com/rudderlabs/integration-swift-appsflyer in the search bar
  2. Select the version you want to use
select_package
  1. Select the target to which you want to add the package

  2. Finally, click on Add Package

    select_trget

Alternatively, add it to your Package.swift file:

// swift-tools-version:5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "YourApp",
    products: [
        .library(
            name: "YourApp",
            targets: ["YourApp"]),
    ],
    dependencies: [
        // Add the AppsFlyer integration
        .package(url: "https://github.com/rudderlabs/integration-swift-appsflyer.git", .upToNextMajor(from: "<latest_version>"))
    ],
    targets: [
        .target(
            name: "YourApp",
            dependencies: [
                .product(name: "RudderIntegrationAppsFlyer", package: "integration-swift-appsflyer")
            ]),
    ]
)

Supported Native AppsFlyer SDK Version

This integration supports AppsFlyer iOS SDK version:

6.17.0+

Platform Support

The integration supports the following platforms:

  • iOS 15.0+
  • macOS 12.0+
  • tvOS 15.0+
  • watchOS 8.0+

Usage

Initialize the RudderStack SDK and add the AppsFlyer integration:

import RudderStackAnalytics
import RudderIntegrationAppsFlyer

class AppDelegate: UIResponder, UIApplicationDelegate {

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

        // Initialize the RudderStack Analytics SDK
        let config = Configuration(
            writeKey: "<WRITE_KEY>",
            dataPlaneUrl: "<DATA_PLANE_URL>"
        )
        let analytics = Analytics(configuration: config)

        // Add AppsFlyer integration
        analytics.add(plugin: AppsFlyerIntegration())

        return true
    }
}

Replace:

  • <WRITE_KEY>: Your project's write key from the RudderStack dashboard
  • <DATA_PLANE_URL>: The URL of your RudderStack data plane

Contact us

For more information:

Follow Us

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages