Skip to content
maui-deep-linking logo

.NET MAUI Deep Linking

maui-deep-linking

Guide for implementing deep linking in .NET MAUI apps. Covers Android App Links with intent filters, Digital Asset Links, and AutoVerify; iOS Universal Links with Associated Domains entitlements and Apple App Site Association files; custom URI schemes; and domain verification for both platforms. ...

davidortinau/maui-skills0installs173stars

SKILL.md

Full skill instructions

.NET MAUI Deep Linking

Platform Gotchas

Android

  • AutoVerify = true is required on the IntentFilter for App Links (not just deep links). Without it, Android shows a disambiguation dialog instead of opening your app directly.
  • Handle intent in both OnCreate and OnNewIntent. OnCreate fires for cold starts; OnNewIntent fires when the app is already running. Missing either means links silently fail in one scenario.
// ❌ Only handles cold-start links
protected override void OnCreate(Bundle? savedInstanceState)
{
    base.OnCreate(savedInstanceState);
    HandleDeepLink(Intent);
}

// ✅ Handles both cold-start and warm-start links
protected override void OnCreate(Bundle? savedInstanceState)
{
    base.OnCreate(savedInstanceState);
    HandleDeepLink(Intent);
}
protected override void OnNewIntent(Intent? intent)
{
    base.OnNewIntent(intent);
    HandleDeepLink(intent);
}
  • SHA-256 fingerprint must match the signing key used for the build you're testing. Debug and release builds use different keys — update assetlinks.json accordingly or verification silently fails.
  • Test verification status with:
    adb shell pm get-app-links com.example.myapp
    
    Look for verified status, not just ask.

iOS

  • ⚠️ Universal Links do NOT work in the Simulator. You must test on a physical device.
  • AASA changes take up to 24 hours to propagate through Apple's CDN (iOS 14+). During development, use the ?mode=developer query param or Apple's CDN diagnostics: swcutil dl -d example.com.
  • Handle all three entry points: FinishedLaunching, ContinueUserActivity, and SceneWillConnect. Missing any one causes links to fail for specific app states (cold start, background resume, or scene-based launch).
  • applinks: prefix is required in the Associated Domains entitlement. Writing just example.com instead of applinks:example.com silently fails.

Common Mistakes

Forgetting MainThread.BeginInvokeOnMainThread

Deep link callbacks can fire on background threads. Shell navigation must run on the main thread.

// ❌ May crash — GoToAsync called off the main thread
static void HandleUniversalLink(string? url)
{
    if (string.IsNullOrEmpty(url)) return;
    Shell.Current.GoToAsync(MapToRoute(url));
}

// ✅ Dispatch to main thread
static void HandleUniversalLink(string? url)
{
    if (string.IsNullOrEmpty(url)) return;
    MainThread.BeginInvokeOnMainThread(async () =>
        await Shell.Current.GoToAsync(MapToRoute(url)));
}

Route not registered before navigation

Register Shell routes in AppShell constructor before any deep link can fire. If the route doesn't exist, GoToAsync throws silently or navigates to root.

Custom URI schemes vs. App Links / Universal Links

