Skip to content
GitHubGet started

Installation

Flutter SDK

Add flutter_dectog to a Flutter app, with the requirements, the dependency ranges, iOS packaging through Swift Package Manager or CocoaPods and the Android toolchain the plugin supports.

flutter_dectog is the DecTog SDK for Flutter. It opens DecTog links in your app, registers the first launch for install attribution, sends post-install events and can create links from the app. The package is MIT licensed.

Requirement Value
Flutter 3.29 or newer (flutter: ">=3.29.0")
Dart 3.7 or newer (sdk: ">=3.7.0 <4.0.0")
iOS 15.0 or newer
Android 7.0 (API 24) or newer
Account A DecTog SDK key (dtg_pub_ followed by 32 hex characters) from the dashboard’s Settings page, under SDK keys. A new account has one. Never ship the account key (dtg_…): it can delete links.

The SDK targets iOS and Android. On other platforms it compiles and the link API works, but the install registration sends no referrer, no pasteboard URL and no device tier.

flutter pub add flutter_dectog

or in pubspec.yaml:

pubspec.yaml
dependencies:
flutter_dectog: ^1.0.0

The ranges are deliberately wide so the SDK drops into apps that already pin these packages. Each floor is the release that introduced the API the SDK calls; each ceiling is the next major version.

Package Range Why the floor
app_links >=6.0.0 <8.0.0 6.0.0 added uriLinkStream and getInitialLink()
connectivity_plus >=6.0.1 <8.0.0 6.0.1 made checkConnectivity() return a list
device_info_plus >=11.2.0 <14.0.0 11.2.0 added IosDeviceInfo.modelName
package_info_plus >=8.3.0 <11.0.0 8.3.0 added installerStore, installTime, updateTime and buildSignature
http >=1.0.0 <2.0.0
path_provider >=2.0.0 <3.0.0
rxdart >=0.27.0 <0.29.0
crypto >=3.0.0 <4.0.0 Request signing

If your app pins one of these packages outside its range, flutter pub get reports the conflict and nothing is installed. Widen your own pin or wait for the SDK release that covers the newer major.

The iOS side of the plugin is a Swift package in ios/flutter_dectog (Package.swift, Swift tools 5.9, platform iOS 15.0, library product flutter-dectog). Projects that resolve Flutter plugins through Swift Package Manager need no extra steps. Projects that build with CocoaPods get the same sources through ios/flutter_dectog.podspec (Swift 5.0, s.dependency 'Flutter').

Package.swift declares no dependency on the Flutter framework package. This is deliberate. The Flutter tool vends the Flutter module to plugin packages through its generated package and framework search paths, so a manifest that depended on ../FlutterFramework would only resolve inside the tool’s generated package directory. It would also break CocoaPods builds that reference the package at its real path and pin host apps to Flutter 3.44 or newer. Several widely used plugins ship the same way.

What the package links and bundles:

  • AdServices is linked for the Apple Search Ads attribution token (linkedFramework in Swift Package Manager, weak_frameworks in CocoaPods). The Swift code guards it with canImport and #available(iOS 14.3, *) and returns nothing on the simulator. It is only used when collect names appleSearchAdsToken. The advertising id is a separate package, flutter_dectog_adid; see Device data and privacy.
  • PrivacyInfo.xcprivacy, the Apple privacy manifest, is processed as a package resource (Swift Package Manager) or shipped in the flutter_dectog_privacy resource bundle (CocoaPods). See Device data and privacy for its contents.

There are no Info.plist or AppDelegate changes for the SDK itself. Universal Links and custom schemes are covered in Platform setup.

The package ships llms.txt at its root: every public type and member, the link URLs the SDK recognizes, how to route an install and the init snippet, in one file. An agent working in your app finds it offline in the pub cache, in the directory .dart_tool/package_config.json lists for flutter_dectog. It is generated from the same source as the API reference.

  1. Platform setup: Universal Links, App Links and custom schemes.
  2. Initialize and handle links: DectogConfig and the link stream.
  3. Install attribution: what onAppInstalled delivers.