Skip to content

Commit f1a02d8

Browse files
committed
chore(dynamicLinks): add content
1 parent a459a0c commit f1a02d8

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

packages/firebase-dynamic-links/README.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,44 @@
11
# @nativescript/firebase-dynamic-links
22

3-
```javascript
3+
```cli
44
ns plugin add @nativescript/firebase-dynamic-links
55
```
66

7+
## What does it do
8+
9+
Dynamic Links are links that work the way you want, on either iOS or Android and whether or not your app is already installed.
10+
11+
[![image](https://img.youtube.com/vi/LvY1JMcrPF8/hqdefault.jpg)](https://www.youtube.com/watch?v=LvY1JMcrPF8)
12+
13+
With Dynamic Links, your users get the best available experience for the platform they open your link on. If a user opens a Dynamic Link on iOS or Android, they can be taken directly to the linked content in your app.
14+
715
## Usage
816

9-
// TODO
17+
### Create a Link
18+
19+
You can create dynamic links via the Firebase console, your app or even your custom API. Please refer to Firebase create dynamic link documentation for further details. Below, we will show how to build links as part of your application code:
20+
21+
```ts
22+
import { firebase } from '@nativescript/firebase-core';
23+
import '@nativescript/firebase-dynamic-links';
24+
25+
async function buildLink() {
26+
const link = await firebase()
27+
.dynamicLinks()
28+
.buildLink({
29+
link: 'https://nativescript.org',
30+
// domainUriPrefix is created in your Firebase console
31+
domainUriPrefix: 'https://xyz.page.link',
32+
// optional setup which updates Firebase analytics campaign
33+
// "banner". This also needs setting up before hand
34+
analytics: {
35+
campaign: 'banner',
36+
},
37+
});
38+
39+
return link;
40+
}
41+
```
1042

1143
## License
1244

0 commit comments

Comments
 (0)