@traqio/react-native 0.3.1 → 0.3.2
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 +18 -0
- package/android/build.gradle +2 -2
- package/android/src/main/AndroidManifest.xml +7 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -198,6 +198,24 @@ Traffic from development builds is flagged as debug traffic. The SDK turns it on
|
|
|
198
198
|
|
|
199
199
|
Debug traffic shows in the console's **Live events › Debug** view, but it is never counted in a report, attributed, sent to an ad network or a webhook, or billed.
|
|
200
200
|
|
|
201
|
+
## Wrong or revoked key
|
|
202
|
+
|
|
203
|
+
A 401 / 403 from the API (unknown, wrong or revoked `sdkKey`) is not silent: the SDK
|
|
204
|
+
logs one `console.warn` and calls `onError` once — not on every retry, and again only
|
|
205
|
+
after a request has gone through. The events are kept and retried with exponential
|
|
206
|
+
backoff (up to 5 min), so fixing the key in the console delivers them.
|
|
207
|
+
|
|
208
|
+
```ts
|
|
209
|
+
Traqio.init({
|
|
210
|
+
sdkKey,
|
|
211
|
+
endpoint,
|
|
212
|
+
onError: (e) => {
|
|
213
|
+
// e = { code: "invalid_sdk_key", status: 401 | 403, message }
|
|
214
|
+
myLogger.error(e.message);
|
|
215
|
+
},
|
|
216
|
+
});
|
|
217
|
+
```
|
|
218
|
+
|
|
201
219
|
## Requirements
|
|
202
220
|
|
|
203
221
|
- React Native 0.74+, with Expo Modules installed.
|
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.3.
|
|
9
|
+
version = '0.3.2'
|
|
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.3.
|
|
31
|
+
versionName "0.3.2"
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
compileOptions {
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
2
|
-
<!--
|
|
2
|
+
<!-- The SDK talks to the Traqio API, so it declares the one permission that needs
|
|
3
|
+
(todo cmx8om72m00lc): a blank Android Studio app has no INTERNET permission, and
|
|
4
|
+
Flutter's template grants it to debug builds only — such an app installed the SDK
|
|
5
|
+
from the docs, compiled, ran and sent nothing, silently. Merged into the host's
|
|
6
|
+
manifest; a normal permission, no prompt. -->
|
|
7
|
+
<uses-permission android:name="android.permission.INTERNET" />
|
|
8
|
+
<!-- No other permission: the Play Install Referrer API is bound via the Play Store app.
|
|
3
9
|
The <queries> block IS needed on Android 11+ — package-visibility filtering hides
|
|
4
10
|
com.android.vending from apps Play did not install itself (sideloads, dev builds,
|
|
5
11
|
`adb install`), and the referrer read then fails with FEATURE_NOT_SUPPORTED. -->
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@traqio/react-native",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
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.12.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@react-native-async-storage/async-storage": ">=1.21.0",
|