Skip to content

Commit 55d8a74

Browse files
docs: rm & update dynamic links docs
1 parent 4845f6f commit 55d8a74

4 files changed

Lines changed: 17 additions & 310 deletions

File tree

docs/dynamic-links/usage/index.md

Lines changed: 16 additions & 214 deletions
Original file line numberDiff line numberDiff line change
@@ -6,228 +6,30 @@ next: /in-app-messaging/usage
66
previous: /database/presence-detection
77
---
88

9-
> **Deprecated:** Firebase Dynamic Links is deprecated and should not be adopted in projects that don't already use it. Functionality for the primary use cases of store/web routing and deferred/regular deep-linking will shut down on August 25, 2025. Firebase Authentication currently uses Firebase Dynamic Links to customize Authentication links, but the Firebase team will provide an update to ensure that this functionality continues working after the Firebase Dynamic Links service is shut down. See the [Dynamic Links Deprecation FAQ](https://firebase.google.com/support/dynamic-links-faq) for more information.
9+
# Firebase Dynamic Links
1010

11-
# Installation
11+
⚠️ **DEPRECATED** ⚠️
1212

13-
This module requires that the `@react-native-firebase/app` module is already setup and installed. To install the "app" module, view the
14-
[Getting Started](/) documentation.
13+
This package has been deprecated and removed from the React Native Firebase repository.
1514

16-
This module also requires that the `@react-native-firebase/analytics` module is already setup and installed. To install the "analytics" module, view it's [Getting Started](/analytics/usage) documentation.
15+
## Why was it deprecated?
1716

18-
```bash
19-
# Install & setup the app module
20-
yarn add @react-native-firebase/app
17+
Firebase Dynamic Links has been deprecated by Google and will be shut down on August 25th, 2025. For more information about the deprecation and migration options, please visit:
2118

22-
# Install the dynamic-links module
23-
yarn add @react-native-firebase/dynamic-links
19+
**[Firebase Dynamic Links Deprecation FAQ](https://firebase.google.com/support/dynamic-links-faq)**
2420

25-
# If you're developing your app using iOS, run this command
26-
cd ios/ && pod install
27-
```
21+
## Migration Options
2822

29-
If you're using an older version of React Native without autolinking support, or wish to integrate into an existing project,
30-
you can follow the manual installation steps for [iOS](/dynamic-links/usage/installation/ios) and [Android](/dynamic-links/usage/installation/android).
23+
The deprecation FAQ provides detailed guidance on how to migrate from Firebase Dynamic Links, including:
3124