ApproachVerifiedFallback to browserRecommended
Custom URI scheme (myapp://)NoNoOnly for app-to-app communication
Android App Links (https://)YesYes✅ Production web links
iOS Universal Links (https://)YesYes✅ Production web links

⚠️ Custom URI schemes are not verified — any app can register the same scheme. Use https:// App Links / Universal Links for user-facing URLs.


Debugging Checklist

  • Android: IntentFilter has AutoVerify = true on MainActivity
  • Android: assetlinks.json at /​.well-known/ with correct SHA-256 for current signing key
  • Android: Intent handled in both OnCreate and OnNewIntent
  • Android: Verified with adb shell pm get-app-links
  • iOS: applinks:example.com in Associated Domains entitlement (not just example.com)
  • iOS: AASA file at /​.well-known/​apple-app-site-association with correct Team ID
  • iOS: All three lifecycle entry points handled
  • iOS: Tested on physical device (not simulator)
  • Shell routes registered before deep link callbacks fire
  • Navigation dispatched to main thread

More skills from davidortinau

maui-aspire logo
davidortinau/maui-skills

maui-aspire

Guide for .NET MAUI apps consuming .NET Aspire-hosted backend services. Covers AppHost configuration, service discovery for mobile clients, HttpClient DI setup, Entra ID authentication with MSAL.NET for calling protected APIs, development workflow (Aspire dashboard + MAUI debugging), Blazor Hybri...

173 0
View
maui-maps logo
davidortinau/maui-skills

maui-maps

Guidance for adding map controls, pins, polygons, polylines, geocoding, Google Maps API key configuration, and platform setup in .NET MAUI apps using Microsoft.Maui.Controls.Maps. USE FOR: "add map", "map control", "map pins", "polygons on map", "polylines", "geocoding", "Google Maps API key", "M...

173 0
View
maui-hybridwebview logo
davidortinau/maui-skills

maui-hybridwebview

Guidance for embedding web content in .NET MAUI apps using HybridWebView, including JavaScript–C# interop, bidirectional communication, raw messaging, and trimming/NativeAOT considerations. USE FOR: "HybridWebView", "JavaScript interop", "embed web content", "JS to C# interop", "C# to JavaScript"...

173 0
View
maui-safe-area logo
davidortinau/maui-skills

maui-safe-area

.NET MAUI safe area and edge-to-edge layout guidance for .NET 10+. Covers SafeAreaEdges property, SafeAreaRegions enum, per-edge control, keyboard avoidance, Blazor Hybrid CSS safe areas, migration from legacy APIs, and platform-specific behavior for Android, iOS, and Mac Catalyst. USE FOR: "safe...

173 0
View
maui-app-lifecycle logo
davidortinau/maui-skills

maui-app-lifecycle

.NET MAUI app lifecycle guidance covering the four app states (not running, running, deactivated, stopped), cross-platform Window lifecycle events, backgrounding and resume behaviour, platform-specific lifecycle mapping for Android and iOS/Mac Catalyst, and state-preservation patterns. USE FOR: "...

173 0
View
maui-collectionview logo
davidortinau/maui-skills

maui-collectionview

Guidance for implementing CollectionView in .NET MAUI apps — data display, layouts (list & grid), selection, grouping, scrolling, empty views, templates, incremental loading, swipe actions, and pull-to-refresh. USE FOR: "CollectionView", "list view", "grid layout", "data template", "item template...

173 0
View
maui-sqlite-database logo
davidortinau/maui-skills

maui-sqlite-database

Add SQLite local database storage to .NET MAUI apps using sqlite-net-pcl. Covers data models with ORM attributes, async database service with lazy init, DI registration, WAL mode, and file management. Works with any UI pattern (XAML/MVVM, C# Markup, MauiReactor). USE FOR: "SQLite database", "loca...

173 0
View
maui-dependency-injection logo
davidortinau/maui-skills

maui-dependency-injection

Guidance for dependency injection in .NET MAUI apps — service registration, lifetime selection (Singleton/Transient/Scoped), constructor injection, automatic resolution via Shell navigation, explicit resolution patterns, platform-specific registrations, and testability best practices. USE FOR: "d...

173 0
View
maui-custom-handlers logo
davidortinau/maui-skills

maui-custom-handlers

Guide for creating custom .NET MAUI handlers, customizing existing handlers with property mappers, and implementing platform-specific native views. Covers PrependToMapping/ModifyMapping/AppendToMapping, PropertyMapper, CommandMapper, partial handler classes, and handler registration. USE FOR: "cu...

173 0
View
maui-performance logo
davidortinau/maui-skills

maui-performance

Performance optimization guidance for .NET MAUI apps covering profiling, compiled bindings, layout efficiency, image optimization, resource dictionaries, startup time, trimming, and NativeAOT configuration. USE FOR: "performance optimization", "slow startup", "app performance", "compiled bindings...

173 0
View
maui-theming logo
davidortinau/maui-skills

maui-theming

Guide for theming .NET MAUI apps—light/dark mode support, AppThemeBinding, dynamic resources, ResourceDictionary theme switching, and system theme detection. USE FOR: "dark mode", "light mode", "theming", "AppThemeBinding", "theme switching", "ResourceDictionary theme", "dynamic resources", "syst...

173 0
View
maui-accessibility logo
davidortinau/maui-skills

maui-accessibility

Guide for making .NET MAUI apps accessible — screen reader support via SemanticProperties, heading levels, AutomationProperties visibility control, programmatic focus and announcements, and platform-specific gotchas for TalkBack, VoiceOver, and Narrator. USE FOR: "add accessibility", "screen read...

173 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View