Skip to content

Commit

Permalink
Update deep link guide with a note for version earlier than 3.27 (#11552
Browse files Browse the repository at this point in the history
)

Follow up on #11526.

This PR added a note for flutter version earlier than 3.27, you need to
manually add code to opt-in to flutter deep link.

Related PR: #11461.

---------

Co-authored-by: Parker Lougheed <[email protected]>
  • Loading branch information
hannah-hyj and parlough authored Jan 6, 2025
1 parent 80485b2 commit 06d8df4
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 16 deletions.
26 changes: 19 additions & 7 deletions src/content/cookbook/navigation/set-up-app-links.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,29 @@ It provides a simple API to handle complex routing scenarios.
<data android:scheme="https" />
</intent-filter>
```

:::version-note
If you use a Flutter version earlier than 3.27,
you need to manually opt in to deep linking by
adding the following metadata tag to `<activity>`:

```xml
<meta-data android:name="flutter_deeplinking_enabled" android:value="true" />
```
:::

:::note
If you use a third-party plugin to handle deep links,
such as [app_links][],
such as [app_links][],
Flutter's default deeplink handler will
break these plugins.
break these plugins.

To opt out of using Flutter's default deep link handler,
add the following metadata tag:
```<meta-data android:name="flutter_deeplinking_enabled" android:value="false" />```
to opt out of Flutter's default deeplink handler
add the following metadata tag to `<activity>`:

```xml
<meta-data android:name="flutter_deeplinking_enabled" android:value="false" />
```
:::

## 3. Hosting assetlinks.json file
Expand Down
24 changes: 15 additions & 9 deletions src/content/cookbook/navigation/set-up-universal-links.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,21 @@ It provides a simple API to handle complex routing scenarios.
1. Open the `ios/Runner.xcworkspace` file inside the
Flutter project's `ios` folder.

:::note
If you are using third-party plugins to handle deep links,
such as [app_links][],
Flutter's default deeplink handler will
break these plugins.

If you use a third-party plugin,
add the key and value pair `FlutterDeepLinkingEnabled` and `NO` to info.Plist.
:::
:::version-note
If 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 `FlutterDeepLinkingEnabled` and `YES` to `info.Plist`.
:::

:::note
If you're using third-party plugins to handle deep links,
such as [app_links][],
Flutter's default deeplink handler will
break these plugins.

If you use a third-party plugin, add the
key and value pair `FlutterDeepLinkingEnabled` and `NO` to `info.Plist`.
:::

### Add associated domains

Expand Down

0 comments on commit 06d8df4

Please sign in to comment.