Skip to content

Commit 00d809d

Browse files
Add pitfall: link tap dropped when its handler isn't registered
Iterable routes deep links by type/scheme, not through one catch-all handler: openUrl / plain URLs go to urlHandler, while action:// , itbl:// and custom-action push types go to customActionHandler. A tap that routes to an unset handler is silently dropped — no crash, no log — so an integration that registers only urlHandler looks complete but loses every custom-action link. Adds PITFALLS #20 (full Symptom/Cause/Fix) and a one-line cross-reference from SKILL.md deep-link rule 5. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 187c1e5 commit 00d809d

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

iterable-android/PITFALLS.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,3 +300,25 @@ hot-path subset; the full list lives here and is loaded on demand.
300300
wired but needs your `google-services.json` to build" beats a green build
301301
that silently does nothing. Never commit a placeholder; never disable a
302302
required plugin to compile.
303+
304+
## 20. Link tap routed to a handler that isn't set (silently dropped)
305+
306+
- **Symptom:** A push notification (or in-app / embedded message) opens the
307+
app but never navigates — the deep link silently does nothing. A registered
308+
`urlHandler` is never called for these taps.
309+
- **Cause:** Iterable routes an action by its **type / URL scheme**, not
310+
through one catch-all handler. Plain `http`/`https` links (and push actions
311+
of type `openUrl`) go to `IterableConfig.urlHandler``handleIterableURL()`.
312+
Links whose scheme is `action://` or `itbl://`, **and push actions whose
313+
type is a custom action**, go to `IterableConfig.customActionHandler`
314+
`handleIterableCustomAction()`. (`iterable://` URLs are SDK-reserved and
315+
handled internally.) If the handler an action routes to has **not** been set,
316+
the action is silently dropped — no crash, no log. So an integration that
317+
registers only `urlHandler` looks complete but loses every custom-action
318+
link; "opens the app but doesn't navigate" is the only symptom.
319+
- **Fix:** Register **both** `urlHandler` and `customActionHandler` on
320+
`IterableConfig`, unless you've confirmed the dashboard only ever sends
321+
`openUrl` / plain-URL actions. Don't assume one handler catches everything.
322+
When a link opens the app but doesn't navigate, suspect a missing
323+
`customActionHandler` first — the dashboard template likely carries the link
324+
in the action *type* rather than as an `openUrl`.

iterable-android/SKILL.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,10 @@ generating any non-trivial code.
183183

184184
5. **Custom deep-link schemes need `setAllowedProtocols(arrayOf("yourscheme"))`.**
185185
Without this the SDK refuses to dispatch the URL to your `UrlHandler` and
186-
silently drops the link.
186+
silently drops the link. Also register **both** `urlHandler` and
187+
`customActionHandler``action://`/`itbl://` links and custom-action push
188+
types route to the latter, and a tap to an unset handler is silently dropped
189+
(PITFALLS #20).
187190

188191
6. **Never hardcode the API key into a tracked file.** A *mobile* API key is
189192
safe to embed in the compiled app — that's its intended use — but it must

0 commit comments

Comments
 (0)