@attribra/react-native 2.9.7 → 2.9.9

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/INSTALL.md CHANGED
@@ -9,22 +9,22 @@ cd ios && pod install && cd ..
9
9
  ```
10
10
 
11
11
  ```tsx
12
- import { AurionSignal } from '@attribra/react-native'
12
+ import { Attribra } from '@attribra/react-native'
13
13
  ```
14
14
 
15
15
  ## From source / ZIP (dashboard download)
16
16
 
17
- 1. Unzip this package into your app, e.g. `src/lib/aurion/`, **or** depend on the local path / published package.
17
+ 1. Unzip this package into your app, e.g. `src/lib/attribra/`, **or** depend on the local path / published package.
18
18
  2. Optional peers: `@react-native-async-storage/async-storage` (needed to keep offline events across restarts), `@react-native-community/geolocation`. Connectivity for the offline queue is **SDK-native only** via the packaged `AurionNetwork` module (Android `ConnectivityManager` / iOS `NWPathMonitor`). No NetInfo (or other app networking library) is required.
19
19
  3. Create an API key in Attribra → **API Keys** (`asg_…`).
20
20
  4. Add location permissions (Android `ACCESS_FINE_LOCATION` / `ACCESS_COARSE_LOCATION`, iOS `NSLocationWhenInUseUsageDescription`) if you keep the default `collectLocation: true`.
21
21
  5. At app launch:
22
22
 
23
23
  ```tsx
24
- import { AurionSignal } from '@attribra/react-native'
25
- // ZIP / copy path: import { AurionSignal } from './lib/aurion'
24
+ import { Attribra } from '@attribra/react-native'
25
+ // ZIP / copy path: import { Attribra } from './lib/attribra'
26
26
 
