Taqlyn Flutter SDK (taqlyn_sdk)
Full guide: Flutter cookbook on the docs site.
Thin Flutter plugin that delegates to canonical native SdkCore
(packages/sdk-android, packages/sdk-ios). Pub name: taqlyn_sdk.
App / sample Dart imports this package only — never Play Install Referrer
or UIPasteboard types. Deferred Match stays in Kotlin/Swift.
Public API (sdk-contract)
await TaqlynSdk.configure(
clientId: 'app_…',
publicKeyId: 'pk_…',
options: SdkOptions(
linkProcessingMode: LinkProcessingMode.all, // all | webOnly | deferredOnly
env: 'sandbox',
),
);
final share = await TaqlynSdk.createShareLink(destinationPath: '/offer');
final deferred = await TaqlynSdk.resolveDeferred(); // DeferredLink?
TaqlynSdk.observePlatformLinks().listen((link) async {
// iOS: clipboard / UL. Android: referrer / App Links.
await TaqlynSdk.consume(link.linkId);
});
// Or `package:taqlyn_sdk/ios.dart` / `package:taqlyn_sdk/android.dart`.
await TaqlynSdk.setReadyForNavigation(true);
DeferredLink mirrors packages/sdk-contract: url, path, params,
linkId, matchType, isDeferred, campaign.
Architecture
Dart TaqlynSdk → MethodChannelNativeBridge (real plugin channel)
├─ Android FlutterPlugin → com.taqlyn.sdk.SdkCore
└─ iOS FlutterPlugin → TaqlynSDK.SdkCore
App / example code must use the MethodChannel bridge only. Unit tests may import package:taqlyn_sdk/testing.dart.
Optional soft helper: pub.dev taqlyn_nav_go_router (sibling packages/nav-go-router)
for go_router redirect races — no Match logic.
Platform setup checklist
iOS
Host AASA athttps://<host>/.well-known/apple-app-site-associationEnable Associated Domains (applinks:<host>) on the Runner targetCall afterWidgetsFlutterBinding.ensureInitialized()beforeconfigureForward Universal Links:TaqlynSdkPlugin.handleOpenURL(url)from AppDelegate / sceneNative SdkCore comes from publishedTaqlynSDK(CocoaPods / SPM). Host apps must not add a localpackages/sdk-iospath.Deployment target iOS 16+ (matches sdk-ios)
Android
Host assetlinks.json with Play App Signing SHA-256App Links intent filter +android:autoVerify="true"on the ActivityPlugin Gradle depends on Maven Centralcom.taqlyn:taqlyn-sdk(published with the Android SDK)Emulators often cannot exercise Play Install Referrer — use a real device
Example
See example/ — flow:
configure → resolveDeferred → setReadyForNavigation → observeLinks → consume
Soft-uses taqlyn_nav_go_router for a pending-link holder.
cd example && flutter run
# Optional dart-defines:
# --dart-define=TAQLYN_CLIENT_ID=app_test_…
# --dart-define=TAQLYN_PUBLIC_KEY_ID=pk_test_…
Public tunnel: docs/guides/public-demo.md, seed with ./scripts/demo-seed.sh.
Tests
# from packages/sdk-flutter
flutter test
- Fake
NativeBridgeproves ready-gate +DeferredLinkmapping - Mock
MethodChannelproves channel argument mapping - Source-guard:
example/libmust not containinstallreferrer/UIPasteboard
Native bridge host + example assemble (closes deferred / host risks)
# Android bridge → SdkCore (fake Install Referrer + sandbox ResolveClient)
cd android-host
./gradlew :bridge:testDebugUnitTest :bridge:assembleRelease
# Full Flutter host APK (plugin + example + sibling :taqlyn-sdk)
cd example && flutter build apk --debug
License
See LICENSE.
Libraries
- android
- Android-only Taqlyn listeners (App Links + Play Install Referrer).
- ios
- iOS-only Taqlyn listeners (Universal Links + clipboard deferred).
- taqlyn_sdk
- Taqlyn Flutter plugin — thin wrapper over native Android/iOS SdkCore.
- testing
- Test-only native bridge fakes. App / sample code must not import this.