Skip to main content

Testing and Troubleshooting

Deferred flow testing has platform constraints: full attribution path depends on store redirect chain.

Deferred flow constraints

  • Deferred matching is first-launch oriented.
  • Runtime callbacks do not re-trigger deferred matching logic.
  • Flutter bridge does not expose session reset API in 1.0.1.
  1. Uninstall app from device/simulator.
  2. Open a Detour link.
  3. Install app and launch.
  4. Verify initial intent/result route in your UI logs.
  5. Relaunch app and confirm deferred behavior is not repeated.
adb shell am start -a android.intent.action.VIEW \
-d "https://<your-link-domain>/<link-token>" \
<your.package.name>

Android custom scheme

adb shell am start -a android.intent.action.VIEW \
-d "detour-flutter-example://products/42?source=scheme" \
<your.package.name>

iOS custom scheme (simulator)

xcrun simctl openurl booted "detour-flutter-example://products/42?source=scheme"
xcrun simctl openurl booted "https://<your-link-domain>/<link-token>"

Platform-specific notes

iOS

note

Clipboard matching requires that you copy the link to your clipboard before installing. Ensure shouldUseClipboard: true is set in DetourConfig and that the copy-link feature is enabled in the Detour dashboard for your iOS configuration.

Android

Install referrer click_id is often unavailable in local/dev-store scenarios. In that case matching falls back to probabilistic flow.

Once your app is installed, clicking a Detour link in a messaging or notes app should open it directly. If it does not, your Android certificate may be misconfigured. Ensure you use the correct SHA-256 fingerprint in the Detour dashboard:

How you install the appSHA-256 to use
Directly from a built APK/AABDebug or release keystore on your machine
Google Play Internal Testing (installing via the Store)Play Store App Signing Key
Local development (flutter run)Debug keystore (on your computer)

Common issues

  • No match found (404)

    • Check timestamps — the click may be older than the match window (15 minutes).
    • Confirm the click was recorded in your Detour dashboard.
    • On Android deterministic flow: confirm click_id is present in the install referrer.
  • 429 Too Many Requests

    • Use staging API keys for heavy testing. Avoid sending many requests from many devices using the same key.
  • NOT_CONFIGURED platform error

    • Call DetourService.start(...) or DetourFlutterPlugin.configure(...) before resolveInitialLink() / processLink().
  • iOS clipboard not read

    • Ensure shouldUseClipboard: true is set in DetourConfig.
    • Ensure the copy-link feature is enabled in the Detour dashboard for your iOS app configuration.
    • The link must be copied to the clipboard before the app is opened — the clipboard is only read during resolveInitialLink().
  • UNSUPPORTED_EVENT error on logEvent

    • Flutter API accepts only predefined DetourEventName values.
  • Deferred link not returned on subsequent test runs

    • Deferred matching is first-launch based; reinstall app for clean re-test.

Debugging

  • Android:
    • adb logcat | grep -i detour
  • iOS simulator:
    • xcrun simctl spawn booted log stream --predicate 'subsystem == "com.swmansion.detour"'

For full runnable setup and commands, use Examples.