mcpField
I
ionic-deep-links

ionic-deep-links

github.com/erkamyamanDevelopment1644 installsUpdated 1w ago
Repository

About ionic-deep-links

A guide for developers implementing deep links in Ionic and Capacitor apps. It covers custom URL schemes, iOS Universal Links, Android App Links, and routing links to app flows.

Key features

  1. 01Custom URL scheme guidance
  2. 02iOS Universal Links setup
  3. 03Android App Links setup
  4. 04Shared deep-link routing patterns
  5. 05Cold-start URL handling guidance

Use cases

  1. 01Opening password-reset links in an app
  2. 02Handling OAuth callbacks
  3. 03Routing invite and share links
  4. 04Testing links in iOS and Android emulators

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/erkamyaman/ionic-capacitor-skills --skill ionic-deep-links

After installing, type/ionic-deep-linksin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
android-app-links.md
custom-scheme.md
ios-universal-links.md
routing.md

Details

From the project README

Deep Links (URL schemes + Universal Links + App Links)

Three flavors of deep linking that you'll likely need together:

TypeLooks likeVerified byUse when
Custom schememyapp://reset-password?token=…NothingInternal flows, OAuth callbacks. Easy. Anyone can register the scheme.
iOS Universal Linkhttps://yourapp.com/reset-password?token=…apple-app-site-association file on your domainBranded links that should open the app or fall back to the web.
Android App Linkhttps://yourapp.com/reset-password?token=…assetlinks.json on your domainSame goal as Universal Links, on Android.

You usually want all three for a polished app: one URL works on iOS and Android (Universal/App), with custom schemes as a fallback for cases where verified linking isn't possible.

When to consult

Canonical URL shape

Pick one path prefix per concern and use it consistently across custom schemes, Universal Links, and App Links so the same router code handles all three:

ConcernCustom schemeUniversal/App Link
Auth (reset / OAuth callback / magic link)myapp://auth/<flow>?...https://yourapp.com/auth/<flow>?...
Invitesmyapp://invite/<code>https://yourapp.com/invite/<code>
Sharemyapp://share/<id>https://yourapp.com/share/<id>

The auth path is shared across ionic-firebase, ionic-supabase, and password-reset / OAuth-callback flows in this scaffold:

  • Magic link: https://yourapp.com/auth/finish-signin?...
  • Password reset: myapp://auth/reset-password?token=...
  • OAuth callback (Supabase): myapp://auth/callback#access_token=...

Routing logic in the deep-link handler matches on pathname.startsWith('/auth/') and delegates to the right flow.

Hard rules

  • ✅ Use @capacitor/app's appUrlOpen listener — it fires for all three flavors uniformly.
  • ✅ Host the AASA / assetlinks.json files at your domain root with the right Content-Type (application/json, no extension).
  • ✅ Test with xcrun simctl openurl (iOS sim) and adb shell am start -a android.intent.action.VIEW -d "<url>" (Android emulator).
  • ❌ Don't rely on custom schemes alone for password reset / OAuth — modern OS versions and email clients increasingly suppress them.
  • ❌ Don't forget to call App.getLaunchUrl() on cold-start — appUrlOpen may not fire reliably for cold opens (it does in many Capacitor versions, but the behavior is platform- and version-dependent). Belt-and-suspenders: always check getLaunchUrl() once at boot.

Library

npm install @capacitor/app
npx cap sync

Comments

Markdown supported