Flutter 3.41 is live! Check out theFlutter 3.41 blog post!
Set up universal links for iOS
Learn how to set up universal links for an iOS application built with Flutter.
Deep linking allows an app user to launch an app with a URI. This URI contains scheme, host, and path, and opens the app to a specific screen.
Auniversal link, a type of deep link exclusive to iOS devices, uses only thehttp orhttps protocols.
To set up universal links, you need to own a web domain. As a temporary solution, consider usingFirebase Hosting orGitHub Pages.
Once you've set up your deep links, you can validate them. To learn more, seeValidate deep links.
Create or modify a Flutter app
#Write a Flutter app that can handle an incoming URL.
This example uses thego_router package to handle the routing. The Flutter team maintains thego_router package. It provides a simple API to handle complex routing scenarios.
To create a new application, type
flutter create <app-name>.flutter create deeplink_cookbookTo include the
go_routerpackage as a dependency, runflutter pub add:flutter pub add go_routerTo handle the routing, create a
GoRouterobject in themain.dartfile:main.dartdartimport'package:flutter/material.dart';import'package:go_router/go_router.dart';voidmain()=>runApp(MaterialApp.router(routerConfig:router));/// This handles '/' and '/details'.finalrouter=GoRouter(routes:[GoRoute(path:'/',builder:(_,_)=>Scaffold(appBar:AppBar(title:constText('Home Screen')),),routes:[GoRoute(path:'details',builder:(_,_)=>Scaffold(appBar:AppBar(title:constText('Details Screen')),),),],),],);
Adjust iOS build settings
#Launch Xcode.
Open the
ios/Runner.xcworkspacefile inside the Flutter project'siosfolder.Version noteIf you use a Flutter version earlier than 3.27, you need to manually opt in to deep linking by adding the key and value pair
FlutterDeepLinkingEnabledandYEStoinfo.Plist.NoteIf you're using third-party plugins to handle deep links, such asapp_links, Flutter's default deeplink handler will break these plugins.
If you use a third-party plugin, add the key and value pair
FlutterDeepLinkingEnabledandNOtoinfo.Plist.
Add associated domains
#Personal development teams don't support the Associated Domains capability. To add associated domains, choose the IDE tab.
Launch Xcode if necessary.
Click the top-levelRunner.
In the Editor, click theRunner target.
ClickSigning & Capabilities.
To add a new domain, click+ Capability underSigning & Capabilities.
ClickAssociated Domains.

In theAssociated Domains section, click+.
Enter
applinks:<web domain>. Replace<web domain>with your own domain name.
Open the
ios/Runner/Runner.entitlementsXML file in your preferred editor.Add an associated domain inside the
<dict>tag.xml<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict><key>com.apple.developer.associated-domains</key><array><string>applinks:example.com</string></array></dict></plist>Save the
ios/Runner/Runner.entitlementsfile.
To check that the associated domains you created are available, perform the following steps:
Launch Xcode if necessary.
Click the top-levelRunner.
In the Editor, click theRunner target.
ClickSigning & Capabilities. The domains should appear in theAssociated Domains section.

You have finished configuring the application for deep linking.
Associate your app with your web domain
# You need to host anapple-app-site-association file in the web domain. This file tells the mobile browser which iOS application to open instead of the browser. To create the file, find theappID of the Flutter app you created in the previous section.
Locate components of theappID
#Apple formats theappID as<team id>.<bundle id>.
- Locate the bundle ID in the Xcode project.
- Locate the team ID in thedeveloper account.
For example: Given a team ID ofS8QB4VV633 and a bundle ID ofcom.example.deeplinkCookbook, you would enter anappID entry ofS8QB4VV633.com.example.deeplinkCookbook.
Create and hostapple-app-site-association JSON file
# This file uses the JSON format. Don't include the.json file extension when you save this file. PerApple's documentation, this file should resemble the following content:
{"applinks":{"apps":[],"details":[{"appIDs":["S8QB4VV633.com.example.deeplinkCookbook"],"paths":["*"],"components":[{"/":"/*"}]}]},"webcredentials":{"apps":["S8QB4VV633.com.example.deeplinkCookbook"]}}Set one value in the
appIDsarray to<team id>.<bundle id>.Set the
pathsarray to["*"]. Thepathsarray specifies the allowed universal links. Using the asterisk,*redirects every path to the Flutter app. If needed, change thepathsarray value to a setting more appropriate to your app.Host the file at a URL that resembles the following structure.
<webdomain>/.well-known/apple-app-site-associationVerify that your browser can access this file.
If you have more than one scheme/flavor, you can add more than oneappID into theappIDs field.
Test the universal link
#Test a universal link using a physical iOS device or the Simulator.
It might take up to 24 hours before Apple'sContent Delivery Network (CDN) requests theapple-app-site-association (AASA) file from your web domain. Until the CDN requests the file, the universal link won't work. To bypass Apple's CDN, check out thealternate mode section.
Before testing, install the Flutter app on the iOS device or Simulator, Use
flutter runon the desired device.
When complete, the Flutter app displays on the home screen of the iOS device or Simulator.
If you test using the Simulator, use the Xcode CLI:
xcrun simctl openurl booted https://<web domain>/detailsIf you test with a physical iOS device:
- Launch theNote app.
- Type the URL in theNote app.
- Click the resulting link.
If successful, the Flutter app launches and displays its details screen.

Find the source code
#You can find the source code for thedeeplink_cookbook recipe in the GitHub repo.
Unless stated otherwise, the documentation on this site reflects Flutter 3.38.6. Page last updated on 2025-10-28.View source orreport an issue.