reteno-react-native-sdk 1.4.1 → 1.4.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/android/build.gradle +1 -3
- package/android/src/main/AndroidManifest.xml +9 -0
- package/android/src/main/java/com/retenosdk/RetenoCustomReceiverInAppData.java +74 -0
- package/android/src/main/java/com/retenosdk/RetenoRecommendationsResponse.java +28 -0
- package/android/src/main/java/com/retenosdk/RetenoSdkModule.java +227 -0
- package/ios/EventEmitter.swift +1 -1
- package/ios/RetenoRecommendations.swift +15 -0
- package/ios/RetenoSdk.m +14 -0
- package/ios/RetenoSdk.swift +104 -0
- package/lib/commonjs/index.js +91 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +79 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/index.d.ts +61 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/reteno-react-native-sdk.podspec +1 -1
- package/src/index.ts +150 -0
- package/ios/RetenoSdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/ios/RetenoSdk.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/RetenoSdk.xcodeproj/project.xcworkspace/xcuserdata/oleksiishevchenko.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/RetenoSdk.xcodeproj/xcuserdata/oleksiishevchenko.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -88
- package/ios/RetenoSdk.xcodeproj/xcuserdata/oleksiishevchenko.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
package/android/build.gradle
CHANGED
|
@@ -11,8 +11,6 @@ buildscript {
|
|
|
11
11
|
classpath "com.android.tools.build:gradle:7.2.1"
|
|
12
12
|
// noinspection DifferentKotlinGradleVersion
|
|
13
13
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
14
|
-
// For Firebase Cloud Messaging.
|
|
15
|
-
classpath 'com.google.gms:google-services:4.3.14'
|
|
16
14
|
}
|
|
17
15
|
}
|
|
18
16
|
|
|
@@ -74,7 +72,7 @@ dependencies {
|
|
|
74
72
|
//noinspection GradleDynamicVersion
|
|
75
73
|
implementation "com.facebook.react:react-native"
|
|
76
74
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
77
|
-
implementation 'com.reteno:fcm:
|
|
75
|
+
implementation 'com.reteno:fcm:2.0.4'
|
|
78
76
|
implementation "com.google.firebase:firebase-messaging:23.1.0"
|
|
79
77
|
implementation "com.google.firebase:firebase-messaging-ktx:23.1.0"
|
|
80
78
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
|
|
@@ -9,6 +9,15 @@
|
|
|
9
9
|
<action android:name="com.reteno.custom-push" />
|
|
10
10
|
</intent-filter>
|
|
11
11
|
</receiver>
|
|
12
|
+
<receiver
|
|
13
|
+
android:name="com.retenosdk.RetenoCustomReceiverInAppData"
|
|
14
|
+
android:enabled="true"
|
|
15
|
+
android:exported="false">
|
|
16
|
+
|
|
17
|
+
<intent-filter>
|
|
18
|
+
<action android:name="com.reteno.custom-inapp-data" />
|
|
19
|
+
</intent-filter>
|
|
20
|
+
</receiver>
|
|
12
21
|
<meta-data
|
|
13
22
|
android:name="com.reteno.Receiver.PushReceived"
|
|
14
23
|
android:value="com.retenosdk.RetenoPushReceiver" />
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
package com.retenosdk;
|
|
2
|
+
|
|
3
|
+
import android.app.Activity;
|
|
4
|
+
import android.content.BroadcastReceiver;
|
|
5
|
+
import android.content.Context;
|
|
6
|
+
import android.content.Intent;
|
|
7
|
+
import android.os.Bundle;
|
|
8
|
+
import android.net.Uri;
|
|
9
|
+
import android.webkit.URLUtil;
|
|
10
|
+
|
|
11
|
+
import com.facebook.react.bridge.ReactContext;
|
|
12
|
+
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
|
13
|
+
import com.facebook.react.bridge.Arguments;
|
|
14
|
+
import com.facebook.react.bridge.WritableMap;
|
|
15
|
+
|
|
16
|
+
public class RetenoCustomReceiverInAppData extends BroadcastReceiver {
|
|
17
|
+
@Override
|
|
18
|
+
public void onReceive(Context context, Intent intent) {
|
|
19
|
+
Bundle extras = intent.getExtras();
|
|
20
|
+
if (extras != null) {
|
|
21
|
+
String url = extras.getString("url");
|
|
22
|
+
|
|
23
|
+
handleCustomData(extras, context);
|
|
24
|
+
|
|
25
|
+
if (url != null && URLUtil.isValidUrl(url)) {
|
|
26
|
+
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
|
27
|
+
if (context instanceof Activity) {
|
|
28
|
+
context.startActivity(browserIntent);
|
|
29
|
+
} else {
|
|
30
|
+
browserIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
31
|
+
context.startActivity(browserIntent);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
private void handleCustomData(Bundle extras, Context context) {
|
|
38
|
+
WritableMap eventData = Arguments.createMap();
|
|
39
|
+
WritableMap customDataMap = Arguments.createMap();
|
|
40
|
+
if (extras != null) {
|
|
41
|
+
for (String key : extras.keySet()) {
|
|
42
|
+
Object value = extras.get(key);
|
|
43
|
+
if ("inapp_id".equals(key) || "inapp_source".equals(key) || "url".equals(key)) {
|
|
44
|
+
if (value instanceof String) {
|
|
45
|
+
eventData.putString(key, (String) value);
|
|
46
|
+
} else if (value instanceof Integer) {
|
|
47
|
+
eventData.putInt(key, (Integer) value);
|
|
48
|
+
} else if (value instanceof Boolean) {
|
|
49
|
+
eventData.putBoolean(key, (Boolean) value);
|
|
50
|
+
} else if (value instanceof Double) {
|
|
51
|
+
eventData.putDouble(key, (Double) value);
|
|
52
|
+
}
|
|
53
|
+
} else {
|
|
54
|
+
if (value instanceof String) {
|
|
55
|
+
customDataMap.putString(key, (String) value);
|
|
56
|
+
} else if (value instanceof Integer) {
|
|
57
|
+
customDataMap.putInt(key, (Integer) value);
|
|
58
|
+
} else if (value instanceof Boolean) {
|
|
59
|
+
customDataMap.putBoolean(key, (Boolean) value);
|
|
60
|
+
} else if (value instanceof Double) {
|
|
61
|
+
customDataMap.putDouble(key, (Double) value);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
eventData.putMap("customData", customDataMap);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
ReactContext reactContext = ((RetenoReactNativeApplication) context.getApplicationContext())
|
|
70
|
+
.getReactContext();
|
|
71
|
+
reactContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
|
|
72
|
+
.emit("reteno-in-app-custom-data-received", eventData);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
package com.retenosdk;
|
|
2
|
+
|
|
3
|
+
import androidx.annotation.NonNull;
|
|
4
|
+
import com.google.gson.annotations.SerializedName;
|
|
5
|
+
import com.reteno.core.data.remote.model.recommendation.get.RecomBase;
|
|
6
|
+
|
|
7
|
+
public class RetenoRecommendationsResponse implements RecomBase {
|
|
8
|
+
|
|
9
|
+
@SerializedName("productId")
|
|
10
|
+
private final String productId;
|
|
11
|
+
@SerializedName("descr")
|
|
12
|
+
private final String descr;
|
|
13
|
+
|
|
14
|
+
public RetenoRecommendationsResponse(String productId, String descr) {
|
|
15
|
+
this.productId = productId;
|
|
16
|
+
this.descr = descr;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@NonNull
|
|
20
|
+
@Override
|
|
21
|
+
public String getProductId() {
|
|
22
|
+
return productId;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
public String getDescr() {
|
|
26
|
+
return descr;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -14,12 +14,29 @@ import com.facebook.react.bridge.ReactContext;
|
|
|
14
14
|
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
15
15
|
import com.facebook.react.bridge.ReactMethod;
|
|
16
16
|
import com.facebook.react.bridge.ReadableMap;
|
|
17
|
+
import com.facebook.react.bridge.ReadableArray;
|
|
17
18
|
import com.facebook.react.bridge.WritableMap;
|
|
18
19
|
import com.facebook.react.bridge.WritableNativeMap;
|
|
20
|
+
import com.facebook.react.bridge.WritableArray;
|
|
19
21
|
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
|
20
22
|
import com.reteno.core.RetenoApplication;
|
|
23
|
+
import com.reteno.core.data.remote.model.recommendation.get.Recoms;
|
|
21
24
|
import com.reteno.core.domain.model.user.User;
|
|
22
25
|
import com.reteno.core.domain.model.user.UserAttributesAnonymous;
|
|
26
|
+
import com.reteno.core.domain.model.recommendation.get.RecomRequest;
|
|
27
|
+
import com.reteno.core.domain.model.recommendation.post.RecomEvent;
|
|
28
|
+
import com.reteno.core.domain.model.recommendation.post.RecomEventType;
|
|
29
|
+
import com.reteno.core.domain.model.recommendation.post.RecomEvents;
|
|
30
|
+
import com.reteno.core.view.iam.callback.InAppData;
|
|
31
|
+
import com.reteno.core.view.iam.callback.InAppCloseData;
|
|
32
|
+
import com.reteno.core.view.iam.callback.InAppErrorData;
|
|
33
|
+
import com.reteno.core.view.iam.callback.InAppLifecycleCallback;
|
|
34
|
+
import com.reteno.core.features.recommendation.GetRecommendationResponseCallback;
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
import java.util.ArrayList;
|
|
38
|
+
import java.util.List;
|
|
39
|
+
import java.time.ZonedDateTime;
|
|
23
40
|
|
|
24
41
|
public class RetenoSdkModule extends ReactContextBaseJavaModule {
|
|
25
42
|
public static final String NAME = "RetenoSdk";
|
|
@@ -174,4 +191,214 @@ public class RetenoSdkModule extends ReactContextBaseJavaModule {
|
|
|
174
191
|
promise.reject("Reteno Android SDK forcePushData Error", e);
|
|
175
192
|
}
|
|
176
193
|
}
|
|
194
|
+
|
|
195
|
+
@ReactMethod
|
|
196
|
+
public void pauseInAppMessages(Boolean isPaused, Promise promise) {
|
|
197
|
+
try {
|
|
198
|
+
((RetenoApplication) this.context.getCurrentActivity().getApplication())
|
|
199
|
+
.getRetenoInstance()
|
|
200
|
+
.pauseInAppMessages(isPaused);
|
|
201
|
+
promise.resolve(true);
|
|
202
|
+
} catch (Exception e) {
|
|
203
|
+
promise.reject("Reteno Android SDK pauseInAppMessages Error", e);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
@ReactMethod
|
|
208
|
+
public void updatePushPermissionStatusAndroid(Promise promise) {
|
|
209
|
+
try {
|
|
210
|
+
((RetenoApplication) this.context.getCurrentActivity().getApplication())
|
|
211
|
+
.getRetenoInstance().updatePushPermissionStatus();
|
|
212
|
+
promise.resolve(true);
|
|
213
|
+
} catch (Exception e) {
|
|
214
|
+
promise.reject("Reteno Android SDK forcePushData Error", e);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
private void sendEventToJS(String eventName, WritableMap eventData) {
|
|
219
|
+
ReactContext reactContext = ((RetenoReactNativeApplication) this.context.getApplicationContext())
|
|
220
|
+
.getReactContext();
|
|
221
|
+
reactContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
|
|
222
|
+
.emit(eventName, eventData);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
private InAppLifecycleCallback inAppLifecycleCallback;
|
|
226
|
+
|
|
227
|
+
@ReactMethod
|
|
228
|
+
public void setInAppLifecycleCallback(Promise promise) {
|
|
229
|
+
try {
|
|
230
|
+
inAppLifecycleCallback = new InAppLifecycleCallback() {
|
|
231
|
+
@Override
|
|
232
|
+
public void beforeDisplay(@NonNull InAppData inAppData) {
|
|
233
|
+
WritableMap eventData = Arguments.createMap();
|
|
234
|
+
eventData.putString("source", inAppData.getSource().toString());
|
|
235
|
+
eventData.putString("id", inAppData.getId());
|
|
236
|
+
sendEventToJS("reteno-before-in-app-display", eventData);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
@Override
|
|
240
|
+
public void onDisplay(@NonNull InAppData inAppData) {
|
|
241
|
+
WritableMap eventData = Arguments.createMap();
|
|
242
|
+
eventData.putString("source", inAppData.getSource().toString());
|
|
243
|
+
eventData.putString("id", inAppData.getId());
|
|
244
|
+
sendEventToJS("reteno-on-in-app-display", eventData);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
@Override
|
|
248
|
+
public void beforeClose(@NonNull InAppCloseData closeData) {
|
|
249
|
+
WritableMap eventData = Arguments.createMap();
|
|
250
|
+
eventData.putString("source", closeData.getSource().toString());
|
|
251
|
+
eventData.putString("id", closeData.getId());
|
|
252
|
+
eventData.putString("closeAction", closeData.getCloseAction().toString());
|
|
253
|
+
sendEventToJS("reteno-before-in-app-close", eventData);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
@Override
|
|
257
|
+
public void afterClose(@NonNull InAppCloseData closeData) {
|
|
258
|
+
WritableMap eventData = Arguments.createMap();
|
|
259
|
+
eventData.putString("source", closeData.getSource().toString());
|
|
260
|
+
eventData.putString("id", closeData.getId());
|
|
261
|
+
eventData.putString("closeAction", closeData.getCloseAction().toString());
|
|
262
|
+
sendEventToJS("reteno-after-in-app-close", eventData);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
@Override
|
|
266
|
+
public void onError(@NonNull InAppErrorData errorData) {
|
|
267
|
+
WritableMap eventData = Arguments.createMap();
|
|
268
|
+
eventData.putString("source", errorData.getSource().toString());
|
|
269
|
+
eventData.putString("id", errorData.getId());
|
|
270
|
+
eventData.putString("errorMessage", errorData.getErrorMessage());
|
|
271
|
+
sendEventToJS("reteno-on-in-app-error", eventData);
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
((RetenoApplication) this.context.getCurrentActivity().getApplication())
|
|
275
|
+
.getRetenoInstance().setInAppLifecycleCallback(inAppLifecycleCallback);
|
|
276
|
+
promise.resolve(true);
|
|
277
|
+
} catch (Exception e) {
|
|
278
|
+
promise.reject("Reteno Android SDK setInAppLifecycleCallback Error", e);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
@ReactMethod
|
|
283
|
+
public void removeInAppLifecycleCallback(Promise promise) {
|
|
284
|
+
try {
|
|
285
|
+
if (inAppLifecycleCallback != null) {
|
|
286
|
+
((RetenoApplication) this.context.getCurrentActivity().getApplication()).getRetenoInstance().setInAppLifecycleCallback(null);
|
|
287
|
+
inAppLifecycleCallback = null;
|
|
288
|
+
}
|
|
289
|
+
promise.resolve(true);
|
|
290
|
+
} catch (Exception e) {
|
|
291
|
+
promise.reject("Reteno Android SDK removeInAppLifecycleCallback Error", e);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
private List<String> convertReadableArrayToStringList(ReadableArray array) {
|
|
296
|
+
List<String> list = new ArrayList<>();
|
|
297
|
+
for (int i = 0; i < array.size(); i++) {
|
|
298
|
+
list.add(array.getString(i));
|
|
299
|
+
}
|
|
300
|
+
return list;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
@ReactMethod
|
|
304
|
+
public void getRecommendations(ReadableMap payload, Promise promise) {
|
|
305
|
+
if (payload == null) {
|
|
306
|
+
promise.reject("PayloadError", "Payload cannot be null");
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
String recomVariantId = payload.hasKey("recomVariantId") ? payload.getString("recomVariantId") : null;
|
|
311
|
+
ReadableArray productIdsArray = payload.getArray("productIds");
|
|
312
|
+
ReadableArray fieldsArray = payload.getArray("fields");
|
|
313
|
+
String categoryId = payload.hasKey("categoryId") ? payload.getString("categoryId") : null;
|
|
314
|
+
|
|
315
|
+
if (recomVariantId == null || productIdsArray == null || fieldsArray == null) {
|
|
316
|
+
promise.reject("PayloadError", "Required fields are missing in the payload");
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
List<String> productIds = convertReadableArrayToStringList(productIdsArray);
|
|
321
|
+
List<String> fields = convertReadableArrayToStringList(fieldsArray);
|
|
322
|
+
|
|
323
|
+
RecomRequest request = new RecomRequest(productIds, categoryId, fields, null);
|
|
324
|
+
|
|
325
|
+
((RetenoApplication) this.context.getCurrentActivity().getApplication())
|
|
326
|
+
.getRetenoInstance().getRecommendation().fetchRecommendation(recomVariantId, request, RetenoRecommendationsResponse.class, new GetRecommendationResponseCallback<RetenoRecommendationsResponse>() {
|
|
327
|
+
@Override
|
|
328
|
+
public void onSuccess(@NonNull Recoms<RetenoRecommendationsResponse> response) {
|
|
329
|
+
List<WritableMap> recoms = new ArrayList<>();
|
|
330
|
+
|
|
331
|
+
for (RetenoRecommendationsResponse recom : response.getRecoms()) {
|
|
332
|
+
WritableMap recomMap = Arguments.createMap();
|
|
333
|
+
recomMap.putString("productId", recom.getProductId());
|
|
334
|
+
recomMap.putString("description", recom.getDescr());
|
|
335
|
+
recoms.add(recomMap);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
WritableArray recomsArray = Arguments.createArray();
|
|
339
|
+
for (WritableMap map : recoms) {
|
|
340
|
+
recomsArray.pushMap(map);
|
|
341
|
+
}
|
|
342
|
+
promise.resolve(recomsArray);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
@Override
|
|
346
|
+
public void onSuccessFallbackToJson(@NonNull String response) {
|
|
347
|
+
promise.resolve(response);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
@Override
|
|
351
|
+
public void onFailure(Integer statusCode, String response, Throwable throwable) {
|
|
352
|
+
promise.reject(String.valueOf(statusCode), response, throwable);
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
@ReactMethod
|
|
358
|
+
public void logRecommendationEvent(ReadableMap payload, Promise promise) {
|
|
359
|
+
if (payload == null) {
|
|
360
|
+
promise.reject("PayloadError", "Payload cannot be null");
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
String recomVariantId = payload.hasKey("recomVariantId") ? payload.getString("recomVariantId") : null;
|
|
365
|
+
ReadableArray impressionsArray = payload.hasKey("impressions") ? payload.getArray("impressions") : null;
|
|
366
|
+
ReadableArray clicksArray = payload.hasKey("clicks") ? payload.getArray("clicks") : null;
|
|
367
|
+
|
|
368
|
+
if (recomVariantId == null || impressionsArray == null || clicksArray == null) {
|
|
369
|
+
promise.reject("PayloadError", "Required fields are missing in the payload");
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
try {
|
|
374
|
+
List<RecomEvent> events = new ArrayList<>();
|
|
375
|
+
|
|
376
|
+
for (int i = 0; i < impressionsArray.size(); i++) {
|
|
377
|
+
ReadableMap eventMap = impressionsArray.getMap(i);
|
|
378
|
+
String productId = eventMap.hasKey("productId") ? eventMap.getString("productId") : null;
|
|
379
|
+
if (productId != null) {
|
|
380
|
+
events.add(new RecomEvent(RecomEventType.IMPRESSIONS, ZonedDateTime.now(), productId));
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
for (int i = 0; i < clicksArray.size(); i++) {
|
|
385
|
+
ReadableMap eventMap = clicksArray.getMap(i);
|
|
386
|
+
String productId = eventMap.hasKey("productId") ? eventMap.getString("productId") : null;
|
|
387
|
+
if (productId != null) {
|
|
388
|
+
events.add(new RecomEvent(RecomEventType.CLICKS, ZonedDateTime.now(), productId));
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
RecomEvents recomEvents = new RecomEvents(recomVariantId, events);
|
|
393
|
+
|
|
394
|
+
((RetenoApplication) this.context.getCurrentActivity().getApplication())
|
|
395
|
+
.getRetenoInstance().getRecommendation().logRecommendations(recomEvents);
|
|
396
|
+
|
|
397
|
+
promise.resolve(true);
|
|
398
|
+
} catch (IllegalArgumentException e) {
|
|
399
|
+
promise.reject("InvalidEventType", "Invalid recommendation event type");
|
|
400
|
+
} catch (Exception e) {
|
|
401
|
+
promise.reject("Reteno Android SDK logRecommendationEvent Error", e);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
177
404
|
}
|
package/ios/EventEmitter.swift
CHANGED
|
@@ -19,7 +19,7 @@ class EventEmitter {
|
|
|
19
19
|
|
|
20
20
|
/// All Events which must be support by React Native.
|
|
21
21
|
lazy var allEvents: [String] = {
|
|
22
|
-
var allEventNames: [String] = ["reteno-push-received"]
|
|
22
|
+
var allEventNames: [String] = ["reteno-push-received", "reteno-in-app-custom-data-received", "reteno-before-in-app-display", "reteno-on-in-app-display", "reteno-before-in-app-close", "reteno-after-in-app-close", "reteno-on-in-app-error"]
|
|
23
23
|
|
|
24
24
|
// Append all events here
|
|
25
25
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Reteno
|
|
3
|
+
|
|
4
|
+
struct Recommendation: Decodable, RecommendableProduct {
|
|
5
|
+
public let productId: String
|
|
6
|
+
public let name: String
|
|
7
|
+
public let description: String?
|
|
8
|
+
public let imageUrl: URL?
|
|
9
|
+
public let price: Float
|
|
10
|
+
|
|
11
|
+
enum CodingKeys: String, CodingKey {
|
|
12
|
+
case productId, name, description = "descr", imageUrl, price
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
}
|
package/ios/RetenoSdk.m
CHANGED
|
@@ -24,6 +24,20 @@ RCT_EXTERN_METHOD(setAnonymousUserAttributes:(NSDictionary*)payload
|
|
|
24
24
|
withResolver:(RCTPromiseResolveBlock)resolve
|
|
25
25
|
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
26
26
|
|
|
27
|
+
RCT_EXTERN_METHOD(pauseInAppMessages:(BOOL)isPaused
|
|
28
|
+
withResolver:(RCTPromiseResolveBlock)resolve
|
|
29
|
+
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
30
|
+
|
|
31
|
+
RCT_EXTERN_METHOD(setInAppLifecycleCallback)
|
|
32
|
+
|
|
33
|
+
RCT_EXTERN_METHOD(getRecommendations:(NSDictionary*)payload
|
|
34
|
+
withResolver:(RCTPromiseResolveBlock)resolve
|
|
35
|
+
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
36
|
+
|
|
37
|
+
RCT_EXTERN_METHOD(logRecommendationEvent:(NSDictionary*)payload
|
|
38
|
+
withResolver:(RCTPromiseResolveBlock)resolve
|
|
39
|
+
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
40
|
+
|
|
27
41
|
RCT_EXTERN_METHOD(supportedEvents)
|
|
28
42
|
|
|
29
43
|
+ (BOOL)requiresMainQueueSetup
|
package/ios/RetenoSdk.swift
CHANGED
|
@@ -98,4 +98,108 @@ open class RetenoSdk: RCTEventEmitter {
|
|
|
98
98
|
reject("100", "Reteno iOS SDK setAnonymousUserAttributes Error", error);
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
+
|
|
102
|
+
@objc(pauseInAppMessages:withResolver:withRejecter:)
|
|
103
|
+
func pauseInAppMessages(isPaused: Bool, resolve:RCTPromiseResolveBlock,reject:RCTPromiseRejectBlock) -> Void {
|
|
104
|
+
Reteno.pauseInAppMessages(isPaused: isPaused);
|
|
105
|
+
resolve(true);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@objc(setInAppLifecycleCallback)
|
|
109
|
+
func setInAppLifecycleCallback() {
|
|
110
|
+
Reteno.addInAppStatusHandler { inAppMessageStatus in
|
|
111
|
+
switch inAppMessageStatus {
|
|
112
|
+
case .inAppShouldBeDisplayed:
|
|
113
|
+
self.sendEvent(withName: "reteno-before-in-app-display", body: nil)
|
|
114
|
+
case .inAppIsDisplayed:
|
|
115
|
+
self.sendEvent(withName: "reteno-on-in-app-display", body: nil)
|
|
116
|
+
case .inAppShouldBeClosed(let action):
|
|
117
|
+
self.sendEvent(withName: "reteno-before-in-app-close", body: ["action": action])
|
|
118
|
+
Reteno.addLinkHandler { linkInfo in
|
|
119
|
+
self.sendEvent(withName: "reteno-in-app-custom-data-received", body: ["customData": linkInfo.customData])
|
|
120
|
+
UIApplication.shared.open(linkInfo.url)
|
|
121
|
+
}
|
|
122
|
+
case .inAppIsClosed(let action):
|
|
123
|
+
self.sendEvent(withName: "reteno-after-in-app-close", body: ["action": action])
|
|
124
|
+
case .inAppReceivedError(let error):
|
|
125
|
+
self.sendEvent(withName: "reteno-on-in-app-error", body: ["error": error])
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@objc(getRecommendations:withResolver:withRejecter:)
|
|
131
|
+
func getRecommendations(payload: NSDictionary, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) -> Void {
|
|
132
|
+
guard let recomVariantId = payload["recomVariantId"] as? String,
|
|
133
|
+
let productIds = payload["productIds"] as? [String],
|
|
134
|
+
let categoryId = payload["categoryId"] as? String,
|
|
135
|
+
let filters = payload["filters"] as? [NSDictionary],
|
|
136
|
+
let fields = payload["fields"] as? [String] else {
|
|
137
|
+
let error = NSError(domain: "RetenoSdk", code: 100, userInfo: [NSLocalizedDescriptionKey: "Invalid payload"])
|
|
138
|
+
reject("100", "Reteno iOS SDK Error: Invalid payload", error)
|
|
139
|
+
return
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
var recomFilters: [RecomFilter]? = nil
|
|
143
|
+
if let filters = filters as? [[String: Any]] {
|
|
144
|
+
recomFilters = filters.compactMap { dict in
|
|
145
|
+
guard let name = dict["name"] as? String, let values = dict["values"] as? [String] else {
|
|
146
|
+
return nil
|
|
147
|
+
}
|
|
148
|
+
return RecomFilter(name: name, values: values)
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
Reteno.recommendations().getRecoms(recomVariantId: recomVariantId, productIds: productIds, categoryId: categoryId, filters: recomFilters, fields: fields) { (result: Result<[Recommendation], Error>) in
|
|
153
|
+
|
|
154
|
+
switch result {
|
|
155
|
+
case .success(let recommendations):
|
|
156
|
+
let serializedRecommendations = recommendations.map { recommendation in
|
|
157
|
+
return [
|
|
158
|
+
"productId": recommendation.productId,
|
|
159
|
+
"name": recommendation.name,
|
|
160
|
+
"description": recommendation.description ?? "",
|
|
161
|
+
"imageUrl": recommendation.imageUrl?.absoluteString ?? "",
|
|
162
|
+
"price": recommendation.price
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
resolve(serializedRecommendations)
|
|
166
|
+
|
|
167
|
+
case .failure(let error):
|
|
168
|
+
reject("100", "Reteno iOS SDK getRecommendations Error", error)
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
@objc(logRecommendationEvent:withResolver:withRejecter:)
|
|
174
|
+
func logRecommendationEvent(payload: NSDictionary, resolve:RCTPromiseResolveBlock, reject:RCTPromiseRejectBlock) -> Void {
|
|
175
|
+
|
|
176
|
+
guard let recomVariantId = payload["recomVariantId"] as? String,
|
|
177
|
+
let impressions = payload["impressions"] as? [[String: Any]],
|
|
178
|
+
let clicks = payload["clicks"] as? [[String: Any]],
|
|
179
|
+
let forcePush = payload["forcePush"] as? Bool else {
|
|
180
|
+
let error = NSError(domain: "InvalidPayload", code: 0, userInfo: [NSLocalizedDescriptionKey: "Invalid payload"])
|
|
181
|
+
reject("100", "Reteno iOS SDK logRecommendationEvent Error", error)
|
|
182
|
+
return
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
var impressionEvents: [RecomEvent] = []
|
|
186
|
+
var clickEvents: [RecomEvent] = []
|
|
187
|
+
|
|
188
|
+
for impression in impressions {
|
|
189
|
+
let productId = impression["productId"] as? String
|
|
190
|
+
|
|
191
|
+
impressionEvents.append(RecomEvent(date: Date(), productId: productId ?? ""))
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
for click in clicks {
|
|
195
|
+
let productId = click["productId"] as? String
|
|
196
|
+
|
|
197
|
+
clickEvents.append(RecomEvent(date: Date(), productId: productId ?? ""))
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
Reteno.recommendations().logEvent(recomVariantId: recomVariantId, impressions: impressionEvents, clicks: clickEvents, forcePush: forcePush)
|
|
201
|
+
|
|
202
|
+
let res: [String: Bool] = ["success": true]
|
|
203
|
+
resolve(res)
|
|
204
|
+
}
|
|
101
205
|
}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -4,15 +4,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.CustomEventTypes = void 0;
|
|
7
|
+
exports.addInAppMessageCustomDataHandler = addInAppMessageCustomDataHandler;
|
|
8
|
+
exports.afterInAppCloseHandler = afterInAppCloseHandler;
|
|
9
|
+
exports.beforeInAppCloseHandler = beforeInAppCloseHandler;
|
|
10
|
+
exports.beforeInAppDisplayHandler = beforeInAppDisplayHandler;
|
|
7
11
|
exports.forcePushData = forcePushData;
|
|
8
12
|
exports.getInitialNotification = getInitialNotification;
|
|
13
|
+
exports.getRecommendations = getRecommendations;
|
|
9
14
|
exports.logEvent = logEvent;
|
|
15
|
+
exports.logRecommendationEvent = logRecommendationEvent;
|
|
10
16
|
exports.logScreenView = logScreenView;
|
|
17
|
+
exports.onInAppDisplayHandler = onInAppDisplayHandler;
|
|
18
|
+
exports.onInAppErrorHandler = onInAppErrorHandler;
|
|
19
|
+
exports.pauseInAppMessages = pauseInAppMessages;
|
|
11
20
|
exports.registerForRemoteNotifications = registerForRemoteNotifications;
|
|
21
|
+
exports.removeInAppLifecycleCallback = removeInAppLifecycleCallback;
|
|
12
22
|
exports.setAnonymousUserAttributes = setAnonymousUserAttributes;
|
|
13
23
|
exports.setDeviceToken = setDeviceToken;
|
|
24
|
+
exports.setInAppLifecycleCallback = setInAppLifecycleCallback;
|
|
14
25
|
exports.setOnRetenoPushReceivedListener = setOnRetenoPushReceivedListener;
|
|
15
26
|
exports.setUserAttributes = setUserAttributes;
|
|
27
|
+
exports.updatePushPermissionStatusAndroid = updatePushPermissionStatusAndroid;
|
|
16
28
|
var _reactNative = require("react-native");
|
|
17
29
|
const LINKING_ERROR = `The package 'reteno-react-native-sdk' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({
|
|
18
30
|
ios: "- You have run 'pod install'\n",
|
|
@@ -40,6 +52,12 @@ function setUserAttributes(payload) {
|
|
|
40
52
|
function getInitialNotification() {
|
|
41
53
|
return RetenoSdk.getInitialNotification();
|
|
42
54
|
}
|
|
55
|
+
function getRecommendations(payload) {
|
|
56
|
+
return RetenoSdk.getRecommendations(payload);
|
|
57
|
+
}
|
|
58
|
+
function logRecommendationEvent(payload) {
|
|
59
|
+
return RetenoSdk.logRecommendationEvent(payload);
|
|
60
|
+
}
|
|
43
61
|
const eventEmitter = _reactNative.Platform.select({
|
|
44
62
|
ios: new _reactNative.NativeEventEmitter(RetenoSdk),
|
|
45
63
|
// @ts-ignore
|
|
@@ -48,6 +66,60 @@ const eventEmitter = _reactNative.Platform.select({
|
|
|
48
66
|
function setOnRetenoPushReceivedListener(listener) {
|
|
49
67
|
return eventEmitter.addListener('reteno-push-received', listener);
|
|
50
68
|
}
|
|
69
|
+
function setInAppLifecycleCallback() {
|
|
70
|
+
RetenoSdk.setInAppLifecycleCallback();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Android Only
|
|
75
|
+
*/
|
|
76
|
+
function removeInAppLifecycleCallback() {
|
|
77
|
+
if (_reactNative.Platform.OS === 'android') {
|
|
78
|
+
RetenoSdk.removeInAppLifecycleCallback();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function beforeInAppDisplayHandler(callback) {
|
|
82
|
+
return eventEmitter.addListener('reteno-before-in-app-display', data => {
|
|
83
|
+
if (callback && typeof callback === 'function') {
|
|
84
|
+
callback(data);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
function onInAppDisplayHandler(callback) {
|
|
89
|
+
return eventEmitter.addListener('reteno-on-in-app-display', data => {
|
|
90
|
+
if (callback && typeof callback === 'function') {
|
|
91
|
+
callback(data);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function beforeInAppCloseHandler(callback) {
|
|
96
|
+
return eventEmitter.addListener('reteno-before-in-app-close', data => {
|
|
97
|
+
if (callback && typeof callback === 'function') {
|
|
98
|
+
callback(data);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function afterInAppCloseHandler(callback) {
|
|
103
|
+
return eventEmitter.addListener('reteno-after-in-app-close', data => {
|
|
104
|
+
if (callback && typeof callback === 'function') {
|
|
105
|
+
callback(data);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
function onInAppErrorHandler(callback) {
|
|
110
|
+
return eventEmitter.addListener('reteno-on-in-app-error', data => {
|
|
111
|
+
if (callback && typeof callback === 'function') {
|
|
112
|
+
callback(data);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
function addInAppMessageCustomDataHandler(callback) {
|
|
117
|
+
return eventEmitter.addListener('reteno-in-app-custom-data-received', data => {
|
|
118
|
+
if (callback && typeof callback === 'function') {
|
|
119
|
+
callback(data);
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
51
123
|
|
|
52
124
|
/**
|
|
53
125
|
* Log event
|
|
@@ -78,6 +150,10 @@ function registerForRemoteNotifications() {
|
|
|
78
150
|
function setAnonymousUserAttributes(payload) {
|
|
79
151
|
return RetenoSdk.setAnonymousUserAttributes(payload);
|
|
80
152
|
}
|
|
153
|
+
function pauseInAppMessages(isPaused) {
|
|
154
|
+
return RetenoSdk.pauseInAppMessages(isPaused);
|
|
155
|
+
}
|
|
156
|
+
|
|
81
157
|
/**
|
|
82
158
|
*
|
|
83
159
|
* Reteno caches all events (events, device data, user information, user behavior, screen tracking, push statuses, etc) locally into database
|
|
@@ -99,4 +175,19 @@ function logScreenView(screenName) {
|
|
|
99
175
|
value: screenName
|
|
100
176
|
}]);
|
|
101
177
|
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
*
|
|
181
|
+
* Android only
|
|
182
|
+
*
|
|
183
|
+
* Since Android 13 was released you have to make sure you are handling Notification runtime permissions
|
|
184
|
+
*
|
|
185
|
+
* When user accepts permission, you have to call updatePushPermissionStatus() function from Reteno interface to notify the Reteno SDK that user has granted the permission.
|
|
186
|
+
*/
|
|
187
|
+
function updatePushPermissionStatusAndroid() {
|
|
188
|
+
if (_reactNative.Platform.OS === 'android') {
|
|
189
|
+
return RetenoSdk.updatePushPermissionStatusAndroid();
|
|
190
|
+
}
|
|
191
|
+
return Promise.resolve(undefined);
|
|
192
|
+
}
|
|
102
193
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["LINKING_ERROR","Platform","select","ios","default","CustomEventTypes","RetenoSdk","NativeModules","Proxy","get","Error","setDeviceToken","deviceToken","setUserAttributes","payload","externalUserId","length","getInitialNotification","eventEmitter","NativeEventEmitter","android","DeviceEventEmitter","setOnRetenoPushReceivedListener","listener","addListener","logEvent","eventName","date","parameters","forcePush","registerForRemoteNotifications","
|
|
1
|
+
{"version":3,"names":["LINKING_ERROR","Platform","select","ios","default","CustomEventTypes","RetenoSdk","NativeModules","Proxy","get","Error","setDeviceToken","deviceToken","setUserAttributes","payload","externalUserId","length","getInitialNotification","getRecommendations","logRecommendationEvent","eventEmitter","NativeEventEmitter","android","DeviceEventEmitter","setOnRetenoPushReceivedListener","listener","addListener","setInAppLifecycleCallback","removeInAppLifecycleCallback","OS","beforeInAppDisplayHandler","callback","data","onInAppDisplayHandler","beforeInAppCloseHandler","afterInAppCloseHandler","onInAppErrorHandler","addInAppMessageCustomDataHandler","logEvent","eventName","date","parameters","forcePush","registerForRemoteNotifications","setAnonymousUserAttributes","pauseInAppMessages","isPaused","forcePushData","Date","toISOString","logScreenView","screenName","screenView","name","value","updatePushPermissionStatusAndroid","Promise","resolve","undefined"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAOA,MAAMA,aAAa,GAChB,kF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,IAAI,CAAC;EACzD,CAAC,MAAM,OAAO3C,SAAS,CAACyC,aAAa,EAAE;AACzC;AACA;AACA;AACA;AACA;AACO,SAASG,aAAa,CAACC,UAAkB,EAAE;EAChD,OAAOb,QAAQ,CAACjC,gBAAgB,CAAC+C,UAAU,EAAE,IAAIJ,IAAI,EAAE,CAACC,WAAW,EAAE,EAAE,CACrE;IAAEI,IAAI,EAAEhD,gBAAgB,CAAC+C,UAAU;IAAEE,KAAK,EAAEH;EAAW,CAAC,CACzD,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,iCAAiC,GAAkB;EACjE,IAAItD,qBAAQ,CAAC4B,EAAE,KAAK,SAAS,EAAE;IAC7B,OAAOvB,SAAS,CAACiD,iCAAiC,EAAE;EACtD;EACA,OAAOC,OAAO,CAACC,OAAO,CAACC,SAAS,CAAC;AACnC"}
|
package/lib/module/index.js
CHANGED
|
@@ -24,6 +24,12 @@ export function setUserAttributes(payload) {
|
|
|
24
24
|
export function getInitialNotification() {
|
|
25
25
|
return RetenoSdk.getInitialNotification();
|
|
26
26
|
}
|
|
27
|
+
export function getRecommendations(payload) {
|
|
28
|
+
return RetenoSdk.getRecommendations(payload);
|
|
29
|
+
}
|
|
30
|
+
export function logRecommendationEvent(payload) {
|
|
31
|
+
return RetenoSdk.logRecommendationEvent(payload);
|
|
32
|
+
}
|
|
27
33
|
const eventEmitter = Platform.select({
|
|
28
34
|
ios: new NativeEventEmitter(RetenoSdk),
|
|
29
35
|
// @ts-ignore
|
|
@@ -32,6 +38,60 @@ const eventEmitter = Platform.select({
|
|
|
32
38
|
export function setOnRetenoPushReceivedListener(listener) {
|
|
33
39
|
return eventEmitter.addListener('reteno-push-received', listener);
|
|
34
40
|
}
|
|
41
|
+
export function setInAppLifecycleCallback() {
|
|
42
|
+
RetenoSdk.setInAppLifecycleCallback();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Android Only
|
|
47
|
+
*/
|
|
48
|
+
export function removeInAppLifecycleCallback() {
|
|
49
|
+
if (Platform.OS === 'android') {
|
|
50
|
+
RetenoSdk.removeInAppLifecycleCallback();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
export function beforeInAppDisplayHandler(callback) {
|
|
54
|
+
return eventEmitter.addListener('reteno-before-in-app-display', data => {
|
|
55
|
+
if (callback && typeof callback === 'function') {
|
|
56
|
+
callback(data);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
export function onInAppDisplayHandler(callback) {
|
|
61
|
+
return eventEmitter.addListener('reteno-on-in-app-display', data => {
|
|
62
|
+
if (callback && typeof callback === 'function') {
|
|
63
|
+
callback(data);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
export function beforeInAppCloseHandler(callback) {
|
|
68
|
+
return eventEmitter.addListener('reteno-before-in-app-close', data => {
|
|
69
|
+
if (callback && typeof callback === 'function') {
|
|
70
|
+
callback(data);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
export function afterInAppCloseHandler(callback) {
|
|
75
|
+
return eventEmitter.addListener('reteno-after-in-app-close', data => {
|
|
76
|
+
if (callback && typeof callback === 'function') {
|
|
77
|
+
callback(data);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
export function onInAppErrorHandler(callback) {
|
|
82
|
+
return eventEmitter.addListener('reteno-on-in-app-error', data => {
|
|
83
|
+
if (callback && typeof callback === 'function') {
|
|
84
|
+
callback(data);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
export function addInAppMessageCustomDataHandler(callback) {
|
|
89
|
+
return eventEmitter.addListener('reteno-in-app-custom-data-received', data => {
|
|
90
|
+
if (callback && typeof callback === 'function') {
|
|
91
|
+
callback(data);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
35
95
|
|
|
36
96
|
/**
|
|
37
97
|
* Log event
|
|
@@ -62,6 +122,10 @@ export function registerForRemoteNotifications() {
|
|
|
62
122
|
export function setAnonymousUserAttributes(payload) {
|
|
63
123
|
return RetenoSdk.setAnonymousUserAttributes(payload);
|
|
64
124
|
}
|
|
125
|
+
export function pauseInAppMessages(isPaused) {
|
|
126
|
+
return RetenoSdk.pauseInAppMessages(isPaused);
|
|
127
|
+
}
|
|
128
|
+
|
|
65
129
|
/**
|
|
66
130
|
*
|
|
67
131
|
* Reteno caches all events (events, device data, user information, user behavior, screen tracking, push statuses, etc) locally into database
|
|
@@ -83,4 +147,19 @@ export function logScreenView(screenName) {
|
|
|
83
147
|
value: screenName
|
|
84
148
|
}]);
|
|
85
149
|
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
*
|
|
153
|
+
* Android only
|
|
154
|
+
*
|
|
155
|
+
* Since Android 13 was released you have to make sure you are handling Notification runtime permissions
|
|
156
|
+
*
|
|
157
|
+
* When user accepts permission, you have to call updatePushPermissionStatus() function from Reteno interface to notify the Reteno SDK that user has granted the permission.
|
|
158
|
+
*/
|
|
159
|
+
export function updatePushPermissionStatusAndroid() {
|
|
160
|
+
if (Platform.OS === 'android') {
|
|
161
|
+
return RetenoSdk.updatePushPermissionStatusAndroid();
|
|
162
|
+
}
|
|
163
|
+
return Promise.resolve(undefined);
|
|
164
|
+
}
|
|
86
165
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DeviceEventEmitter","NativeEventEmitter","NativeModules","Platform","LINKING_ERROR","select","ios","default","CustomEventTypes","RetenoSdk","Proxy","get","Error","setDeviceToken","deviceToken","setUserAttributes","payload","externalUserId","length","getInitialNotification","eventEmitter","android","setOnRetenoPushReceivedListener","listener","addListener","logEvent","eventName","date","parameters","forcePush","registerForRemoteNotifications","
|
|
1
|
+
{"version":3,"names":["DeviceEventEmitter","NativeEventEmitter","NativeModules","Platform","LINKING_ERROR","select","ios","default","CustomEventTypes","RetenoSdk","Proxy","get","Error","setDeviceToken","deviceToken","setUserAttributes","payload","externalUserId","length","getInitialNotification","getRecommendations","logRecommendationEvent","eventEmitter","android","setOnRetenoPushReceivedListener","listener","addListener","setInAppLifecycleCallback","removeInAppLifecycleCallback","OS","beforeInAppDisplayHandler","callback","data","onInAppDisplayHandler","beforeInAppCloseHandler","afterInAppCloseHandler","onInAppErrorHandler","addInAppMessageCustomDataHandler","logEvent","eventName","date","parameters","forcePush","registerForRemoteNotifications","setAnonymousUserAttributes","pauseInAppMessages","isPaused","forcePushData","Date","toISOString","logScreenView","screenName","screenView","name","value","updatePushPermissionStatusAndroid","Promise","resolve","undefined"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"AAAA,SACEA,kBAAkB,EAClBC,kBAAkB,EAClBC,aAAa,EACbC,QAAQ,QACH,cAAc;AAErB,MAAMC,aAAa,GAChB,kFAAiF,GAClFD,QAAQ,CAACE,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,WAAYC,gBAAgB;AAE3B,WAFWA,gBAAgB;EAAhBA,gBAAgB;AAAA,GAAhBA,gBAAgB,KAAhBA,gBAAgB;AA+F5B,MAAMC,SAAS,GAAGP,aAAa,CAACO,SAAS,GACrCP,aAAa,CAACO,SAAS,GACvB,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAG,GAAG;IACJ,MAAM,IAAIC,KAAK,CAACR,aAAa,CAAC;EAChC;AACF,CAAC,CACF;AAEL,OAAO,SAASS,cAAc,CAACC,WAAmB,EAAiB;EACjE,OAAOL,SAAS,CAACI,cAAc,CAACC,WAAW,CAAC;AAC9C;AAEA,OAAO,SAASC,iBAAiB,CAC/BC,OAAiC,EAClB;EACf,IACE,CAACA,OAAO,CAACC,cAAc,IACtBD,OAAO,CAACC,cAAc,IAAID,OAAO,CAACC,c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AAC;AACnC"}
|
|
@@ -37,10 +37,61 @@ export type CustomEventParameter = {
|
|
|
37
37
|
name: string;
|
|
38
38
|
value?: string;
|
|
39
39
|
};
|
|
40
|
+
export type InAppDisplayData = {
|
|
41
|
+
id?: string;
|
|
42
|
+
source?: 'DISPLAY_RULES' | 'PUSH_NOTIFICATION';
|
|
43
|
+
};
|
|
44
|
+
export type InAppCloseData = {
|
|
45
|
+
id?: string;
|
|
46
|
+
source?: 'DISPLAY_RULES' | 'PUSH_NOTIFICATION';
|
|
47
|
+
closeAction?: 'OPEN_URL' | 'BUTTON' | 'CLOSE_BUTTON';
|
|
48
|
+
};
|
|
49
|
+
export type InAppErrorData = {
|
|
50
|
+
id?: string;
|
|
51
|
+
source?: 'DISPLAY_RULES' | 'PUSH_NOTIFICATION';
|
|
52
|
+
errorMessage?: string;
|
|
53
|
+
};
|
|
54
|
+
export type InAppCustomData = {
|
|
55
|
+
customData?: Record<string, any>;
|
|
56
|
+
inapp_id?: string;
|
|
57
|
+
inapp_source?: 'DISPLAY_RULES' | 'PUSH_NOTIFICATION';
|
|
58
|
+
url?: string;
|
|
59
|
+
};
|
|
60
|
+
export type RecommendationsPayload = {
|
|
61
|
+
recomVariantId: string;
|
|
62
|
+
productIds: string[];
|
|
63
|
+
categoryId: string;
|
|
64
|
+
filters?: {
|
|
65
|
+
[key: string]: any;
|
|
66
|
+
}[];
|
|
67
|
+
fields: string[];
|
|
68
|
+
};
|
|
69
|
+
export type RecommendationEvent = {
|
|
70
|
+
productId: string;
|
|
71
|
+
};
|
|
72
|
+
export type RecommendationEventPayload = {
|
|
73
|
+
recomVariantId: string;
|
|
74
|
+
impressions: RecommendationEvent[];
|
|
75
|
+
clicks: RecommendationEvent[];
|
|
76
|
+
forcePush?: boolean;
|
|
77
|
+
};
|
|
40
78
|
export declare function setDeviceToken(deviceToken: string): Promise<void>;
|
|
41
79
|
export declare function setUserAttributes(payload: SetUserAttributesPayload): Promise<void>;
|
|
42
80
|
export declare function getInitialNotification(): Promise<any>;
|
|
81
|
+
export declare function getRecommendations(payload: RecommendationsPayload): Promise<any>;
|
|
82
|
+
export declare function logRecommendationEvent(payload: RecommendationEventPayload): Promise<void>;
|
|
43
83
|
export declare function setOnRetenoPushReceivedListener(listener: (event: any) => void): import("react-native").EmitterSubscription;
|
|
84
|
+
export declare function setInAppLifecycleCallback(): void;
|
|
85
|
+
/**
|
|
86
|
+
* Android Only
|
|
87
|
+
*/
|
|
88
|
+
export declare function removeInAppLifecycleCallback(): void;
|
|
89
|
+
export declare function beforeInAppDisplayHandler(callback: (data: InAppDisplayData) => void): import("react-native").EmitterSubscription;
|
|
90
|
+
export declare function onInAppDisplayHandler(callback: (data: InAppDisplayData) => void): import("react-native").EmitterSubscription;
|
|
91
|
+
export declare function beforeInAppCloseHandler(callback: (data: InAppCloseData) => void): import("react-native").EmitterSubscription;
|
|
92
|
+
export declare function afterInAppCloseHandler(callback: (data: InAppCloseData) => void): import("react-native").EmitterSubscription;
|
|
93
|
+
export declare function onInAppErrorHandler(callback: (data: InAppErrorData) => void): import("react-native").EmitterSubscription;
|
|
94
|
+
export declare function addInAppMessageCustomDataHandler(callback: (data: InAppCustomData) => void): import("react-native").EmitterSubscription;
|
|
44
95
|
/**
|
|
45
96
|
* Log event
|
|
46
97
|
* @param eventName name of the event
|
|
@@ -54,6 +105,7 @@ export declare function logEvent(eventName: string, date: string, parameters: Cu
|
|
|
54
105
|
*/
|
|
55
106
|
export declare function registerForRemoteNotifications(): void;
|
|
56
107
|
export declare function setAnonymousUserAttributes(payload: AnonymousUserAttributes): Promise<void>;
|
|
108
|
+
export declare function pauseInAppMessages(isPaused: boolean): Promise<void>;
|
|
57
109
|
/**
|
|
58
110
|
*
|
|
59
111
|
* Reteno caches all events (events, device data, user information, user behavior, screen tracking, push statuses, etc) locally into database
|
|
@@ -65,5 +117,14 @@ export declare function forcePushData(): Promise<void>;
|
|
|
65
117
|
* @param screenName name of the screen
|
|
66
118
|
*/
|
|
67
119
|
export declare function logScreenView(screenName: string): Promise<void>;
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* Android only
|
|
123
|
+
*
|
|
124
|
+
* Since Android 13 was released you have to make sure you are handling Notification runtime permissions
|
|
125
|
+
*
|
|
126
|
+
* When user accepts permission, you have to call updatePushPermissionStatus() function from Reteno interface to notify the Reteno SDK that user has granted the permission.
|
|
127
|
+
*/
|
|
128
|
+
export declare function updatePushPermissionStatusAndroid(): Promise<void>;
|
|
68
129
|
export {};
|
|
69
130
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAaA,oBAAY,gBAAgB;IAC1B,UAAU,eAAe;CAC1B;AAED,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,MAAM,GAAG,KAAK,EAAE,CAAC;AAEtB,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACz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Q,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,8CAOzC;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,8CAM3E;AAED,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,8CAU1C;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CACtB,SAAS,EAAE,MAAM,EAEjB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,oBAAoB,EAAE,EAClC,SAAS,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC,IAAI,CAAC,CAOf;AAED;;GAEG;AACH,wBAAgB,8BAA8B,SAI7C;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnE;AAED;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAK7C;AACD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,iBAI/C;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,IAAI,OAAO,CAAC,IAAI,CAAC,CAKjE"}
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
|
|
|
17
17
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
18
18
|
|
|
19
19
|
s.dependency 'React-Core'
|
|
20
|
-
s.dependency 'Reteno', '
|
|
20
|
+
s.dependency 'Reteno', '2.0.3'
|
|
21
21
|
|
|
22
22
|
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
23
23
|
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
package/src/index.ts
CHANGED
|
@@ -62,6 +62,50 @@ export type CustomEventParameter = {
|
|
|
62
62
|
value?: string;
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
+
export type InAppDisplayData = {
|
|
66
|
+
id?: string;
|
|
67
|
+
source?: 'DISPLAY_RULES' | 'PUSH_NOTIFICATION';
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export type InAppCloseData = {
|
|
71
|
+
id?: string;
|
|
72
|
+
source?: 'DISPLAY_RULES' | 'PUSH_NOTIFICATION';
|
|
73
|
+
closeAction?: 'OPEN_URL' | 'BUTTON' | 'CLOSE_BUTTON';
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export type InAppErrorData = {
|
|
77
|
+
id?: string;
|
|
78
|
+
source?: 'DISPLAY_RULES' | 'PUSH_NOTIFICATION';
|
|
79
|
+
errorMessage?: string;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export type InAppCustomData = {
|
|
83
|
+
customData?: Record<string, any>;
|
|
84
|
+
inapp_id?: string;
|
|
85
|
+
inapp_source?: 'DISPLAY_RULES' | 'PUSH_NOTIFICATION';
|
|
86
|
+
url?: string;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export type RecommendationsPayload = {
|
|
90
|
+
recomVariantId: string;
|
|
91
|
+
productIds: string[];
|
|
92
|
+
categoryId: string;
|
|
93
|
+
filters?: { [key: string]: any }[];
|
|
94
|
+
fields: string[];
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export type RecommendationEvent = {
|
|
98
|
+
productId: string;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export type RecommendationEventPayload = {
|
|
102
|
+
recomVariantId: string;
|
|
103
|
+
impressions: RecommendationEvent[];
|
|
104
|
+
clicks: RecommendationEvent[];
|
|
105
|
+
// forcePush is only for IOS
|
|
106
|
+
forcePush?: boolean;
|
|
107
|
+
};
|
|
108
|
+
|
|
65
109
|
const RetenoSdk = NativeModules.RetenoSdk
|
|
66
110
|
? NativeModules.RetenoSdk
|
|
67
111
|
: new Proxy(
|
|
@@ -93,6 +137,18 @@ export function getInitialNotification(): Promise<any> {
|
|
|
93
137
|
return RetenoSdk.getInitialNotification();
|
|
94
138
|
}
|
|
95
139
|
|
|
140
|
+
export function getRecommendations(
|
|
141
|
+
payload: RecommendationsPayload
|
|
142
|
+
): Promise<any> {
|
|
143
|
+
return RetenoSdk.getRecommendations(payload);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function logRecommendationEvent(
|
|
147
|
+
payload: RecommendationEventPayload
|
|
148
|
+
): Promise<void> {
|
|
149
|
+
return RetenoSdk.logRecommendationEvent(payload);
|
|
150
|
+
}
|
|
151
|
+
|
|
96
152
|
const eventEmitter = Platform.select({
|
|
97
153
|
ios: new NativeEventEmitter(RetenoSdk),
|
|
98
154
|
// @ts-ignore
|
|
@@ -105,6 +161,80 @@ export function setOnRetenoPushReceivedListener(
|
|
|
105
161
|
return eventEmitter.addListener('reteno-push-received', listener);
|
|
106
162
|
}
|
|
107
163
|
|
|
164
|
+
export function setInAppLifecycleCallback() {
|
|
165
|
+
RetenoSdk.setInAppLifecycleCallback();
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Android Only
|
|
170
|
+
*/
|
|
171
|
+
export function removeInAppLifecycleCallback() {
|
|
172
|
+
if (Platform.OS === 'android') {
|
|
173
|
+
RetenoSdk.removeInAppLifecycleCallback();
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export function beforeInAppDisplayHandler(
|
|
178
|
+
callback: (data: InAppDisplayData) => void
|
|
179
|
+
) {
|
|
180
|
+
return eventEmitter.addListener('reteno-before-in-app-display', (data) => {
|
|
181
|
+
if (callback && typeof callback === 'function') {
|
|
182
|
+
callback(data);
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export function onInAppDisplayHandler(
|
|
188
|
+
callback: (data: InAppDisplayData) => void
|
|
189
|
+
) {
|
|
190
|
+
return eventEmitter.addListener('reteno-on-in-app-display', (data) => {
|
|
191
|
+
if (callback && typeof callback === 'function') {
|
|
192
|
+
callback(data);
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export function beforeInAppCloseHandler(
|
|
198
|
+
callback: (data: InAppCloseData) => void
|
|
199
|
+
) {
|
|
200
|
+
return eventEmitter.addListener('reteno-before-in-app-close', (data) => {
|
|
201
|
+
if (callback && typeof callback === 'function') {
|
|
202
|
+
callback(data);
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export function afterInAppCloseHandler(
|
|
208
|
+
callback: (data: InAppCloseData) => void
|
|
209
|
+
) {
|
|
210
|
+
return eventEmitter.addListener('reteno-after-in-app-close', (data) => {
|
|
211
|
+
if (callback && typeof callback === 'function') {
|
|
212
|
+
callback(data);
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export function onInAppErrorHandler(callback: (data: InAppErrorData) => void) {
|
|
218
|
+
return eventEmitter.addListener('reteno-on-in-app-error', (data) => {
|
|
219
|
+
if (callback && typeof callback === 'function') {
|
|
220
|
+
callback(data);
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export function addInAppMessageCustomDataHandler(
|
|
226
|
+
callback: (data: InAppCustomData) => void
|
|
227
|
+
) {
|
|
228
|
+
return eventEmitter.addListener(
|
|
229
|
+
'reteno-in-app-custom-data-received',
|
|
230
|
+
(data) => {
|
|
231
|
+
if (callback && typeof callback === 'function') {
|
|
232
|
+
callback(data);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
|
|
108
238
|
/**
|
|
109
239
|
* Log event
|
|
110
240
|
* @param eventName name of the event
|
|
@@ -141,6 +271,11 @@ export function setAnonymousUserAttributes(
|
|
|
141
271
|
): Promise<void> {
|
|
142
272
|
return RetenoSdk.setAnonymousUserAttributes(payload);
|
|
143
273
|
}
|
|
274
|
+
|
|
275
|
+
export function pauseInAppMessages(isPaused: boolean): Promise<void> {
|
|
276
|
+
return RetenoSdk.pauseInAppMessages(isPaused);
|
|
277
|
+
}
|
|
278
|
+
|
|
144
279
|
/**
|
|
145
280
|
*
|
|
146
281
|
* Reteno caches all events (events, device data, user information, user behavior, screen tracking, push statuses, etc) locally into database
|
|
@@ -161,3 +296,18 @@ export function logScreenView(screenName: string) {
|
|
|
161
296
|
{ name: CustomEventTypes.screenView, value: screenName },
|
|
162
297
|
]);
|
|
163
298
|
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
*
|
|
302
|
+
* Android only
|
|
303
|
+
*
|
|
304
|
+
* Since Android 13 was released you have to make sure you are handling Notification runtime permissions
|
|
305
|
+
*
|
|
306
|
+
* When user accepts permission, you have to call updatePushPermissionStatus() function from Reteno interface to notify the Reteno SDK that user has granted the permission.
|
|
307
|
+
*/
|
|
308
|
+
export function updatePushPermissionStatusAndroid(): Promise<void> {
|
|
309
|
+
if (Platform.OS === 'android') {
|
|
310
|
+
return RetenoSdk.updatePushPermissionStatusAndroid();
|
|
311
|
+
}
|
|
312
|
+
return Promise.resolve(undefined);
|
|
313
|
+
}
|
|
Binary file
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<Bucket
|
|
3
|
-
uuid = "541F07FB-6D60-4295-BE13-75818DE6991C"
|
|
4
|
-
type = "1"
|
|
5
|
-
version = "2.0">
|
|
6
|
-
<Breakpoints>
|
|
7
|
-
<BreakpointProxy
|
|
8
|
-
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
9
|
-
<BreakpointContent
|
|
10
|
-
uuid = "7A9426F6-74F5-4DA7-88B5-21C9D83F6B42"
|
|
11
|
-
shouldBeEnabled = "Yes"
|
|
12
|
-
ignoreCount = "0"
|
|
13
|
-
continueAfterRunningActions = "No"
|
|
14
|
-
filePath = "RetenoUserAttributes.swift"
|
|
15
|
-
startingColumnNumber = "9223372036854775807"
|
|
16
|
-
endingColumnNumber = "9223372036854775807"
|
|
17
|
-
startingLineNumber = "58"
|
|
18
|
-
endingLineNumber = "58"
|
|
19
|
-
landmarkName = "init(dictionary:)"
|
|
20
|
-
landmarkType = "7">
|
|
21
|
-
</BreakpointContent>
|
|
22
|
-
</BreakpointProxy>
|
|
23
|
-
<BreakpointProxy
|
|
24
|
-
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
25
|
-
<BreakpointContent
|
|
26
|
-
uuid = "88143E6B-DD1B-4E5D-BBF6-71B5B23ADE2C"
|
|
27
|
-
shouldBeEnabled = "Yes"
|
|
28
|
-
ignoreCount = "0"
|
|
29
|
-
continueAfterRunningActions = "No"
|
|
30
|
-
filePath = "RetenoUserAttributes.swift"
|
|
31
|
-
startingColumnNumber = "9223372036854775807"
|
|
32
|
-
endingColumnNumber = "9223372036854775807"
|
|
33
|
-
startingLineNumber = "59"
|
|
34
|
-
endingLineNumber = "59"
|
|
35
|
-
landmarkName = "init(dictionary:)"
|
|
36
|
-
landmarkType = "7">
|
|
37
|
-
</BreakpointContent>
|
|
38
|
-
</BreakpointProxy>
|
|
39
|
-
<BreakpointProxy
|
|
40
|
-
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
41
|
-
<BreakpointContent
|
|
42
|
-
uuid = "FB43EC20-7427-469F-B564-CD145C42C109"
|
|
43
|
-
shouldBeEnabled = "Yes"
|
|
44
|
-
ignoreCount = "0"
|
|
45
|
-
continueAfterRunningActions = "No"
|
|
46
|
-
filePath = "RetenoUserAttributes.swift"
|
|
47
|
-
startingColumnNumber = "9223372036854775807"
|
|
48
|
-
endingColumnNumber = "9223372036854775807"
|
|
49
|
-
startingLineNumber = "62"
|
|
50
|
-
endingLineNumber = "62"
|
|
51
|
-
landmarkName = "init(dictionary:)"
|
|
52
|
-
landmarkType = "7">
|
|
53
|
-
</BreakpointContent>
|
|
54
|
-
</BreakpointProxy>
|
|
55
|
-
<BreakpointProxy
|
|
56
|
-
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
57
|
-
<BreakpointContent
|
|
58
|
-
uuid = "A3654F32-CF73-4A70-AC2D-4036964D5A10"
|
|
59
|
-
shouldBeEnabled = "Yes"
|
|
60
|
-
ignoreCount = "0"
|
|
61
|
-
continueAfterRunningActions = "No"
|
|
62
|
-
filePath = "RetenoUserAttributes.swift"
|
|
63
|
-
startingColumnNumber = "9223372036854775807"
|
|
64
|
-
endingColumnNumber = "9223372036854775807"
|
|
65
|
-
startingLineNumber = "63"
|
|
66
|
-
endingLineNumber = "63"
|
|
67
|
-
landmarkName = "init(dictionary:)"
|
|
68
|
-
landmarkType = "7">
|
|
69
|
-
</BreakpointContent>
|
|
70
|
-
</BreakpointProxy>
|
|
71
|
-
<BreakpointProxy
|
|
72
|
-
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
73
|
-
<BreakpointContent
|
|
74
|
-
uuid = "BD3FA7DF-66A9-4195-93E8-2158B08ED8FC"
|
|
75
|
-
shouldBeEnabled = "Yes"
|
|
76
|
-
ignoreCount = "0"
|
|
77
|
-
continueAfterRunningActions = "No"
|
|
78
|
-
filePath = "RetenoUserAttributes.swift"
|
|
79
|
-
startingColumnNumber = "9223372036854775807"
|
|
80
|
-
endingColumnNumber = "9223372036854775807"
|
|
81
|
-
startingLineNumber = "65"
|
|
82
|
-
endingLineNumber = "65"
|
|
83
|
-
landmarkName = "init(dictionary:)"
|
|
84
|
-
landmarkType = "7">
|
|
85
|
-
</BreakpointContent>
|
|
86
|
-
</BreakpointProxy>
|
|
87
|
-
</Breakpoints>
|
|
88
|
-
</Bucket>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
-
<plist version="1.0">
|
|
4
|
-
<dict>
|
|
5
|
-
<key>SchemeUserState</key>
|
|
6
|
-
<dict>
|
|
7
|
-
<key>RetenoSdk.xcscheme_^#shared#^_</key>
|
|
8
|
-
<dict>
|
|
9
|
-
<key>orderHint</key>
|
|
10
|
-
<integer>0</integer>
|
|
11
|
-
</dict>
|
|
12
|
-
</dict>
|
|
13
|
-
</dict>
|
|
14
|
-
</plist>
|