@layers/react-native 3.5.0 → 3.5.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/android/src/main/java/io/layers/sdk/reactnative/LayersInstallReferrerModule.java +91 -34
- package/dist/att-BDPyE-Gs.d.mts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/react.js +1 -1
- package/dist/react.mjs +1 -1
- package/dist/skan-BljOFaeU.d.mts.map +1 -1
- package/dist/{src-CKoz6JUg.mjs → src-D-qrATOO.mjs} +2 -2
- package/dist/{src-CKoz6JUg.mjs.map → src-D-qrATOO.mjs.map} +1 -1
- package/dist/{src-CClyuxmh.js → src-DFrHqimM.js} +1 -1
- package/package.json +2 -2
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
package io.layers.sdk.reactnative;
|
|
2
2
|
|
|
3
|
+
import android.os.Handler;
|
|
4
|
+
import android.os.Looper;
|
|
3
5
|
import com.facebook.react.bridge.Arguments;
|
|
4
6
|
import com.facebook.react.bridge.Promise;
|
|
5
7
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
6
8
|
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
7
9
|
import com.facebook.react.bridge.ReactMethod;
|
|
8
10
|
import com.facebook.react.bridge.WritableMap;
|
|
11
|
+
import java.util.concurrent.ExecutorService;
|
|
12
|
+
import java.util.concurrent.Executors;
|
|
13
|
+
import java.util.concurrent.atomic.AtomicBoolean;
|
|
9
14
|
|
|
10
15
|
/**
|
|
11
16
|
* Native module for fetching the Google Play install referrer.
|
|
@@ -13,12 +18,58 @@ import com.facebook.react.bridge.WritableMap;
|
|
|
13
18
|
* Uses the Install Referrer API via reflection to avoid a hard dependency on
|
|
14
19
|
* `com.android.installreferrer:installreferrer`. If the library is not present
|
|
15
20
|
* in the host app, the module resolves with null.
|
|
21
|
+
*
|
|
22
|
+
* Reads run on one shared worker thread. Each request resolves once, with
|
|
23
|
+
* null if the result has not arrived within 10 seconds of starting the connection.
|
|
16
24
|
*/
|
|
17
25
|
public class LayersInstallReferrerModule extends ReactContextBaseJavaModule {
|
|
18
26
|
|
|
19
27
|
/** Name of the worker thread that reads ReferrerDetails off the main thread. */
|
|
20
28
|
private static final String WORKER_THREAD_NAME = "LayersInstallReferrer";
|
|
21
29
|
|
|
30
|
+
/**
|
|
31
|
+
* Overall limit from startConnection to the settled promise.
|
|
32
|
+
* On expiry, the promise resolves null and the connection ends.
|
|
33
|
+
*/
|
|
34
|
+
static final long REFERRER_TIMEOUT_MS = 10_000L;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* One daemon worker thread for every read. It starts with the first read,
|
|
38
|
+
* and later reads queue behind it.
|
|
39
|
+
*/
|
|
40
|
+
private static final ExecutorService WORKER = Executors.newSingleThreadExecutor(r -> {
|
|
41
|
+
Thread t = new Thread(r, WORKER_THREAD_NAME);
|
|
42
|
+
t.setDaemon(true);
|
|
43
|
+
return t;
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/** Holds the connection, timeout and one-result guards for a request. */
|
|
47
|
+
private static final class ReferrerRequest {
|
|
48
|
+
final Object client;
|
|
49
|
+
final Promise promise;
|
|
50
|
+
final AtomicBoolean resolved = new AtomicBoolean(false);
|
|
51
|
+
final AtomicBoolean setupHandled = new AtomicBoolean(false);
|
|
52
|
+
final Handler handler = new Handler(Looper.getMainLooper());
|
|
53
|
+
final Runnable timeout;
|
|
54
|
+
|
|
55
|
+
ReferrerRequest(Object client, Promise promise) {
|
|
56
|
+
this.client = client;
|
|
57
|
+
this.promise = promise;
|
|
58
|
+
// The timeout runs on the main thread. endConnection only unbinds
|
|
59
|
+
// the service and makes no call into the Play Store.
|
|
60
|
+
timeout = () -> {
|
|
61
|
+
if (settle(null)) endConnection(client);
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
boolean settle(Object value) {
|
|
66
|
+
if (!resolved.compareAndSet(false, true)) return false;
|
|
67
|
+
handler.removeCallbacks(timeout);
|
|
68
|
+
promise.resolve(value);
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
22
73
|
public LayersInstallReferrerModule(ReactApplicationContext reactContext) {
|
|
23
74
|
super(reactContext);
|
|
24
75
|
}
|
|
@@ -59,8 +110,13 @@ public class LayersInstallReferrerModule extends ReactContextBaseJavaModule {
|
|
|
59
110
|
}
|
|
60
111
|
}
|
|
61
112
|
|
|
113
|
+
/**
|
|
114
|
+
* Fetch on one shared worker thread and resolve once per request.
|
|
115
|
+
* A 10 second timeout from startConnection resolves an unavailable result as null.
|
|
116
|
+
*/
|
|
62
117
|
@ReactMethod
|
|
63
118
|
public void getInstallReferrer(Promise promise) {
|
|
119
|
+
ReferrerRequest pendingRequest = null;
|
|
64
120
|
try {
|
|
65
121
|
// Use reflection to avoid hard dependency on installreferrer library
|
|
66
122
|
Class<?> clientClass = Class.forName(
|
|
@@ -71,41 +127,46 @@ public class LayersInstallReferrerModule extends ReactContextBaseJavaModule {
|
|
|
71
127
|
|
|
72
128
|
java.lang.reflect.Method buildMethod = builder.getClass().getMethod("build");
|
|
73
129
|
final Object client = buildMethod.invoke(builder);
|
|
130
|
+
final ReferrerRequest request = new ReferrerRequest(client, promise);
|
|
131
|
+
pendingRequest = request;
|
|
74
132
|
|
|
75
133
|
// Get the listener interface class
|
|
76
134
|
Class<?> listenerClass = Class.forName(
|
|
77
135
|
"com.android.installreferrer.api.InstallReferrerStateListener");
|
|
78
136
|
|
|
79
|
-
// Guard against double-resolve: onDisconnected arrives when the Play
|
|
80
|
-
// Store's process dies, which can happen while the worker is reading
|
|
81
|
-
final java.util.concurrent.atomic.AtomicBoolean resolved =
|
|
82
|
-
new java.util.concurrent.atomic.AtomicBoolean(false);
|
|
83
|
-
|
|
84
137
|
// Create a dynamic proxy for the listener
|
|
85
138
|
Object listener = java.lang.reflect.Proxy.newProxyInstance(
|
|
86
139
|
listenerClass.getClassLoader(),
|
|
87
140
|
new Class<?>[]{ listenerClass },
|
|
88
141
|
(proxy, method, args) -> {
|
|
89
142
|
if ("onInstallReferrerSetupFinished".equals(method.getName())) {
|
|
143
|
+
// A reconnect after the Play Store process restarts calls
|
|
144
|
+
// setup again. The first callback owns this request's read.
|
|
145
|
+
if (!request.setupHandled.compareAndSet(false, true)) return null;
|
|
146
|
+
// The timeout or a disconnect already settled this request, so end
|
|
147
|
+
// the connection and read nothing.
|
|
148
|
+
if (request.resolved.get()) {
|
|
149
|
+
endConnection(client);
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
90
152
|
int responseCode = (Integer) args[0];
|
|
91
153
|
if (responseCode == 0) { // OK
|
|
92
154
|
// The Play library calls this listener on the main thread,
|
|
93
155
|
// and getInstallReferrer() is a synchronous binder call into
|
|
94
156
|
// the Play Store. At first launch the Play Store can still be
|
|
95
157
|
// finishing the install and hold that call past 5 s, which
|
|
96
|
-
// Android reports as an ANR. The read runs on
|
|
158
|
+
// Android reports as an ANR. The read runs on the shared worker and
|
|
97
159
|
// this listener returns at once.
|
|
98
|
-
startReferrerRead(
|
|
160
|
+
startReferrerRead(request);
|
|
99
161
|
} else {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
162
|
+
// A failed setup still ends the connection, as the Kotlin,
|
|
163
|
+
// Flutter and Unity SDKs do.
|
|
164
|
+
request.settle(null);
|
|
165
|
+
endConnection(client);
|
|
103
166
|
}
|
|
104
167
|
} else if ("onInstallReferrerServiceDisconnected".equals(method.getName())) {
|
|
105
168
|
// Service disconnected before we could get the referrer
|
|
106
|
-
|
|
107
|
-
promise.resolve(null);
|
|
108
|
-
}
|
|
169
|
+
request.settle(null);
|
|
109
170
|
}
|
|
110
171
|
return null;
|
|
111
172
|
}
|
|
@@ -113,33 +174,30 @@ public class LayersInstallReferrerModule extends ReactContextBaseJavaModule {
|
|
|
113
174
|
|
|
114
175
|
java.lang.reflect.Method startConnection = client.getClass()
|
|
115
176
|
.getMethod("startConnection", listenerClass);
|
|
177
|
+
request.handler.postDelayed(request.timeout, REFERRER_TIMEOUT_MS);
|
|
116
178
|
startConnection.invoke(client, listener);
|
|
117
179
|
} catch (ClassNotFoundException e) {
|
|
118
180
|
// installreferrer library not available
|
|
119
|
-
|
|
181
|
+
if (pendingRequest != null) pendingRequest.settle(null);
|
|
182
|
+
else promise.resolve(null);
|
|
120
183
|
} catch (Exception e) {
|
|
121
|
-
|
|
184
|
+
if (pendingRequest != null) pendingRequest.settle(null);
|
|
185
|
+
else promise.resolve(null);
|
|
122
186
|
}
|
|
123
187
|
}
|
|
124
188
|
|
|
125
189
|
/**
|
|
126
|
-
*
|
|
190
|
+
* Queue {@link #readReferrer} on the shared daemon worker thread, handing it the
|
|
127
191
|
* client captured when the connection started. A device short on memory
|
|
128
192
|
* can refuse a new native thread; that settles the fetch with null and
|
|
129
193
|
* closes the connection here.
|
|
130
194
|
*/
|
|
131
|
-
private static void startReferrerRead(
|
|
132
|
-
final java.util.concurrent.atomic.AtomicBoolean resolved, final Promise promise) {
|
|
195
|
+
private static void startReferrerRead(ReferrerRequest request) {
|
|
133
196
|
try {
|
|
134
|
-
|
|
135
|
-
() -> readReferrer(client, resolved, promise), WORKER_THREAD_NAME);
|
|
136
|
-
worker.setDaemon(true);
|
|
137
|
-
worker.start();
|
|
197
|
+
WORKER.execute(() -> readReferrer(request));
|
|
138
198
|
} catch (Throwable t) {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
endConnection(client);
|
|
199
|
+
request.settle(null);
|
|
200
|
+
endConnection(request.client);
|
|
143
201
|
}
|
|
144
202
|
}
|
|
145
203
|
|
|
@@ -150,9 +208,12 @@ public class LayersInstallReferrerModule extends ReactContextBaseJavaModule {
|
|
|
150
208
|
* (a disconnected client, a missing method, an Error) settles with null,
|
|
151
209
|
* so the promise always completes and the worker never throws.
|
|
152
210
|
*/
|
|
153
|
-
private static void readReferrer(
|
|
154
|
-
|
|
211
|
+
private static void readReferrer(ReferrerRequest request) {
|
|
212
|
+
Object client = request.client;
|
|
155
213
|
try {
|
|
214
|
+
// A timeout or disconnect settled this request in the worker queue,
|
|
215
|
+
// so it makes no Play Store call. The finally block still ends the connection.
|
|
216
|
+
if (request.resolved.get()) return;
|
|
156
217
|
java.lang.reflect.Method getDetails = client.getClass()
|
|
157
218
|
.getMethod("getInstallReferrer");
|
|
158
219
|
Object details = getDetails.invoke(client);
|
|
@@ -188,13 +249,9 @@ public class LayersInstallReferrerModule extends ReactContextBaseJavaModule {
|
|
|
188
249
|
stringField(details, "getInstallVersion"));
|
|
189
250
|
result.putBoolean("googlePlayInstant",
|
|
190
251
|
booleanField(details, "getGooglePlayInstantParam"));
|
|
191
|
-
|
|
192
|
-
promise.resolve(result);
|
|
193
|
-
}
|
|
252
|
+
request.settle(result);
|
|
194
253
|
} catch (Throwable t) {
|
|
195
|
-
|
|
196
|
-
promise.resolve(null);
|
|
197
|
-
}
|
|
254
|
+
request.settle(null);
|
|
198
255
|
} finally {
|
|
199
256
|
endConnection(client);
|
|
200
257
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"att-BDPyE-Gs.d.mts","names":[],"sources":["../src/att.ts"],"sourcesContent":[],"mappings":";KAGY,SAAA;AAAA,iBAsBU,YAAA,CAAA,CAtBD,EAsBiB,OAtBjB,CAsByB,SAtBzB,CAAA;AAsBC,iBAMA,4BAAA,CAAA,CANuB,EAMS,OANT,CAMiB,SANjB,CAAA;AAMvB,iBAUA,cAAA,CAAA,CAV4B,EAUV,OAVsB,CAAA,
|
|
1
|
+
{"version":3,"file":"att-BDPyE-Gs.d.mts","names":[],"sources":["../src/att.ts"],"sourcesContent":[],"mappings":";KAGY,SAAA;AAAA,iBAsBU,YAAA,CAAA,CAtBD,EAsBiB,OAtBjB,CAsByB,SAtBzB,CAAA;AAsBC,iBAMA,4BAAA,CAAA,CANuB,EAMS,OANT,CAMiB,SANjB,CAAA;AAMvB,iBAUA,cAAA,CAAA,CAV4B,EAUV,OAVsB,CAAA,OAAA,CAAR;AAUhC,iBAMA,gBAAA,CAAA,CANyB,EAML,OANK,CAAA,MAAA,GAAA,IAAA,CAAA;AAMzB,iBAQA,WAAA,CAAA,CARoB,EAQL,OARY,CAAA,MAAA,GAAA,IAAA,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-nOFOJqeH.js');
|
|
2
2
|
const require_att = require('./att-CauvkIKr.js');
|
|
3
|
-
const require_src = require('./src-
|
|
3
|
+
const require_src = require('./src-DFrHqimM.js');
|
|
4
4
|
const require_skan = require('./skan-qcOYJKzP.js');
|
|
5
5
|
let __layers_core_wasm = require("@layers/core-wasm");
|
|
6
6
|
__layers_core_wasm = require_chunk.__toESM(__layers_core_wasm);
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as requestTrackingAuthorization, i as isATTAvailable, n as getAdvertisingId, r as getVendorId, t as getATTStatus } from "./att-CnlG_CuV.mjs";
|
|
2
|
-
import { $ as superwallTrackPurchase, A as resolveActiveRoute, B as trackRevenueCatPurchase, C as parseInstallReferrerUrl, Ct as buildExceptionProperties, D as useLayersExpoRouterTracking, E as shouldTreatAsNewInstall, F as registerExpoBackgroundFlush, G as trackPurchaseFailed, H as trackBeginCheckout, I as connectRevenueCat, J as trackSubscription, K as trackRefund, L as isRevenueCatConnected, M as BACKGROUND_FLUSH_MIN_INTERVAL_MINUTES, N as BACKGROUND_FLUSH_TASK_NAME, O as SurveysModule, P as createBackgroundFlushHandler, Q as superwallTrackPresentation, R as resetRevenueCatForTesting, S as parseInstallReferrerDeepLink, St as viewItemEvent, T as setupDeepLinkListener, U as trackOrder, V as trackAddToCart, W as trackPurchase, X as superwallOnEvent, Y as trackViewProduct, Z as superwallTrackDismiss, _ as getFirstInstallTime, _t as signUpEvent, a as buildBeginCheckoutEvent, at as initiateCheckoutEvent, b as getOrSetInstallId, bt as tutorialCompleteEvent, c as buildOnboardingStartEvent, ct as loginEvent, d as buildRefundEvent, dt as paywallShowEvent, et as superwallTrackSkip, f as buildStartTrialEvent, ft as purchaseEvent, g as getAdServicesToken, gt as shareEvent, h as formatFbc, ht as searchEvent, i as buildAddToCartEvent, it as addToWishlistEvent, j as useLayersNavigationTracking, k as createNavigationListener, l as buildPaywallShowEvent, lt as onboardingCompleteEvent, m as buildViewItemEvent, mt as screenViewEvent, n as LayersEvent, nt as StandardEvents, o as buildInstallReferrerProperties, ot as levelCompleteEvent, p as buildSubscribeEvent, pt as registerEvent, q as trackRemoveFromCart, r as LayersReactNative, rt as addToCartEvent, s as buildOnboardingCompleteEvent, st as levelStartEvent, t as LayersError, tt as superwallUserAttributes, u as buildPurchaseEvent, ut as onboardingStartEvent, v as getGoogleAdvertisingId, vt as startTrialEvent, w as readClipboardAttribution, wt as installExceptionAutoCapture, x as parseDeepLink, xt as viewContentEvent, y as getInstallReferrer, yt as subscribeEvent, z as syncRevenueCatAttributes } from "./src-
|
|
2
|
+
import { $ as superwallTrackPurchase, A as resolveActiveRoute, B as trackRevenueCatPurchase, C as parseInstallReferrerUrl, Ct as buildExceptionProperties, D as useLayersExpoRouterTracking, E as shouldTreatAsNewInstall, F as registerExpoBackgroundFlush, G as trackPurchaseFailed, H as trackBeginCheckout, I as connectRevenueCat, J as trackSubscription, K as trackRefund, L as isRevenueCatConnected, M as BACKGROUND_FLUSH_MIN_INTERVAL_MINUTES, N as BACKGROUND_FLUSH_TASK_NAME, O as SurveysModule, P as createBackgroundFlushHandler, Q as superwallTrackPresentation, R as resetRevenueCatForTesting, S as parseInstallReferrerDeepLink, St as viewItemEvent, T as setupDeepLinkListener, U as trackOrder, V as trackAddToCart, W as trackPurchase, X as superwallOnEvent, Y as trackViewProduct, Z as superwallTrackDismiss, _ as getFirstInstallTime, _t as signUpEvent, a as buildBeginCheckoutEvent, at as initiateCheckoutEvent, b as getOrSetInstallId, bt as tutorialCompleteEvent, c as buildOnboardingStartEvent, ct as loginEvent, d as buildRefundEvent, dt as paywallShowEvent, et as superwallTrackSkip, f as buildStartTrialEvent, ft as purchaseEvent, g as getAdServicesToken, gt as shareEvent, h as formatFbc, ht as searchEvent, i as buildAddToCartEvent, it as addToWishlistEvent, j as useLayersNavigationTracking, k as createNavigationListener, l as buildPaywallShowEvent, lt as onboardingCompleteEvent, m as buildViewItemEvent, mt as screenViewEvent, n as LayersEvent, nt as StandardEvents, o as buildInstallReferrerProperties, ot as levelCompleteEvent, p as buildSubscribeEvent, pt as registerEvent, q as trackRemoveFromCart, r as LayersReactNative, rt as addToCartEvent, s as buildOnboardingCompleteEvent, st as levelStartEvent, t as LayersError, tt as superwallUserAttributes, u as buildPurchaseEvent, ut as onboardingStartEvent, v as getGoogleAdvertisingId, vt as startTrialEvent, w as readClipboardAttribution, wt as installExceptionAutoCapture, x as parseDeepLink, xt as viewContentEvent, y as getInstallReferrer, yt as subscribeEvent, z as syncRevenueCatAttributes } from "./src-D-qrATOO.mjs";
|
|
3
3
|
import { t as SKANManager } from "./skan-DO7MLv2w.mjs";
|
|
4
4
|
|
|
5
5
|
export { BACKGROUND_FLUSH_MIN_INTERVAL_MINUTES, BACKGROUND_FLUSH_TASK_NAME, LayersError, LayersEvent, LayersReactNative, SKANManager, StandardEvents, SurveysModule, addToCartEvent, addToWishlistEvent, buildAddToCartEvent, buildBeginCheckoutEvent, buildExceptionProperties, buildInstallReferrerProperties, buildOnboardingCompleteEvent, buildOnboardingStartEvent, buildPaywallShowEvent, buildPurchaseEvent, buildRefundEvent, buildStartTrialEvent, buildSubscribeEvent, buildViewItemEvent, connectRevenueCat, createBackgroundFlushHandler, createNavigationListener, formatFbc, getATTStatus, getAdServicesToken, getAdvertisingId, getFirstInstallTime, getGoogleAdvertisingId, getInstallReferrer, getOrSetInstallId, getVendorId, initiateCheckoutEvent, installExceptionAutoCapture, isATTAvailable, isRevenueCatConnected, levelCompleteEvent, levelStartEvent, loginEvent, onboardingCompleteEvent, onboardingStartEvent, parseDeepLink, parseInstallReferrerDeepLink, parseInstallReferrerUrl, paywallShowEvent, purchaseEvent, readClipboardAttribution, registerEvent, registerExpoBackgroundFlush, requestTrackingAuthorization, resetRevenueCatForTesting, resolveActiveRoute, screenViewEvent, searchEvent, setupDeepLinkListener, shareEvent, shouldTreatAsNewInstall, signUpEvent, startTrialEvent, subscribeEvent, superwallOnEvent, superwallTrackDismiss, superwallTrackPresentation, superwallTrackPurchase, superwallTrackSkip, superwallUserAttributes, syncRevenueCatAttributes, trackAddToCart, trackBeginCheckout, trackOrder, trackPurchase, trackPurchaseFailed, trackRefund, trackRemoveFromCart, trackRevenueCatPurchase, trackSubscription, trackViewProduct, tutorialCompleteEvent, useLayersExpoRouterTracking, useLayersNavigationTracking, viewContentEvent, viewItemEvent };
|
package/dist/react.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-nOFOJqeH.js');
|
|
2
2
|
require('./att-CauvkIKr.js');
|
|
3
|
-
const require_src = require('./src-
|
|
3
|
+
const require_src = require('./src-DFrHqimM.js');
|
|
4
4
|
require('./skan-qcOYJKzP.js');
|
|
5
5
|
let react = require("react");
|
|
6
6
|
react = require_chunk.__toESM(react);
|
package/dist/react.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./att-CnlG_CuV.mjs";
|
|
2
|
-
import { r as LayersReactNative } from "./src-
|
|
2
|
+
import { r as LayersReactNative } from "./src-D-qrATOO.mjs";
|
|
3
3
|
import "./skan-DO7MLv2w.mjs";
|
|
4
4
|
import { createContext, useCallback, useContext, useEffect, useRef } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skan-BljOFaeU.d.mts","names":[],"sources":["../src/skan.ts"],"sourcesContent":[],"mappings":";UAQiB,kBAAA;EAAA,SAAA,EAAA,MAAA;EAUA,UAAA,CAAA,EARF,MAQkB,CAAA,MAAA,EAAA,OAExB,CAAA;EAKQ,eAAW,EAAA,MAAA;EAaX,WAAQ,CAAA,EAAA,KAAA,
|
|
1
|
+
{"version":3,"file":"skan-BljOFaeU.d.mts","names":[],"sources":["../src/skan.ts"],"sourcesContent":[],"mappings":";UAQiB,kBAAA;EAAA,SAAA,EAAA,MAAA;EAUA,UAAA,CAAA,EARF,MAQkB,CAAA,MAAA,EAAA,OAExB,CAAA;EAKQ,eAAW,EAAA,MAAA;EAaX,WAAQ,CAAA,EAAA,KAAA,GAKT,QAAM,GAAA,MAAA;EAQZ,UAAA,CAAA,EAAA,OAAgB;EACT,QAAA,CAAA,EAAA,MAAA;EACD,WAAA,CAAA,EAAA,MAAA;;AAEwB,UArCvB,gBAAA,CAqCuB;EAKnC,IAAA,EAAA,eAAA,GAAA,YAAA,GAAA,KAAA;EAC0B,KAAA,EAzCtB,kBAyCsB,EAAA;EAAO,WAAA,EAAA,MAAA;EAsBtB,QAAA,EAAA,MAAW;AAS3B;AACQ,UApES,WAAA,CAoET;EACE,WAAA,EAAA,OAAA;EAEP,OAAA,EAAA,MAAA;EAAO,YAAA,EAAA,MAAA,GAAA,IAAA;EA8BG,aAAA,EAAW,MAAA,GAAA,IAAA;EAgBZ,SAAA,EAAA,MAAA;EAED,eAAA,EAAA,MAAA;;;;;;AA0FK,UApMC,QAAA,CAoMD;EAAW,aAAA,CAAA,MAAA,EAAA,MAAA,CAAA,EAAA,IAAA;;kDA/LX;;;;;;;;;;UAQN,gBAAA;iBACO;gBACD;wCACwB;wCACA;4FAKnC;+BAC0B;;;;;;;iBAsBf,WAAA,OAAkB;;;;;;iBASZ,iBAAA,OACd,kBACE;;;;IAEP;cA8BU,WAAA;;;;;;;;;UAgBD;qBAED;;;;;;;;6BAgBqB;;;;;wBAqBR;;;;;;8CAS4B,0BAA0B;;;;;;;;;qBAwCzD;gBAIL"}
|
|
@@ -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.5.
|
|
1125
|
+
const SDK_VERSION = "3.5.2";
|
|
1126
1126
|
var LayersReactNative = class LayersReactNative {
|
|
1127
1127
|
core;
|
|
1128
1128
|
eager;
|
|
@@ -3694,4 +3694,4 @@ function useLayersExpoRouterTracking(sdkInstance, usePathname, useGlobalSearchPa
|
|
|
3694
3694
|
|
|
3695
3695
|
//#endregion
|
|
3696
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 };
|
|
3697
|
-
//# sourceMappingURL=src-
|
|
3697
|
+
//# sourceMappingURL=src-D-qrATOO.mjs.map
|