@layers/react-native 3.4.1 → 3.5.1
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 +16 -14
- package/android/src/main/java/io/layers/sdk/reactnative/LayersInstallReferrerModule.java +91 -34
- package/dist/debug-overlay.d.mts +1 -1
- package/dist/debug-overlay.d.ts +1 -1
- package/dist/{index-CodK28vr.d.mts → index-BUluiT2s.d.mts} +8 -1
- package/dist/index-BUluiT2s.d.mts.map +1 -0
- package/dist/{index-CST_jKc5.d.ts → index-BykaIQ6S.d.ts} +8 -1
- package/dist/{index-CST_jKc5.d.ts.map → index-BykaIQ6S.d.ts.map} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +1 -1
- package/dist/react.mjs +1 -1
- package/dist/{src-DpIIzeHX.mjs → src-DAuxJLuj.mjs} +13 -4
- package/dist/src-DAuxJLuj.mjs.map +1 -0
- package/dist/{src-CPouy-K4.js → src-WCx-W3gL.js} +11 -2
- package/ios/PrivacyInfo.xcprivacy +6 -0
- package/package.json +2 -2
- package/dist/index-CodK28vr.d.mts.map +0 -1
- package/dist/src-DpIIzeHX.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __require } from "./chunk-COTuXS2J.mjs";
|
|
2
|
-
import { a as requestTrackingAuthorization, n as getAdvertisingId, r as getVendorId } from "./att-CnlG_CuV.mjs";
|
|
2
|
+
import { a as requestTrackingAuthorization, n as getAdvertisingId, r as getVendorId, t as getATTStatus } from "./att-CnlG_CuV.mjs";
|
|
3
3
|
import { r as setSkanCore, t as SKANManager } from "./skan-DO7MLv2w.mjs";
|
|
4
4
|
import { FetchHttpClient, LayersCore, LayersError as LayersError$1, LayersEvent, addToCartEvent as buildAddToCartEvent, beginCheckoutEvent as buildBeginCheckoutEvent, initWasm, onboardingCompleteEvent as buildOnboardingCompleteEvent, onboardingStartEvent as buildOnboardingStartEvent, paywallShowEvent as buildPaywallShowEvent, purchaseEvent as buildPurchaseEvent, refundEvent as buildRefundEvent, startTrialEvent as buildStartTrialEvent, subscribeEvent as buildSubscribeEvent, viewItemEvent as buildViewItemEvent } from "@layers/core-wasm";
|
|
5
5
|
|
|
@@ -1122,7 +1122,7 @@ function hostAppIsRegisteredOn(rn) {
|
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
1124
|
const DUPLICATE_REACT_NATIVE_MESSAGE = "[Layers] The SDK resolved a SECOND copy of react-native, not the one your app runs. React Native delivers native lifecycle events to a single copy, so this listener can never fire: $app_background and $app_foreground will not be emitted and the background crash-safety snapshot will not run, which loses every event queued since the last flush on any launch that ends in a kill. Fix the duplicate in your bundler — in a Metro monorepo set `resolver.disableHierarchicalLookup = true` and list every workspace node_modules in `resolver.nodeModulesPaths` — or hand the SDK your app's module: `new LayersReactNative({ ..., appState: AppState })` with AppState imported from 'react-native'.";
|
|
1125
|
-
const SDK_VERSION = "3.
|
|
1125
|
+
const SDK_VERSION = "3.5.1";
|
|
1126
1126
|
var LayersReactNative = class LayersReactNative {
|
|
1127
1127
|
core;
|
|
1128
1128
|
eager;
|
|
@@ -1141,6 +1141,7 @@ var LayersReactNative = class LayersReactNative {
|
|
|
1141
1141
|
netInfoUnsubscribe = null;
|
|
1142
1142
|
config;
|
|
1143
1143
|
userIdLocked = false;
|
|
1144
|
+
attStatusProvider;
|
|
1144
1145
|
errorListeners = /* @__PURE__ */ new Set();
|
|
1145
1146
|
_skanManager = null;
|
|
1146
1147
|
_skanArmed = false;
|
|
@@ -1183,6 +1184,10 @@ var LayersReactNative = class LayersReactNative {
|
|
|
1183
1184
|
this.enableDebug = config.enableDebug ?? false;
|
|
1184
1185
|
this.appUserId = config.appUserId;
|
|
1185
1186
|
this.config = config;
|
|
1187
|
+
try {
|
|
1188
|
+
const { Platform } = __require("react-native");
|
|
1189
|
+
if (Platform.OS === "ios") this.attStatusProvider = getATTStatus;
|
|
1190
|
+
} catch {}
|
|
1186
1191
|
const httpClient = new FetchHttpClient();
|
|
1187
1192
|
this.eager = createEagerPersistence(config.appId);
|
|
1188
1193
|
this.core = LayersCore.init({
|
|
@@ -1190,6 +1195,7 @@ var LayersReactNative = class LayersReactNative {
|
|
|
1190
1195
|
appId: config.appId,
|
|
1191
1196
|
environment: config.environment,
|
|
1192
1197
|
...config.baseUrl != null && { baseUrl: config.baseUrl },
|
|
1198
|
+
...config.trackingBaseUrl != null && { trackingBaseUrl: config.trackingBaseUrl },
|
|
1193
1199
|
...config.enableDebug != null && { enableDebug: config.enableDebug },
|
|
1194
1200
|
...config.flushIntervalMs != null && { flushIntervalMs: config.flushIntervalMs },
|
|
1195
1201
|
...config.flushThreshold != null && { flushThreshold: config.flushThreshold },
|
|
@@ -1198,7 +1204,8 @@ var LayersReactNative = class LayersReactNative {
|
|
|
1198
1204
|
...config.bootstrap != null && { bootstrap: config.bootstrap }
|
|
1199
1205
|
},
|
|
1200
1206
|
httpClient,
|
|
1201
|
-
persistence: this.eagerPersistence
|
|
1207
|
+
persistence: this.eagerPersistence,
|
|
1208
|
+
...this.attStatusProvider && { attStatusProvider: this.attStatusProvider }
|
|
1202
1209
|
});
|
|
1203
1210
|
setSkanCore(this.core);
|
|
1204
1211
|
this.applyEagerDeviceContext();
|
|
@@ -1360,6 +1367,7 @@ var LayersReactNative = class LayersReactNative {
|
|
|
1360
1367
|
appId: this.config.appId,
|
|
1361
1368
|
environment: this.config.environment,
|
|
1362
1369
|
...this.config.baseUrl != null && { baseUrl: this.config.baseUrl },
|
|
1370
|
+
...this.config.trackingBaseUrl != null && { trackingBaseUrl: this.config.trackingBaseUrl },
|
|
1363
1371
|
...this.config.enableDebug != null && { enableDebug: this.config.enableDebug },
|
|
1364
1372
|
...this.config.debug != null && { debug: this.config.debug },
|
|
1365
1373
|
...this.config.flushIntervalMs != null && { flushIntervalMs: this.config.flushIntervalMs },
|
|
@@ -1370,6 +1378,7 @@ var LayersReactNative = class LayersReactNative {
|
|
|
1370
1378
|
},
|
|
1371
1379
|
httpClient,
|
|
1372
1380
|
persistence,
|
|
1381
|
+
...this.attStatusProvider && { attStatusProvider: this.attStatusProvider },
|
|
1373
1382
|
migration: migrationState
|
|
1374
1383
|
});
|
|
1375
1384
|
this._runtimeGeneration = generation;
|
|
@@ -3685,4 +3694,4 @@ function useLayersExpoRouterTracking(sdkInstance, usePathname, useGlobalSearchPa
|
|
|
3685
3694
|
|
|
3686
3695
|
//#endregion
|
|
3687
3696
|
export { superwallTrackPurchase as $, resolveActiveRoute as A, trackRevenueCatPurchase as B, parseInstallReferrerUrl as C, buildExceptionProperties as Ct, useLayersExpoRouterTracking as D, shouldTreatAsNewInstall as E, registerExpoBackgroundFlush as F, trackPurchaseFailed as G, trackBeginCheckout as H, connectRevenueCat as I, trackSubscription as J, trackRefund as K, isRevenueCatConnected as L, BACKGROUND_FLUSH_MIN_INTERVAL_MINUTES as M, BACKGROUND_FLUSH_TASK_NAME as N, SurveysModule as O, createBackgroundFlushHandler as P, superwallTrackPresentation as Q, resetRevenueCatForTesting as R, parseInstallReferrerDeepLink as S, viewItemEvent as St, setupDeepLinkListener as T, trackOrder as U, trackAddToCart as V, trackPurchase as W, superwallOnEvent as X, trackViewProduct as Y, superwallTrackDismiss as Z, getFirstInstallTime as _, signUpEvent as _t, buildBeginCheckoutEvent as a, initiateCheckoutEvent as at, getOrSetInstallId as b, tutorialCompleteEvent as bt, buildOnboardingStartEvent as c, loginEvent as ct, buildRefundEvent as d, paywallShowEvent as dt, superwallTrackSkip as et, buildStartTrialEvent as f, purchaseEvent as ft, getAdServicesToken as g, shareEvent as gt, formatFbc as h, searchEvent as ht, buildAddToCartEvent as i, addToWishlistEvent as it, useLayersNavigationTracking as j, createNavigationListener as k, buildPaywallShowEvent as l, onboardingCompleteEvent as lt, buildViewItemEvent as m, screenViewEvent as mt, LayersEvent as n, StandardEvents as nt, buildInstallReferrerProperties as o, levelCompleteEvent as ot, buildSubscribeEvent as p, registerEvent as pt, trackRemoveFromCart as q, LayersReactNative as r, addToCartEvent as rt, buildOnboardingCompleteEvent as s, levelStartEvent as st, LayersError$1 as t, superwallUserAttributes as tt, buildPurchaseEvent as u, onboardingStartEvent as ut, getGoogleAdvertisingId as v, startTrialEvent as vt, readClipboardAttribution as w, installExceptionAutoCapture as wt, parseDeepLink as x, viewContentEvent as xt, getInstallReferrer as y, subscribeEvent as yt, syncRevenueCatAttributes as z };
|
|
3688
|
-
//# sourceMappingURL=src-
|
|
3697
|
+
//# sourceMappingURL=src-DAuxJLuj.mjs.map
|