@amplitude/plugin-engagement-react-native 0.1.1-alpha.3 → 0.1.1-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,8 +16,27 @@ npm install @amplitude/plugin-engagement-react-native
|
|
|
16
16
|
npm install @react-native-async-storage/async-storage
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
Add the source for the `AmplitudeEngagementSwift` pod to your Podfile:
|
|
20
|
+
```rb
|
|
21
|
+
target '<your appname>' do
|
|
22
|
+
...
|
|
23
|
+
|
|
24
|
+
pod "AmplitudeEngagementSwift", :git => "https://github.com/amplitude/Amplitude-Engagement-Swift"
|
|
25
|
+
|
|
26
|
+
...
|
|
27
|
+
end
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Re-run `pod install` in the `ios` directory:
|
|
31
|
+
```sh
|
|
32
|
+
$ cd ios
|
|
33
|
+
$ bundle exec pod install
|
|
34
|
+
```
|
|
35
|
+
|
|
19
36
|
## Usage
|
|
20
37
|
|
|
38
|
+
### Setup code
|
|
39
|
+
|
|
21
40
|
Setup by adding the plugin and calling “init” as usual:
|
|
22
41
|
|
|
23
42
|
```
|
|
@@ -48,6 +67,14 @@ Linking.addEventListener('url', async ({ url }) => {
|
|
|
48
67
|
});
|
|
49
68
|
```
|
|
50
69
|
|
|
70
|
+
### Linking setup
|
|
71
|
+
If you don't already have it set up, please follow this guide to enable deep-linking support in your React Native app in addition to adding the above Linking code:
|
|
72
|
+
https://reactnative.dev/docs/linking#enabling-deep-links
|
|
73
|
+
|
|
74
|
+
Then, following the Alpha Onboarding guide to setup the "scheme" for the deep links in your Android and iOS projects.
|
|
75
|
+
|
|
76
|
+
### Boot
|
|
77
|
+
|
|
51
78
|
Finally, “boot” with the user’s ID:
|
|
52
79
|
|
|
53
80
|
```
|
package/package.json
CHANGED