Test mode for deferred deep links
Test mode lets a developer check deferred deep links from a debug build in about two minutes, without uploading to Google Play. It works with the SDK you already have: no new version, no new option.
On this page 6
Why it exists
Seeing a deferred deep link work for real takes a build installed from Google Play (the link travels in the Play Install Referrer) or, on iPhone, a device match (opt-in). Both are slow to set up for a first check. Test mode answers one question only: is my app wired up so that a deferred link lands on the link's screen?
Before you start
- A debug build of your app with the Strait SDK set up and this workspace's publishable key (Dashboard → Setup → Your keys).
- In that debug build, a way to call the SDK's
checkDeferred(): a button on a debug screen is easiest.checkDeferred()is in every SDK; it re-runs the deferred check and hands the result to youronLinklistener, like the first launch does. It never counts an install.
// React Native / Expo
if (__DEV__) links.checkDeferred();// Flutter
if (kDebugMode) await links.checkDeferred();// Android (it blocks: call it off the main thread)
if (BuildConfig.DEBUG) Thread { links.checkDeferred() }.start()// iOS
#if DEBUG
links.checkDeferred()
#endif// Unity
if (Debug.isDebugBuild) await LinksBehaviour.Client.CheckDeferred();Use a button rather than calling it at launch: on the very first launch the SDK's own once-per-install check runs too, and its answer (no match, for a debug build) could arrive after the test answer.
Run a test
- In Dashboard → Setup → Test a link, turn on Test mode. That opens a 15-minute window for the workspace. Owners, admins and members can start it; viewers can watch.
- On your phone, tap any of your links. WhatsApp works.
- Install and open your debug build, then call
checkDeferred()(press your debug button). - Your app gets the link exactly like a real deferred link:
kind: 'deferred'andmatched: truein the sameonLinkcallback, with the link's URL. The reply'smatchMethodistest.
The dashboard follows along while the window is open:
- Tap on /your-link: where the tap came from and where Strait sent it.
- Test match: the moment your debug build checked in.
- App opens: the link's destination your app received.
- Events since the match: the workspace's events until the 15 minutes are up, so you can check
trackEvent()too. Events carry no device id, so on a workspace with live users theirs show up here as well.
When nothing matches
The dashboard says why, and so does the reply (reason):
| Reason | What it means | What to do |
|---|---|---|
no_tap |
Your app checked in, but no link was tapped since you turned test mode on. | Tap a link, then call checkDeferred() again. The window stays open. |
other_device |
Another phone checked in first. A window belongs to the first phone that checks in. | Run the test from that phone, or start a new test. |
no test field |
No window is open: it ran out (15 minutes), it was used, or it was turned off. | Turn test mode on again. |
Also check that the debug build uses this workspace's publishable key.
What it never does
- Count anything. A test match records no install and no app open, sends no
install.matchedwebhook, and the tap is not marked as matched. Your match rate and install numbers don't change. The tap itself counts as one tap, like any tap, and events your debug build sends count like any event. - Touch real installs. Only
checkDeferred()gets a test answer. The SDK's own first-launch check, the one your users' phones run, never does, so a real install during your test window is matched exactly as it is today. - Use a hardware or advertising ID. To tell your phone from another one during the window, Strait keeps a one-way hash of the device fields the SDK already sends (screen size, language, time zone, user agent). It is kept with the test for 90 days and used for nothing else.
- Last. A window closes after 15 minutes or after one match, whichever comes first.
Then test it for real
Test mode proves your app handles a deferred link. Before launch, run one real install too: React Native, or go-live checklist, step 3 for any platform.