@traqio/react-native 0.1.1 → 0.1.3
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 +35 -0
- package/android/build.gradle +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -56,6 +56,41 @@ Traqio.onDeepLink(({ deepLink }) => {
|
|
|
56
56
|
});
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
+
## Deferred deep links (invites, referrals)
|
|
60
|
+
|
|
61
|
+
A link can carry a per-share value — `https://go.example.com/c/invite?deep_link_value=<token>`
|
|
62
|
+
(also `deep_link_sub1`…`deep_link_sub10`). After the invitee installs, the first open
|
|
63
|
+
gets it back:
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
Traqio.onDeepLink(({ payload, matchType, confidence, deferred }) => {
|
|
67
|
+
if (matchType === "probabilistic" && confidence !== "high") return; // your call
|
|
68
|
+
if (payload.value) acceptInvite(payload.value); // deep_link_value
|
|
69
|
+
else if (payload.deepLink) navigateTo(payload.deepLink); // the link's destination
|
|
70
|
+
});
|
|
71
|
+
const link = await Traqio.getDeferredDeepLink(); // the same, once, or null
|
|
72
|
+
|
|
73
|
+
// iOS fallback: the landing page shows a code ("ABCD-EFGH") — let the user type it.
|
|
74
|
+
await Traqio.redeemDeepLinkCode(input);
|
|
75
|
+
|
|
76
|
+
// The END USER's consent. Only `true` lets the server try the probabilistic match
|
|
77
|
+
// (same network + same device class inside the hour); given later, it retries once.
|
|
78
|
+
await Traqio.setConsent(userAgreed);
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`matchType` says how the link was found:
|
|
82
|
+
|
|
83
|
+
| `matchType` | How | Deterministic |
|
|
84
|
+
|---|---|---|
|
|
85
|
+
| `referrer` | Android: the Play Install Referrer | yes |
|
|
86
|
+
| `link` | iOS: the landing page's « Open in app » / Smart App Banner (`/o/<id>` universal link), or a link opening the installed app | yes |
|
|
87
|
+
| `code` | the code typed in the app (`redeemDeepLinkCode`) | yes |
|
|
88
|
+
| `probabilistic` | hashed IP + coarse UA, ≤ 1 h, **only with `setConsent(true)`** and the IP match on in the console; comes with `confidence` | no |
|
|
89
|
+
|
|
90
|
+
On iOS, turn **iOS landing page** on for the link in the console, and add the link
|
|
91
|
+
domain(s) to Associated Domains (`applinks:go.example.com`, and your open host).
|
|
92
|
+
Guide: https://traqio.app/docs/concepts/deep-linking
|
|
93
|
+
|
|
59
94
|
## Advertising id (opt-in)
|
|
60
95
|
|
|
61
96
|
Off by default (`collectAdvertisingId: false`): the SDK reads no IDFA / GAID and never
|
package/android/build.gradle
CHANGED
|
@@ -6,7 +6,7 @@ apply plugin: 'kotlin-android'
|
|
|
6
6
|
apply plugin: 'maven-publish'
|
|
7
7
|
|
|
8
8
|
group = 'io.khufu.traqio'
|
|
9
|
-
version = '0.1.
|
|
9
|
+
version = '0.1.3'
|
|
10
10
|
|
|
11
11
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
12
12
|
apply from: expoModulesCorePlugin
|
|
@@ -28,7 +28,7 @@ android {
|
|
|
28
28
|
defaultConfig {
|
|
29
29
|
minSdk safeExtGet("minSdkVersion", 24)
|
|
30
30
|
versionCode 1
|
|
31
|
-
versionName "0.1.
|
|
31
|
+
versionName "0.1.3"
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
compileOptions {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@traqio/react-native",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Traqio SDK for React Native / Expo — deterministic install attribution (Play Install Referrer) + SKAN. No IDFA, no fingerprinting.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"README.md"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@traqio/core": "0.
|
|
47
|
+
"@traqio/core": "0.2.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@react-native-async-storage/async-storage": ">=1.21.0",
|