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:- Add the latest version of
linkrunnerto yourpubspec.yaml - Download and install the package and its dependencies
Step 2: Platform Specific Setup
Android Configuration
- Ensure your project’s
minSdkVersionis at least 21 in yourandroid/app/build.gradlefile:
- Add the following permissions to your
AndroidManifest.xmlfile:
Note: TheAD_IDpermission (<uses-permission android:name="com.google.android.gms.permission.AD_ID" />) is already included in the SDK and is required for collecting device identifiers (GAID). If your app participates in Designed for Families, you should revoke AAID and disable AAID collection. See the Disabling AAID Collection section in the usage guide for more details.
Revoking the AD_ID Permission
According to Google’s Policy, apps that target children must not transmit the Advertising ID. To revoke the AD_ID permission, use Flutter SDK version 3.5.0 and above. Children apps targeting Android 13 (API 33) and above must prevent the permission from getting merged into their app by adding a revoke declaration to their Manifest. Use thesetDisableAaidCollection() and isAaidCollectionDisabled() functions to disable AAID collection programmatically:
android/app/src/main/AndroidManifest.xml
Make sure to add
xmlns:tools="http://schemas.android.com/tools" to your manifest tag to use the tools:node="remove" attribute. If you disable AAID collection, you should also remove the AD_ID permission from your manifest to fully comply with Google Play’s Family Policy requirements.- Backup Configuration
iOS Configuration
- Update your iOS deployment target to iOS 15.0 or higher in your
ios/Podfile:
- Add the following to your
Info.plistfile for App Tracking Transparency: