Skip to main content
This guide will help you install and set up the Linkrunner SDK in your Flutter application.

Requirements

  • Flutter 3.19.0 or higher
  • Dart 3.3.0 or higher
  • iOS 15.0+ / Android 5.0 (API level 21) and above

Installation

Step 1: Add the Package

Run the following command to add the latest version of the Linkrunner package to your project:
flutter pub add linkrunner
This command will automatically:
  • Add the latest version of linkrunner to your pubspec.yaml
  • Download and install the package and its dependencies

Step 2: Platform Specific Setup

Android Configuration

  1. Ensure your project’s minSdkVersion is at least 21 in your android/app/build.gradle file:
android {
    defaultConfig {
        minSdkVersion 21
        // other config...
    }
}
  1. Add the following permissions to your AndroidManifest.xml file:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  1. Backup Configuration
For Android apps, the SDK provides backup rules to exclude Shared Preferences data from backup. This prevents the retention of the Linkrunner install ID during reinstallation, ensuring accurate detection of new installs and re-installs. For detailed backup configuration instructions, please refer to the Android SDK Backup Configuration.

iOS Configuration

  1. Update your iOS deployment target to iOS 15.0 or higher in your ios/Podfile:
platform :ios, '15.0'
  1. Add the following to your Info.plist file for App Tracking Transparency:
<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads and improve your app experience.</string>

Next Steps

After installation, proceed to the Usage Guide to learn how to initialize and use the Linkrunner SDK in your Flutter application.
I