react-native-mapp-plugin 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/.idea/Mapp-Engage-ReactNative-Plugin.iml +9 -0
  2. package/.idea/caches/deviceStreaming.xml +787 -0
  3. package/.idea/misc.xml +6 -0
  4. package/.idea/modules.xml +8 -0
  5. package/.idea/vcs.xml +6 -0
  6. package/CHANGELOG.md +21 -0
  7. package/Mapp.js +36 -7
  8. package/RNMappPlugin.podspec +2 -2
  9. package/android/.settings/org.eclipse.buildship.core.prefs +1 -1
  10. package/android/build.gradle +10 -10
  11. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  12. package/android/settings.gradle +3 -3
  13. package/android/src/main/AndroidManifest.xml +3 -3
  14. package/android/src/main/java/com/reactlibrary/RNMappPluginModule.java +68 -1
  15. package/build/generated/ios/MappEngagePluginSpec/MappEngagePluginSpec-generated.mm +16 -0
  16. package/build/generated/ios/MappEngagePluginSpec/MappEngagePluginSpec.h +38 -0
  17. package/build/generated/ios/MappEngagePluginSpecJSI-generated.cpp +17 -0
  18. package/build/generated/ios/MappEngagePluginSpecJSI.h +19 -0
  19. package/build/generated/ios/RCTAppDependencyProvider.h +25 -0
  20. package/build/generated/ios/RCTAppDependencyProvider.mm +35 -0
  21. package/build/generated/ios/RCTModuleProviders.h +16 -0
  22. package/build/generated/ios/RCTModuleProviders.mm +51 -0
  23. package/build/generated/ios/RCTModulesConformingToProtocolsProvider.h +18 -0
  24. package/build/generated/ios/RCTModulesConformingToProtocolsProvider.mm +54 -0
  25. package/build/generated/ios/RCTThirdPartyComponentsProvider.h +16 -0
  26. package/build/generated/ios/RCTThirdPartyComponentsProvider.mm +30 -0
  27. package/build/generated/ios/ReactAppDependencyProvider.podspec +34 -0
  28. package/ios/Frameworks/AppoxeeLocationServices.xcframework/Info.plist +48 -0
  29. package/ios/Frameworks/AppoxeeLocationServices.xcframework/ios-arm64/libAppoxeeLocationServices.a +0 -0
  30. package/ios/Frameworks/AppoxeeLocationServices.xcframework/ios-arm64_x86_64-simulator/Headers/AppoxeeLocationManager.h +122 -0
  31. package/ios/Frameworks/AppoxeeLocationServices.xcframework/ios-arm64_x86_64-simulator/Headers/AppoxeeLocationServices.h +11 -0
  32. package/ios/Frameworks/AppoxeeLocationServices.xcframework/ios-arm64_x86_64-simulator/libAppoxeeLocationServices.a +0 -0
  33. package/ios/Frameworks/AppoxeeSDK.xcframework/Info.plist +48 -0
  34. package/ios/Frameworks/{AppoxeeSDK.framework/Versions/A → AppoxeeSDK.xcframework/ios-arm64}/Headers/APXClientDevice.h +1 -0
  35. package/ios/Frameworks/{AppoxeeSDK.framework/Versions/A → AppoxeeSDK.xcframework/ios-arm64}/Headers/APXPushNotificationActionButtonAction.h +3 -2
  36. package/ios/Frameworks/{AppoxeeSDK.framework/Versions/A → AppoxeeSDK.xcframework/ios-arm64}/Headers/Appoxee.h +39 -2
  37. package/ios/Frameworks/AppoxeeSDK.xcframework/ios-arm64/libAppoxeeSDK.a +0 -0
  38. package/ios/Frameworks/AppoxeeSDK.xcframework/ios-arm64_x86_64-simulator/Headers/APXClientDevice.h +27 -0
  39. package/ios/Frameworks/AppoxeeSDK.xcframework/ios-arm64_x86_64-simulator/Headers/APXInterfaceService.h +49 -0
  40. package/ios/Frameworks/AppoxeeSDK.xcframework/ios-arm64_x86_64-simulator/Headers/APXPushNotification.h +92 -0
  41. package/ios/Frameworks/AppoxeeSDK.xcframework/ios-arm64_x86_64-simulator/Headers/APXPushNotificationAction.h +20 -0
  42. package/ios/Frameworks/AppoxeeSDK.xcframework/ios-arm64_x86_64-simulator/Headers/APXPushNotificationActionButton.h +19 -0
  43. package/ios/Frameworks/AppoxeeSDK.xcframework/ios-arm64_x86_64-simulator/Headers/APXPushNotificationActionButtonAction.h +36 -0
  44. package/ios/Frameworks/AppoxeeSDK.xcframework/ios-arm64_x86_64-simulator/Headers/APXRichMessage.h +58 -0
  45. package/ios/Frameworks/AppoxeeSDK.xcframework/ios-arm64_x86_64-simulator/Headers/Appoxee.h +877 -0
  46. package/ios/Frameworks/AppoxeeSDK.xcframework/ios-arm64_x86_64-simulator/Headers/AppoxeeManager.h +386 -0
  47. package/ios/Frameworks/AppoxeeSDK.xcframework/ios-arm64_x86_64-simulator/Headers/AppoxeeSDK.h +12 -0
  48. package/ios/Frameworks/AppoxeeSDK.xcframework/ios-arm64_x86_64-simulator/libAppoxeeSDK.a +0 -0
  49. package/ios/RNMappPluginModule.m +25 -0
  50. package/package.json +7 -7
  51. package/ios/Frameworks/AppoxeeLocationServices.framework/Versions/A/AppoxeeLocationServices +0 -0
  52. package/ios/Frameworks/AppoxeeSDK.framework/Versions/A/AppoxeeSDK +0 -0
  53. /package/ios/Frameworks/{AppoxeeLocationServices.framework/Versions/A → AppoxeeLocationServices.xcframework/ios-arm64}/Headers/AppoxeeLocationManager.h +0 -0
  54. /package/ios/Frameworks/{AppoxeeLocationServices.framework/Versions/A → AppoxeeLocationServices.xcframework/ios-arm64}/Headers/AppoxeeLocationServices.h +0 -0
  55. /package/ios/Frameworks/{AppoxeeSDK.framework/Versions/A → AppoxeeSDK.xcframework/ios-arm64}/Headers/APXInterfaceService.h +0 -0
  56. /package/ios/Frameworks/{AppoxeeSDK.framework/Versions/A → AppoxeeSDK.xcframework/ios-arm64}/Headers/APXPushNotification.h +0 -0
  57. /package/ios/Frameworks/{AppoxeeSDK.framework/Versions/A → AppoxeeSDK.xcframework/ios-arm64}/Headers/APXPushNotificationAction.h +0 -0
  58. /package/ios/Frameworks/{AppoxeeSDK.framework/Versions/A → AppoxeeSDK.xcframework/ios-arm64}/Headers/APXPushNotificationActionButton.h +0 -0
  59. /package/ios/Frameworks/{AppoxeeSDK.framework/Versions/A → AppoxeeSDK.xcframework/ios-arm64}/Headers/APXRichMessage.h +0 -0
  60. /package/ios/Frameworks/{AppoxeeSDK.framework/Versions/A → AppoxeeSDK.xcframework/ios-arm64}/Headers/AppoxeeManager.h +0 -0
  61. /package/ios/Frameworks/{AppoxeeSDK.framework/Versions/A → AppoxeeSDK.xcframework/ios-arm64}/Headers/AppoxeeSDK.h +0 -0