27
- AurionSignal.configure({
27
+ Attribra.configure({
28
28
  apiKey: 'asg_YOUR_KEY',
29
29
  baseUrl: 'https://YOUR_HOST/api', // local: http://YOUR_LAN_IP:8000/api
30
30
  onAttribution: (a) => {
@@ -37,7 +37,7 @@ AurionSignal.configure({
37
37
  })
38
38
  ```
39
39
 
40
- 6. Product events: `await AurionSignal.track('sign_in')`
40
+ 6. Product events: `await Attribra.track('sign_in')`
41
41
 
42
42
  **Offline events (SDK 2.9+):** if the device is offline or the request times out / 5xx, `track` / `trackBatch` / `open_app` / `app_install` / `reattributed` are stored locally (up to 100) and sent when the network is back (app foreground, next successful send, or NetInfo if installed). `AurionSignal.flushQueue()` forces a flush; `pendingQueueSize()` shows how many are waiting.
43
43
 
package/PUBLISH.md CHANGED
@@ -52,9 +52,9 @@ cd ios && pod install && cd ..
52
52
  ```
53
53
 
54
54
  ```tsx
55
- import { AurionSignal } from '@attribra/react-native'
55
+ import { Attribra } from '@attribra/react-native'
56
56
 
57
- AurionSignal.configure({
57
+ Attribra.configure({
58
58
  apiKey: 'asg_YOUR_KEY',
59
59
  baseUrl: 'https://signal.irisdigi.cloud/api',
60
60
  })
package/README.md CHANGED
@@ -13,7 +13,7 @@ Then rebuild native projects (autolinking):
13
13
 
14
14
  ```bash
15
15
  cd ios && pod install && cd ..
16
- npx react-native run-android # or your usual Android build
16
+ npx react-native run-android
17
17
  npx react-native run-ios
18
18
  ```
19
19
 
@@ -29,9 +29,9 @@ Connectivity for the offline queue is **built-in** (`AurionNetwork` — no NetIn
29
29
  ## Quick start
30
30
 
31
31
  ```tsx
32
- import { AurionSignal } from '@attribra/react-native'
32
+ import { Attribra } from '@attribra/react-native'
33
33
 
34
- AurionSignal.configure({
34
+ Attribra.configure({
35
35
  apiKey: 'asg_YOUR_KEY',
36
36
  baseUrl: 'https://signal.irisdigi.cloud/api',
37
37
  onAttribution: (a) => console.log('Campaign', a.campaign, a.campaign_id),
@@ -39,11 +39,13 @@ AurionSignal.configure({
39
39
  console.log('Switched', previous.campaign, '→', next.campaign),
40
40
  })
41
41
 
42
- await AurionSignal.track('sign_in')
42
+ await Attribra.track('sign_in')
43
43
  ```
44
44
 
45
45
  Create an API key in the Attribra dashboard (**API Keys**, prefix `asg_`).
46
46
 
47
+ > Older apps may still `import { AurionSignal }` — it is the same object as `Attribra` (deprecated alias).
48
+
47
49
  ## What the SDK does
48
50
 
49
51
  1. Captures launch / warm deep links and short links (`/l/...`)
@@ -51,7 +53,7 @@ Create an API key in the Attribra dashboard (**API Keys**, prefix `asg_`).
51
53
  3. Sends **one** `app_install` per install after a short grace window
52
54
  4. Uses a persistent `installation_id` as event `user_id` (`getDeviceId()`)
53
55
  5. **Android:** Play Install Referrer; GAID + `/v1/devices/register` before install (reinstall stitch); optional FCM uninstall probing
54
- 6. **iOS:** clipboard fallback (`aurion_clip` from the short-link page via native `AurionClipboard` / UIPasteboard), then IP+OS match; SKAN when enabled
56
+ 6. **iOS:** clipboard fallback (`aurion_clip` via native `AurionClipboard` / UIPasteboard), then IP+OS match; SKAN when enabled
55
57
  7. Queues events offline and flushes when the network returns
56
58
 
57
59
  ## Config options
@@ -79,14 +81,6 @@ Create an API key in the Attribra dashboard (**API Keys**, prefix `asg_`).
79
81
  <uses-permission android:name="android.permission.INTERNET" />
80
82
  ```
81
83
 
82
- Also add (for GAID / reinstall):
83
-
84
- ```gradle
85
- implementation("com.google.android.gms:play-services-ads-identifier:18.1.0")
86
- ```
87
-
88
- (Autolinking already pulls ads-identifier for the packaged Android module when using this package’s `android/` project.)
89
-
90
84
  **iOS** `Info.plist`:
91
85
 
92
86
  - `NSLocationWhenInUseUsageDescription` (and often `NSLocationAlwaysAndWhenInUseUsageDescription` if App Store asks)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@attribra/react-native",
3
- "version": "2.9.7",
4
- "description": "Attribra (Aurion Signal) attribution and event SDK for React Native — deep links, install/reinstall, offline queue, SKAN, Appnext.",
3
+ "version": "2.9.9",
4
+ "description": "Attribra attribution and event SDK for React Native — deep links, install/reinstall, offline queue, SKAN, Appnext. Import { Attribra } from '@attribra/react-native'.",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
7
7
  "react-native": "src/index.ts",
@@ -154,7 +154,7 @@ const STORE_PENDING_URL = 'asg_pending_attribution_url'
154
154
  const STORE_ATTRIBUTION_AT = 'asg_attribution_at'
155
155
  const STORE_LOCATION = 'asg_location'
156
156
  const STORE_EVENT_QUEUE = 'asg_event_queue'
157
- const SDK_VERSION = '2.9.7'
157
+ const SDK_VERSION = '2.9.9'
158
158
  let cachedGaid: string | null = null
159
159
  const DEFAULT_DEEP_LINK_GRACE_MS = 3000
160
160
  const DEFAULT_ATTRIBUTION_WINDOW_DAYS = 30
@@ -2107,3 +2107,10 @@ export const AurionSignal = {
2107
2107
  return readEventQueue().length
2108
2108
  },
2109
2109
  }
2110
+
2111
+ /** Preferred public API name. Same runtime object as legacy `AurionSignal`. */
2112
+ export const Attribra = AurionSignal
2113
+
2114
+ export type AttribraConfig = AurionConfig
2115
+ export type AttribraAttribution = AurionAttribution
2116
+ export type AttribraPlatform = AurionPlatform
package/src/index.ts CHANGED
@@ -1,7 +1,12 @@
1
1
  export {
2
+ Attribra,
3
+ /** @deprecated Use `Attribra` — kept for older apps. */
2
4
  AurionSignal,
3
5
  detectPlatform,
4
6
  parseAttributionFromUrl,
7
+ type AttribraAttribution,
8
+ type AttribraConfig,
9
+ type AttribraPlatform,
5
10
  type AurionAttribution,
6
11
  type AurionConfig,
7
12
  type AurionPlatform,