32-
# What does it do
25+
- **Full feature parity**: Use alternative deep-linking service providers
26+
- **Simple deep-linking**: Migrate to App Links and Universal Links. [See Firebase documentation](https://firebase.google.com/support/guides/app-links-universal-links).
27+
- **No replacement needed**: Remove the package entirely
3328

34-
Dynamic Links are links that work the way you want, on either iOS or Android and whether or not your app is already installed.
29+
## Timeline
3530

36-
<Youtube id="LvY1JMcrPF8" />
31+
- **August 25th, 2025**: Firebase Dynamic Links service will be completely shut down
32+
- All existing links will stop working
33+
- All APIs will return error responses
3734

38-
With Dynamic Links, your users get the best available experience for the platform they open your link on. If a user opens
39-
a Dynamic Link on iOS or Android, they can be taken directly to the linked content in your app.
40-
41-
# Usage
42-
43-
## Firebase Setup
44-
45-
1. Open the Dynamic Links tab and configure a new domain for your app. In this test example, we've created one for `https://rnfbtestapplication.page.link`.
46-
47-
![Firebase console dynamic link first step](https://images.prismic.io/invertase/4152f98c-b4e9-4561-a790-a0750a0392bb_Screenshot+2020-05-07+at+09.26.47.png?auto=compress,format)
48-
49-
2. Create a dynamic link with your domain in the Firebase console. The freshly created dynamic link URL will appear in the table.
50-
51-
![Firebase console dynamic link second step](https://images.prismic.io/invertase/7e5c7a61-899f-45e5-ab4e-ddf3cfee636a_Screenshot+2020-05-07+at+10.26.22.png?auto=compress,format)
52-
53-
## iOS Setup
54-
55-
> Notes: Currently, iOS requires a workaround to make method swizzling work. The workaround is described in [this github.qkg1.topment](https://github.com/invertase/react-native-firebase/issues/4548#issuecomment-1252028059). Without this, dynamic link matching behavior may be inconsistent.
56-
> If you are using Expo Managed Workflow, be sure to load the [@react-native-firebase/dynamic-links config plugin](https://rnfirebase.io/#managed-workflow) to automatically apply the workaround.
57-
58-
To setup Dynamic Links on iOS, it is a **prerequisite** that you have an Apple developer account [setup](https://developer.apple.com/programs/enroll/).
59-
60-
1. Add an `App Store ID` & `Team ID` to your app in your Firebase console. If you do not have an `App Store ID` yet, you can put any number in here for now. Your `Team ID` can be found in your Apple developer console.
61-
62-
![iOS dynamic link first step](https://images.prismic.io/invertase/30e302f6-a7bb-4e37-98fd-7115dac4c1f1_Screenshot+2020-05-07+at+09.10.02.png?auto=compress,format)
63-
64-
2. Test the domain you created in your Firebase console (first step in `Firebase Setup`). Go to the following location in your browser `[your domain]/apple-app-site-association`. The response will have a `details` array property containing an object that has the property `appID`. That will be your app's app ID (It may take some
65-
time for your domain to register). Please ensure it is registered before proceeding.
66-
67-
3. Once you're sure your domain is registered, you need to head over to your Apple developer console and create a provisioning profile for your app. Please ensure you've enabled the `Associated Domain` capability which you should check before proceeding.
68-
69-
![iOS dynamic link third step](https://images.prismic.io/invertase/12d6e692-c2b1-47f5-98aa-f364c928114a_Screenshot+2020-05-07+at+10.03.45.png?auto=compress,format)
70-
71-
4. Open your project in Xcode and open your app under the `TARGETS` header. Click the `Signing & Capabilities` tab. You will need to ensure your `Team` is registered, and your `Provisioning Profile` field is completed. Please add the domain you created in your
72-
Firebase console to the `Associated Domains` and prefix with `applinks:`
73-
74-
![iOS dynamic link fourth step](https://images.prismic.io/invertase/d7a8696f-bef1-44a4-b048-aab7bb534f71_Screenshot+2020-05-07+at+09.55.53.png?auto=compress,format)
75-
76-
5. Click the `Info` tab, and add a `URL Type` to your project. The `Identifier` can be called `Bundle Id` or whatever you wish. Add your bundle identifier to the `URL Schemes` property.
77-
78-
![iOS dynamic link fifth step](https://images.prismic.io/invertase/cb029ba6-ad40-494e-a3f6-2aacaff494d1_Screenshot+2020-05-07+at+10.16.16.png?auto=compress,format)
79-
80-
### Dynamic Links With Custom Domains
81-
82-
If you have set up a [custom domain](https://firebase.google.com/docs/dynamic-links/custom-domains) for your Firebase project, you must add the dynamic link URL prefix into your iOS project's `info.plist` file by using the `FirebaseDynamicLinksCustomDomains` key. You can add multiple URLs as well.
83-
84-
Example:
85-
86-
```xml
87-
<?xml version="1.0" encoding="UTF-8"?>
88-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
89-
<plist version="1.0">
90-
<dict>
91-
<key>FirebaseDynamicLinksCustomDomains</key>
92-
<array>
93-
<string>https://custom.domain.io/bla</string>
94-
<string>https://custom.domain.io/bla2</string>
95-
</array>
96-
97-
...other settings
98-
99-
</dict>
100-
</plist>
101-
```
102-
103-
If you don't add this, the dynamic link will invoke your app, but you cannot retrieve any deep link data you may need within your app, as the deep link will be completely ignored.
104-
105-
Additionally specify the allowed URLs (by clicking the 3 dot menu icon > `Allowlist URL pattern` from the Dynamic Links page of the Firebase console) using regular expressions. Any URL that doesn't match one of the patterns will cause your Dynamic Links to return HTTP error 400.
106-
107-
## iOS Troubleshooting
108-
109-
1. Ensure you have the right URL in the Associated Domains in Xcode.
110-
111-
![iOS troubleshooting first step](https://images.prismic.io/invertase/35c09a84-8a84-4a12-8352-0364a6a784bf_Screenshot+2020-05-22+at+09.28.53.png?auto=compress,format)
112-
113-
2. Ensure you have input the correct Team ID in the Firebase console.
114-
115-
![iOS troubleshooting second step](https://images.prismic.io/invertase/4af777b7-7a2e-48a8-a0dc-23cea50e1a4b_Screenshot+2020-05-22+at+09.40.18.png?auto=compress,format)
116-
117-
3. Paste your link into the iOS Notes app. Long press the link which will open the menu and ensure you click "Open in [YOUR APP NAME]". Be sure _not_ to press "Open in Safari" as that will disable that dynamic link domain for your device.
118-
119-
![iOS troubleshooting third step](https://images.prismic.io/invertase/1f8b049d-e54c-4901-a369-e7f6a19a444c_FA031D26-E14F-4A92-87F2-442191455537.png?auto=compress,format)
120-
121-
4. Ensure your dynamic link domain has an Apple app site association file for your app. Check in the browser by going to the following address: `[your domain]/apple-app-site-association`
122-
123-
![iOS troubleshooting fourth step](https://images.prismic.io/invertase/10f825ac-6cd1-487d-9195-a1d86c7511f7_Screenshot+2020-05-22+at+10.00.57.png?auto=compress,format)
124-
125-
5. There is a known bug that you can follow [here](http://bit.ly/2y8gey4) that stops Apple from downloading the app site association file. The work around is to uninstall your app, restart your device and reinstall your app.
126-
127-
6. Make sure your [deep link parameter](https://firebase.google.com/docs/dynamic-links/create-manually?authuser=0#parameters) is properly URL-encoded, especially if it contains a query string.
128-
129-
7. Try the `performDiagnostics` API on the Dynamic Links module, while running the app on a real device and watching output from either Xcode or Console app. You may search for "Links" and you will see the diagnostic output.
130-
131-
## Android Setup
132-
133-
1. Create a SHA-256 fingerprint using these [instructions](https://developers.google.com/android/guides/client-auth) for your app, and add to your app in your Firebase console.
134-
135-
![android dynamic link first step](https://images.prismic.io/invertase/ac7615cb-ea4f-49d8-ba2e-5d6d4d209520_Screenshot+2020-05-07+at+10.47.48.png?auto=compress,format)
136-
137-
2. Test the domain you created in your Firebase console (first step in `Firebase Setup`). Go to the following location in your browser `[your-domain]/.well-known/assetlinks.json`. The response will have a `target` object containing a `package_name` which ought to have your app's package name. Please
138-
do not proceed until you see this, it may take a while to register.
139-
3. Add your domains to the android/app/src/main/AndroidManifest.xml so that your app knows what links to open in the app. Refer to [the official docs](https://firebase.google.com/docs/dynamic-links/android/receive#add-an-intent-filter-for-deep-links) for example code.
140-
141-
## Testing Your Dynamic Link
142-
143-
Simulate a user opening the link by pasting it into a text message, notepad or email, and pressing it.
144-
145-
Alternatively, use the [uri-scheme](https://www.npmjs.com/package/uri-scheme) package.
146-
147-
```bash
148-
npx uri-scheme open "https://xyz.page.link" --[ios|android]
149-
```
150-
151-
### Application Is Not Installed On Device
152-
153-
The link should take you to the App Store / Google Play, at which point you can abort and install the app manually instead.
154-
155-
While this works on iOS even if the app is not published, testing on Android requires you to have published at least an _internal track_ version, to which the testing device also needs to have access to.
156-
157-
The iOS Simulator throws an `address is invalid` error instead of opening the App Store, which you can safely ignore.
158-
159-
## Create a Link
160-
161-
You can create dynamic links via the Firebase console, your app or even your custom API. Please refer to [Firebase create dynamic link documentation](https://firebase.google.com/docs/dynamic-links/create-links) for further details. Below, we will show how to build links as part of your application code:
162-
163-
```jsx
164-
import dynamicLinks from '@react-native-firebase/dynamic-links';
165-
166-
async function buildLink() {
167-
const link = await dynamicLinks().buildLink({
168-
link: 'https://invertase.io',
169-
// domainUriPrefix is created in your Firebase console
170-
domainUriPrefix: 'https://xyz.page.link',
171-
// optional setup which updates Firebase analytics campaign
172-
// "banner". This also needs setting up before hand
173-
analytics: {
174-
campaign: 'banner',
175-
},
176-
});
177-
178-
return link;
179-
}
180-
```
181-
182-
## Listening for Dynamic Links
183-
184-
The module provides two methods for reacting to events related to the application in the foreground & background/quit.
185-
186-
### Foreground events
187-
188-
When the app is in the foreground state (visible on the device), you can use the `onLink` method to subscribe to events as and
189-
when they happen:
190-
191-
```jsx
192-
import dynamicLinks from '@react-native-firebase/dynamic-links';
193-
194-
function App() {
195-
const handleDynamicLink = link => {
196-
// Handle dynamic link inside your own application
197-
if (link.url === 'https://invertase.io/offer') {
198-
// ...navigate to your offers screen
199-
}
200-
};
201-
202-
useEffect(() => {
203-
const unsubscribe = dynamicLinks().onLink(handleDynamicLink);
204-
// When the component is unmounted, remove the listener
205-
return () => unsubscribe();
206-
}, []);
207-
208-
return null;
209-
}
210-
```
211-
212-
### Background/Quit events
213-
214-
If the application is in a background state or has fully quit then the `getInitialLink` method can be used to detect whether
215-
the application was opened via a link:
216-
217-
```jsx
218-
import dynamicLinks from '@react-native-firebase/dynamic-links';
219-
220-
function App() {
221-
useEffect(() => {
222-
dynamicLinks()
223-
.getInitialLink()
224-
.then(link => {
225-
if (link.url === 'https://invertase.io/offer') {
226-
// ...set initial route as offers screen
227-
}
228-
});
229-
}, []);
230-
231-
return null;
232-
}
233-
```
35+
Please refer to the official deprecation FAQ for complete migration guidance and support.

docs/dynamic-links/usage/installation/android.md

Lines changed: 0 additions & 58 deletions
This file was deleted.

docs/dynamic-links/usage/installation/ios.md

Lines changed: 0 additions & 37 deletions
This file was deleted.

packages/dynamic-links/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Firebase Dynamic Links has been deprecated by Google and will be shut down on Au
3838
The deprecation FAQ provides detailed guidance on how to migrate from Firebase Dynamic Links, including:
3939

4040
- **Full feature parity**: Use alternative deep-linking service providers
41-
- **Simple deep-linking**: Migrate to App Links and Universal Links
41+
- **Simple deep-linking**: Migrate to App Links and Universal Links. [See Firebase documentation](https://firebase.google.com/support/guides/app-links-universal-links).
4242
- **No replacement needed**: Remove the package entirely
4343

4444
## Timeline

0 commit comments

Comments
 (0)