package/.idea/misc.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectRootManager">
4
+ <output url="file://$PROJECT_DIR$/out" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/Mapp-Engage-ReactNative-Plugin.iml" filepath="$PROJECT_DIR$/.idea/Mapp-Engage-ReactNative-Plugin.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
package/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ </component>
6
+ </project>
package/CHANGELOG.md ADDED
@@ -0,0 +1,21 @@
1
+ # Version 1.3.2
2
+ - Resolved an issue introduced in version 1.3.1 where changes to the setAlias function declaration caused compatibility problems. The function has been updated to ensure backward compatibility.
3
+
4
+ # Version 1.3.1
5
+ *** Features ***
6
+ - Updated react native version to 0.81.4
7
+ - Updated Gradle to version 8.14.2
8
+ - android minSdk updated to version 24
9
+ - android targetSdk updated to version 36
10
+
11
+ ### Android requrements
12
+ * minimum required node version is 20.19.4
13
+ * minimum requred Gradle version 8.14.2
14
+
15
+ ### iOS Requirements
16
+
17
+ * Additional flag needs to be added under the buildSettings -> OTHER_CPLUSPLUSFLAGS
18
+ -DFOLLY_CFG_NO_COROUTINES=1,
19
+ -DFOLLY_HAVE_CLOCK_GETTIME=1
20
+ * Mapp SDK 6.0.10 -> 6.1.0
21
+ * Mapp Geolocation -> 6.0.7
package/Mapp.js CHANGED
@@ -86,9 +86,14 @@ export class Mapp {
86
86
  * Sets user alias
87
87
  *
88
88
  * @param alias
89
+ * @param resendAttributes
89
90
  */
90
- static setAlias(alias: string): Promise<Boolean> {
91
- return RNMappPluginModule.setAlias(alias);
91
+ static setAlias(alias: string, resendAttributes: boolean): Promise<Boolean> {
92
+ if (resendAttributes !== undefined && resendAttributes !== null) {
93
+ return RNMappPluginModule.setAliasWithResend(alias, resendAttributes);
94
+ } else {
95
+ return RNMappPluginModule.setAlias(alias);
96
+ }
92
97
  }
93
98
 
94
99
  /**
@@ -205,6 +210,22 @@ export class Mapp {
205
210
  }
206
211
  }
207
212
 
213
+ /**
214
+ * Set Custom Attributes
215
+ *
216
+ */
217
+ static setAttributes(attributes: object) {
218
+ return RNMappPluginModule.setAttributes(attributes);
219
+ }
220
+
221
+ /**
222
+ * Get Custom Attributes
223
+ *
224
+ */
225
+ static getAttributes(attributes: array): Promise<Object> {
226
+ return RNMappPluginModule.getAttributes(attributes);
227
+ }
228
+
208
229
  /**
209
230
  * Set Custom Attribute
210
231
  *
@@ -300,13 +321,21 @@ export class Mapp {
300
321
  return RNMappPluginModule.stopGeoFencing();
301
322
  }
302
323
 
303
- static fetchLatestInboxMessage(): Promise<any>{
324
+ static fetchLatestInboxMessage(): Promise<any> {
304
325
  if (Platform.OS == "ios") {
305
- print("fatch latest message for iOS part")
326
+ print("fatch latest message for iOS part");
306
327
  RNMappPluginModule.fetchLatestInboxMessage();
307
- this.addInboxMessagesListener(messages => {
308
- print("message arrived ", messages, " length", messages[messages.length - 1])
309
- messages.sort((message1, message2) => message1["template_id"] > message2["template_id"]);
328
+ this.addInboxMessagesListener((messages) => {
329
+ print(
330
+ "message arrived ",
331
+ messages,
332
+ " length",
333
+ messages[messages.length - 1]
334
+ );
335
+ messages.sort(
336
+ (message1, message2) =>
337
+ message1["template_id"] > message2["template_id"]
338
+ );
310
339
  alert(JSON.stringify(messages[0]));
311
340
  return JSON.stringify(messages[0]);
312
341
  });
@@ -24,9 +24,9 @@ Pod::Spec.new do |s|
24
24
  s.frameworks = "WebKit"
25
25
  s.library = 'sqlite3'
26
26
  s.dependency "React"
27
- s.dependency "MappSDK" , '~> 6.0.10'
27
+ s.dependency "MappSDK" , '~> 6.1.0'
28
28
  s.dependency "MappSDKInapp"
29
- s.dependency "MappSDKGeotargeting", '~> 6.0.6'
29
+ s.dependency "MappSDKGeotargeting", '~> 6.0.7'
30
30
 
31
31
  end
32
32
 
@@ -5,7 +5,7 @@ connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
5
5
  connection.project.dir=
6
6
  eclipse.preferences.version=1
7
7
  gradle.user.home=
8
- java.home=/Users/semsudin.tafilovic/.sdkman/candidates/java/17.0.15-tem
8
+ java.home=/Users/semsudin.tafilovic/.sdkman/candidates/java/11.0.26-tem
9
9
  jvm.arguments=
10
10
  offline.mode=false
11
11
  override.workspace.settings=true
@@ -6,11 +6,11 @@ plugins {
6
6
 
7
7
  android {
8
8
  namespace "com.reactlibrary"
9
- compileSdk = 35
9
+ compileSdk = 36
10
10
 
11
11
  defaultConfig {
12
- minSdk = 21
13
- targetSdk = 35
12
+ minSdk = 24
13
+ targetSdk = 36
14
14
  versionCode = 1
15
15
  versionName = "1.0"
16
16
  }
@@ -22,17 +22,17 @@ android {
22
22
  }
23
23
 
24
24
  dependencies {
25
- implementation "com.facebook.react:react-android:0.79.3"
26
- implementation "org.jetbrains.kotlin:kotlin-stdlib:2.1.21"
27
- implementation 'com.google.code.gson:gson:2.13.0'
25
+ implementation "com.facebook.react:react-android:0.81.4"
26
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:2.2.20"
27
+ implementation 'com.google.code.gson:gson:2.13.2'
28
28
  implementation 'androidx.appcompat:appcompat:1.7.1'
29
- implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.1'
30
- implementation platform('com.google.firebase:firebase-bom:33.15.0')
29
+ implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.4'
30
+ implementation platform('com.google.firebase:firebase-bom:34.3.0')
31
31
  implementation('com.google.firebase:firebase-messaging')
32
32
  api('com.google.android.gms:play-services-location:21.3.0')
33
- implementation 'androidx.media:media:1.7.0'
33
+ implementation 'androidx.media:media:1.7.1'
34
34
  implementation 'androidx.legacy:legacy-support-v13:1.0.0'
35
- implementation("com.mapp.sdk:mapp-android:6.0.29-alpha02")
35
+ implementation("com.mapp.sdk:mapp-android:6.1.2")
36
36
  }
37
37
 
38
38
  react {
@@ -3,5 +3,5 @@ distributionBase=GRADLE_USER_HOME
3
3
  distributionPath=wrapper/dists
4
4
  zipStoreBase=GRADLE_USER_HOME
5
5
  zipStorePath=wrapper/dists
6
- distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
6
+ distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
7
7
  android.enableAapt2=false
@@ -5,9 +5,9 @@ pluginManagement {
5
5
  gradlePluginPortal()
6
6
  }
7
7
  plugins {
8
- id("com.android.library") version("8.10.1") // 👈 for library
9
- id("com.facebook.react") version("0.79.3") // 👈 for React Native
10
- id("org.jetbrains.kotlin.android") version("2.1.21") // 👈 for Kotlin
8
+ id("com.android.library") version("8.13.0") // 👈 for library
9
+ id("com.facebook.react") version("0.81.4") // 👈 for React Native
10
+ id("org.jetbrains.kotlin.android") version("2.2.20") // 👈 for Kotlin
11
11
  }
12
12
  }
13
13
 
@@ -26,16 +26,16 @@
26
26
  </receiver>
27
27
  <activity
28
28
  android:name=".HelperActivity"
29
- android:exported="false"
29
+ android:exported="true"
30
+ android:taskAffinity=""
30
31
  android:theme="@style/HelperActivityStyle">
31
-
32
32
  <intent-filter android:label="mapp">
33
33
 
34
34
  <data android:scheme="apx" />
35
35
  <data android:host="deeplink" />
36
36
 
37
37
  <action android:name="com.appoxee.VIEW_DEEPLINK" />
38
-
38
+ <action android:name="android.intent.action.VIEW" />
39
39
  <category android:name="android.intent.category.DEFAULT" />
40
40
  <category android:name="android.intent.category.BROWSABLE" />
41
41
  <category android:name="${applicationId}" />
@@ -15,6 +15,7 @@ import androidx.core.content.ContextCompat;
15
15
  import com.appoxee.Appoxee;
16
16
  import com.appoxee.AppoxeeOptions;
17
17
  import com.appoxee.DeviceInfo;
18
+ import com.appoxee.GetCustomAttributesCallback;
18
19
  import com.appoxee.internal.inapp.model.APXInboxMessage;
19
20
  import com.appoxee.internal.inapp.model.ApxInAppExtras;
20
21
  import com.appoxee.internal.inapp.model.InAppInboxCallback;
@@ -37,6 +38,8 @@ import com.facebook.react.bridge.Promise;
37
38
  import com.facebook.react.bridge.ReactApplicationContext;
38
39
  import com.facebook.react.bridge.ReactContextBaseJavaModule;
39
40
  import com.facebook.react.bridge.ReactMethod;
41
+ import com.facebook.react.bridge.ReadableArray;
42
+ import com.facebook.react.bridge.ReadableMap;
40
43
  import com.facebook.react.bridge.WritableArray;
41
44
  import com.facebook.react.bridge.WritableMap;
42
45
  import com.facebook.react.bridge.WritableNativeMap;
@@ -49,6 +52,10 @@ import com.google.firebase.messaging.RemoteMessage;
49
52
  import org.json.JSONException;
50
53
  import org.json.JSONObject;
51
54
 
55
+ import java.util.ArrayList;
56
+ import java.util.Collections;
57
+ import java.util.Date;
58
+ import java.util.HashMap;
52
59
  import java.util.Iterator;
53
60
  import java.util.List;
54
61
  import java.util.Map;
@@ -205,7 +212,13 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
205
212
 
206
213
  @ReactMethod
207
214
  public void setAlias(String alias, Promise promise) {
208
- Appoxee.instance().setAlias(alias);
215
+ Appoxee.instance().setAlias(alias, false);
216
+ promise.resolve(true);
217
+ }
218
+
219
+ @ReactMethod
220
+ public void setAliasWithResend(String alias, boolean resendCustomAttributes, Promise promise) {
221
+ Appoxee.instance().setAlias(alias, resendCustomAttributes);
209
222
  promise.resolve(true);
210
223
  }
211
224
 
@@ -283,6 +296,60 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
283
296
  });
284
297
  }
285
298
 
299
+ @ReactMethod
300
+ public void setAttributes(ReadableMap attributes, Promise promise) {
301
+ if (attributes != null) {
302
+ Map<String, Object> internapMap = new HashMap<>();
303
+ attributes.getEntryIterator().forEachRemaining(entry -> {
304
+ Object value = entry.getValue() == null ? "" : entry.getValue();
305
+ String key = entry.getKey();
306
+
307
+ if (value instanceof Number) {
308
+ internapMap.put(key, ((Number) value).doubleValue());
309
+ } else if (value instanceof Boolean) {
310
+ internapMap.put(key, ((Boolean) value).booleanValue());
311
+ } else if (value instanceof Date) {
312
+ internapMap.put(key, ((Date) value).getDate());
313
+ } else {
314
+ internapMap.put(key, ((String) value));
315
+ }
316
+ });
317
+ Appoxee.instance().setAttributes(internapMap);
318
+ }
319
+ promise.resolve(true);
320
+ }
321
+
322
+ @ReactMethod
323
+ public void getAttributes(ReadableArray keys, Promise promise) {
324
+ List<String> internalKeys = new ArrayList<>();
325
+
326
+ if (keys != null && keys.size() > 0) {
327
+ for (int i = 0; i < keys.size(); i++) {
328
+ internalKeys.add(keys.getString(i));
329
+ }
330
+ }
331
+
332
+ if (internalKeys.size() > 0) {
333
+ Appoxee.instance().getCustomAttributes(internalKeys, new GetCustomAttributesCallback() {
334
+ @Override
335
+ public void onSuccess(Map<String, String> customAttributes) {
336
+ WritableMap resultMap = new WritableNativeMap();
337
+ for (Map.Entry<String, String> entry : customAttributes.entrySet()) {
338
+ resultMap.putString(entry.getKey(), entry.getValue());
339
+ }
340
+ promise.resolve(resultMap);
341
+ }
342
+
343
+ @Override
344
+ public void onError(String errorMessage) {
345
+ promise.reject(new Throwable(errorMessage));
346
+ }
347
+ });
348
+ } else {
349
+ promise.resolve(Collections.emptyMap());
350
+ }
351
+ }
352
+
286
353
  @ReactMethod
287
354
  public void setAttribute(String key, String value) {
288
355
  Appoxee.instance().setAttribute(key, value);
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleObjCpp
8
+ *
9
+ * We create an umbrella header (and corresponding implementation) here since
10
+ * Cxx compilation in BUCK has a limitation: source-code producing genrule()s
11
+ * must have a single output. More files => more genrule()s => slower builds.
12
+ */
13
+
14
+ #import "MappEngagePluginSpec.h"
15
+
16
+
@@ -0,0 +1,38 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleObjCpp
8
+ *
9
+ * We create an umbrella header (and corresponding implementation) here since
10
+ * Cxx compilation in BUCK has a limitation: source-code producing genrule()s
11
+ * must have a single output. More files => more genrule()s => slower builds.
12
+ */
13
+
14
+ #ifndef __cplusplus
15
+ #error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
16
+ #endif
17
+
18
+ // Avoid multiple includes of MappEngagePluginSpec symbols
19
+ #ifndef MappEngagePluginSpec_H
20
+ #define MappEngagePluginSpec_H
21
+
22
+ #import <Foundation/Foundation.h>
23
+ #import <RCTRequired/RCTRequired.h>
24
+ #import <RCTTypeSafety/RCTConvertHelpers.h>
25
+ #import <RCTTypeSafety/RCTTypedModuleConstants.h>
26
+ #import <React/RCTBridgeModule.h>
27
+ #import <React/RCTCxxConvert.h>
28
+ #import <React/RCTManagedPointer.h>
29
+ #import <ReactCommon/RCTTurboModule.h>
30
+ #import <optional>
31
+ #import <vector>
32
+
33
+
34
+ NS_ASSUME_NONNULL_BEGIN
35
+
36
+
37
+ NS_ASSUME_NONNULL_END
38
+ #endif // MappEngagePluginSpec_H
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleCpp.js
8
+ */
9
+
10
+ #include "MappEngagePluginSpecJSI.h"
11
+
12
+ namespace facebook::react {
13
+
14
+
15
+
16
+
17
+ } // namespace facebook::react
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleH.js
8
+ */
9
+
10
+ #pragma once
11
+
12
+ #include <ReactCommon/TurboModule.h>
13
+ #include <react/bridging/Bridging.h>
14
+
15
+ namespace facebook::react {
16
+
17
+
18
+
19
+ } // namespace facebook::react
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+ #if __has_include(<React-RCTAppDelegate/RCTDependencyProvider.h>)
12
+ #import <React-RCTAppDelegate/RCTDependencyProvider.h>
13
+ #elif __has_include(<React_RCTAppDelegate/RCTDependencyProvider.h>)
14
+ #import <React_RCTAppDelegate/RCTDependencyProvider.h>
15
+ #else
16
+ #import "RCTDependencyProvider.h"
17
+ #endif
18
+
19
+ NS_ASSUME_NONNULL_BEGIN
20
+
21
+ @interface RCTAppDependencyProvider : NSObject <RCTDependencyProvider>
22
+
23
+ @end
24
+
25
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import "RCTAppDependencyProvider.h"
9
+ #import <ReactCodegen/RCTModulesConformingToProtocolsProvider.h>
10
+ #import <ReactCodegen/RCTThirdPartyComponentsProvider.h>
11
+ #import <ReactCodegen/RCTModuleProviders.h>
12
+
13
+ @implementation RCTAppDependencyProvider
14
+
15
+ - (nonnull NSArray<NSString *> *)URLRequestHandlerClassNames {
16
+ return RCTModulesConformingToProtocolsProvider.URLRequestHandlerClassNames;
17
+ }
18
+
19
+ - (nonnull NSArray<NSString *> *)imageDataDecoderClassNames {
20
+ return RCTModulesConformingToProtocolsProvider.imageDataDecoderClassNames;
21
+ }
22
+
23
+ - (nonnull NSArray<NSString *> *)imageURLLoaderClassNames {
24
+ return RCTModulesConformingToProtocolsProvider.imageURLLoaderClassNames;
25
+ }
26
+
27
+ - (nonnull NSDictionary<NSString *,Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents {
28
+ return RCTThirdPartyComponentsProvider.thirdPartyFabricComponents;
29
+ }
30
+
31
+ - (nonnull NSDictionary<NSString *, id<RCTModuleProvider>> *)moduleProviders {
32
+ return RCTModuleProviders.moduleProviders;
33
+ }
34
+
35
+ @end
@@ -0,0 +1,16 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ @protocol RCTModuleProvider;
11
+
12
+ @interface RCTModuleProviders: NSObject
13
+
14
+ + (NSDictionary<NSString *, id<RCTModuleProvider>> *)moduleProviders;
15
+
16
+ @end
@@ -0,0 +1,51 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ #import "RCTModuleProviders.h"
11
+ #import <ReactCommon/RCTTurboModule.h>
12
+ #import <React/RCTLog.h>
13
+
14
+ @implementation RCTModuleProviders
15
+
16
+ + (NSDictionary<NSString *, id<RCTModuleProvider>> *)moduleProviders
17
+ {
18
+ static NSDictionary<NSString *, id<RCTModuleProvider>> *providers = nil;
19
+ static dispatch_once_t onceToken;
20
+
21
+ dispatch_once(&onceToken, ^{
22
+ NSDictionary<NSString *, NSString *> * moduleMapping = @{
23
+
24
+ };
25
+
26
+ NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithCapacity:moduleMapping.count];
27
+
28
+ for (NSString *key in moduleMapping) {
29
+ NSString * moduleProviderName = moduleMapping[key];
30
+ Class klass = NSClassFromString(moduleProviderName);
31
+ if (!klass) {
32
+ RCTLogError(@"Module provider %@ cannot be found in the runtime", moduleProviderName);
33
+ continue;
34
+ }
35
+
36
+ id instance = [klass new];
37
+ if (![instance respondsToSelector:@selector(getTurboModule:)]) {
38
+ RCTLogError(@"Module provider %@ does not conform to RCTModuleProvider", moduleProviderName);
39
+ continue;
40
+ }
41
+
42
+ [dict setObject:instance forKey:key];
43
+ }
44
+
45
+ providers = dict;
46
+ });
47
+
48
+ return providers;
49
+ }
50
+
51
+ @end
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ @interface RCTModulesConformingToProtocolsProvider: NSObject
11
+
12
+ +(NSArray<NSString *> *)imageURLLoaderClassNames;
13
+
14
+ +(NSArray<NSString *> *)imageDataDecoderClassNames;
15
+
16
+ +(NSArray<NSString *> *)URLRequestHandlerClassNames;
17
+
18
+ @end
@@ -0,0 +1,54 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import "RCTModulesConformingToProtocolsProvider.h"
9
+
10
+ @implementation RCTModulesConformingToProtocolsProvider
11
+
12
+ +(NSArray<NSString *> *)imageURLLoaderClassNames
13
+ {
14
+ static NSArray<NSString *> *classNames = nil;
15
+ static dispatch_once_t onceToken;
16
+
17
+ dispatch_once(&onceToken, ^{
18
+ classNames = @[
19
+
20
+ ];
21
+ });
22
+
23
+ return classNames;
24
+ }
25
+
26
+ +(NSArray<NSString *> *)imageDataDecoderClassNames
27
+ {
28
+ static NSArray<NSString *> *classNames = nil;
29
+ static dispatch_once_t onceToken;
30
+
31
+ dispatch_once(&onceToken, ^{
32
+ classNames = @[
33
+
34
+ ];
35
+ });
36
+
37
+ return classNames;
38
+ }
39
+
40
+ +(NSArray<NSString *> *)URLRequestHandlerClassNames
41
+ {
42
+ static NSArray<NSString *> *classNames = nil;
43
+ static dispatch_once_t onceToken;
44
+
45
+ dispatch_once(&onceToken, ^{
46
+ classNames = @[
47
+
48
+ ];
49
+ });
50
+
51
+ return classNames;
52
+ }
53
+
54
+ @end
@@ -0,0 +1,16 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ @protocol RCTComponentViewProtocol;
11
+
12
+ @interface RCTThirdPartyComponentsProvider: NSObject
13
+
14
+ + (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents;
15
+
16
+ @end
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+ #import "RCTThirdPartyComponentsProvider.h"
12
+ #import <React/RCTComponentViewProtocol.h>
13
+
14
+ @implementation RCTThirdPartyComponentsProvider
15
+
16
+ + (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
17
+ {
18
+ static NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *thirdPartyComponents = nil;
19
+ static dispatch_once_t nativeComponentsToken;
20
+
21
+ dispatch_once(&nativeComponentsToken, ^{
22
+ thirdPartyComponents = @{
23
+
24
+ };
25
+ });
26
+
27
+ return thirdPartyComponents;
28
+ }
29
+
30
+ @end