mapp-intelligence-reactnative-plugin 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +19 -8
- package/android/gradle.properties +2 -2
- package/android/settings.gradle +24 -0
- package/android/specs/MappinteligencePluginSpec.js +8 -0
- package/android/src/main/AndroidManifest.xml +3 -1
- package/android/src/main/java/com/mappinteligenceplugin/MappinteligencePluginModule.kt +291 -262
- package/android/src/main/java/com/mappinteligenceplugin/MappinteligencePluginPackage.kt +18 -7
- package/android/src/main/java/com/mappinteligenceplugin/MappintelligencePluginSpec.kt +59 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/Info.plist +48 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIActionEvent.h +33 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MICampaignParameters.h +32 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIDefaultTracker.h +49 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIEcommerceParameters.h +52 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIEventParameters.h +23 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIFormField.h +28 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIFormParameters.h +48 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIFormSubmitEvent.h +22 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIMediaEvent.h +30 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIMediaParameters.h +31 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIPageParameters.h +27 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIPageViewEvent.h +34 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIParamType.h +28 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIParams.h +28 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIProduct.h +28 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIProperties.h +49 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MISessionParameters.h +20 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MITrackerRequest.h +39 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MITrackingEvent.h +23 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIUsageStatistics.h +32 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIUserCategories.h +49 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MappIntelligence.h +260 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MappIntelligenceSDK.h +9 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIActionEvent.h +33 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MICampaignParameters.h +32 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIDefaultTracker.h +49 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIEcommerceParameters.h +52 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIEventParameters.h +23 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIFormField.h +28 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIFormParameters.h +48 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIFormSubmitEvent.h +22 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIMediaEvent.h +30 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIMediaParameters.h +31 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIPageParameters.h +27 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIPageViewEvent.h +34 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIParamType.h +28 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIParams.h +28 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIProduct.h +28 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MISessionParameters.h +20 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MITrackingEvent.h +23 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIUsageStatistics.h +32 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIUserCategories.h +49 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIWebViewTracker.h +21 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MappIntelligence.h +260 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MappIntelligenceLogger.h +47 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MappIntelligenceiOS.h +13 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/libMappIntelligenceiOS.a +0 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIActionEvent.h +33 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MICampaignParameters.h +32 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIDefaultTracker.h +49 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIEcommerceParameters.h +52 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIEventParameters.h +23 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIFormField.h +28 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIFormParameters.h +48 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIFormSubmitEvent.h +22 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIMediaEvent.h +30 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIMediaParameters.h +31 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIPageParameters.h +27 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIPageViewEvent.h +34 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIParamType.h +28 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIParams.h +28 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIProduct.h +28 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIProperties.h +49 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MISessionParameters.h +20 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MITrackerRequest.h +39 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MITrackingEvent.h +23 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIUsageStatistics.h +32 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIUserCategories.h +49 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MappIntelligence.h +260 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MappIntelligenceSDK.h +9 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIActionEvent.h +33 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MICampaignParameters.h +32 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIDefaultTracker.h +49 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIEcommerceParameters.h +52 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIEventParameters.h +23 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIFormField.h +28 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIFormParameters.h +48 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIFormSubmitEvent.h +22 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIMediaEvent.h +30 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIMediaParameters.h +31 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIPageParameters.h +27 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIPageViewEvent.h +34 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIParamType.h +28 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIParams.h +28 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIProduct.h +28 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MISessionParameters.h +20 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MITrackingEvent.h +23 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIUsageStatistics.h +32 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIUserCategories.h +49 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIWebViewTracker.h +21 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MappIntelligence.h +260 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MappIntelligenceLogger.h +47 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MappIntelligenceiOS.h +13 -0
- package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/libMappIntelligenceiOS.a +0 -0
- package/lib/module/GlobalErrorHandler.js +6 -11
- package/lib/module/GlobalErrorHandler.js.map +1 -1
- package/lib/module/MappIntelligencePlugin.js +6 -2
- package/lib/module/MappIntelligencePlugin.js.map +1 -1
- package/lib/module/NativeMappintelligencePlugin.js +5 -0
- package/lib/module/NativeMappintelligencePlugin.js.map +1 -0
- package/lib/module/UseWebTracking.js +20 -20
- package/lib/module/UseWebTracking.js.map +1 -1
- package/lib/module/promiseRejectionHandler.js +4 -9
- package/lib/module/promiseRejectionHandler.js.map +1 -1
- package/lib/typescript/src/GlobalErrorHandler.d.ts.map +1 -1
- package/lib/typescript/src/MappIntelligencePlugin.d.ts.map +1 -1
- package/lib/typescript/src/NativeMappintelligencePlugin.d.ts +39 -0
- package/lib/typescript/src/NativeMappintelligencePlugin.d.ts.map +1 -0
- package/lib/typescript/src/UseWebTracking.d.ts +1 -1
- package/lib/typescript/src/UseWebTracking.d.ts.map +1 -1
- package/lib/typescript/src/promiseRejectionHandler.d.ts.map +1 -1
- package/mapp-intelligence-reactnative-plugin.podspec +4 -1
- package/package.json +20 -41
- package/src/GlobalErrorHandler.tsx +7 -12
- package/src/MappIntelligencePlugin.tsx +16 -11
- package/src/NativeMappintelligencePlugin.ts +55 -0
- package/src/UseWebTracking.tsx +29 -27
- package/src/promiseRejectionHandler.tsx +5 -10
|
@@ -3,7 +3,7 @@ import { WebView } from 'react-native-webview';
|
|
|
3
3
|
type OnMessage = (data: any) => void;
|
|
4
4
|
type OnLoad = () => void;
|
|
5
5
|
export declare const useWebTracking: (onMessage?: OnMessage | null, onLoad?: OnLoad | null) => {
|
|
6
|
-
webViewRef: import("react").RefObject<WebView<{}
|
|
6
|
+
webViewRef: import("react").RefObject<WebView<{}> | null>;
|
|
7
7
|
handleMessage: (event: WebViewMessageEvent) => void;
|
|
8
8
|
handleLoad: () => void;
|
|
9
9
|
getInjectedJavaScript: (script?: string | undefined | null) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UseWebTracking.d.ts","sourceRoot":"","sources":["../../../src/UseWebTracking.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAU/C,KAAK,SAAS,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;AAErC,KAAK,MAAM,GAAG,MAAM,IAAI,CAAC;AAEzB,eAAO,MAAM,cAAc,GACzB,YAAY,SAAS,GAAG,IAAI,EAC5B,SAAS,MAAM,GAAG,IAAI;;
|
|
1
|
+
{"version":3,"file":"UseWebTracking.d.ts","sourceRoot":"","sources":["../../../src/UseWebTracking.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAU/C,KAAK,SAAS,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;AAErC,KAAK,MAAM,GAAG,MAAM,IAAI,CAAC;AAEzB,eAAO,MAAM,cAAc,GACzB,YAAY,SAAS,GAAG,IAAI,EAC5B,SAAS,MAAM,GAAG,IAAI;;2BAiCZ,mBAAmB;;qCA4DW,MAAM,GAAG,SAAS,GAAG,IAAI;CAQlE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promiseRejectionHandler.d.ts","sourceRoot":"","sources":["../../../src/promiseRejectionHandler.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"promiseRejectionHandler.d.ts","sourceRoot":"","sources":["../../../src/promiseRejectionHandler.tsx"],"names":[],"mappings":"AAoCA,eAAO,MAAM,mCAAmC,qCAAgB,CAAC;AAGjE,eAAO,MAAM,mCAAmC,GAAI,YAAO,SAS1D,CAAC"}
|
|
@@ -15,11 +15,14 @@ Pod::Spec.new do |s|
|
|
|
15
15
|
s.source = { :git => "https://github.com/mapp-digital/Mapp-Intelligence-ReactNative-Plugin.git", :tag => "#{s.version}" }
|
|
16
16
|
|
|
17
17
|
s.source_files = "ios/**/*.{h,m,mm}"
|
|
18
|
+
s.vendored_framework = "ios/Frameworks/MappIntelligenceiOS.xcframework"
|
|
19
|
+
s.preserve_path = "ios/Frameworks/"
|
|
20
|
+
s.public_header_files = "ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/"
|
|
21
|
+
s.requires_arc = true
|
|
18
22
|
s.dependency "React-Core"
|
|
19
23
|
s.dependency "React-Codegen"
|
|
20
24
|
s.dependency "RCT-Folly"
|
|
21
25
|
s.dependency "RCTRequired"
|
|
22
26
|
s.dependency "RCTTypeSafety"
|
|
23
27
|
s.dependency "ReactCommon/turbomodule/core"
|
|
24
|
-
s.dependency "MappIntelligence", '5.0.15'
|
|
25
28
|
end
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mapp-intelligence-reactnative-plugin",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "The MappIntelligence SDK allows you to track user activities, screen flow and media usage for an App. All data is send to the MappIntelligence tracking system for further analysis.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
],
|
|
28
28
|
"scripts": {
|
|
29
29
|
"example": "yarn workspace react-native-mappinteligence-plugin-example",
|
|
30
|
+
"install:high-mem": "NODE_OPTIONS=--max-old-space-size=8192 yarn install",
|
|
30
31
|
"test": "jest",
|
|
31
32
|
"typecheck": "tsc --noEmit",
|
|
32
33
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
@@ -53,38 +54,24 @@
|
|
|
53
54
|
"registry": "https://registry.npmjs.org/"
|
|
54
55
|
},
|
|
55
56
|
"peerDependencies": {
|
|
56
|
-
"react": "
|
|
57
|
-
"react-native": ">=0.
|
|
57
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
58
|
+
"react-native": ">=0.83.0 <0.84.0"
|
|
58
59
|
},
|
|
59
60
|
"devDependencies": {
|
|
60
|
-
"@
|
|
61
|
-
"@
|
|
62
|
-
"@react-native-
|
|
63
|
-
"@react
|
|
64
|
-
"@react-native
|
|
65
|
-
"@release-it/conventional-changelog": "^9.0.2",
|
|
66
|
-
"@types/jest": "^29.5.14",
|
|
67
|
-
"@types/react": "^19.0.0",
|
|
68
|
-
"commitlint": "^19.6.1",
|
|
69
|
-
"del-cli": "^5.1.0",
|
|
70
|
-
"eslint": "^9.22.0",
|
|
71
|
-
"eslint-config-prettier": "^10.1.1",
|
|
72
|
-
"eslint-plugin-prettier": "^5.2.3",
|
|
61
|
+
"@react-native-community/cli": "^18.0.0",
|
|
62
|
+
"@react-native/codegen": "0.83.1",
|
|
63
|
+
"@react-native/gradle-plugin": "0.83.1",
|
|
64
|
+
"@types/react": "^19.2.14",
|
|
65
|
+
"@types/react-native": "^0.73.0",
|
|
73
66
|
"jest": "^29.7.0",
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"react": "19.0.0",
|
|
77
|
-
"react-native": "0.79.2",
|
|
67
|
+
"react": "^19.2.0",
|
|
68
|
+
"react-native": "0.83.1",
|
|
78
69
|
"react-native-builder-bob": "^0.35.3",
|
|
79
70
|
"react-native-webview": "^13.13.5",
|
|
80
|
-
"
|
|
81
|
-
"release-it": "^17.2.1",
|
|
82
|
-
"turbo": "^1.10.7",
|
|
83
|
-
"typedoc": "^0.28.4",
|
|
84
|
-
"typescript": "^5.8.3"
|
|
71
|
+
"typescript": "^5.0.0"
|
|
85
72
|
},
|
|
86
73
|
"resolutions": {
|
|
87
|
-
"@types/react": "
|
|
74
|
+
"@types/react": "^19.0.0"
|
|
88
75
|
},
|
|
89
76
|
"workspaces": [
|
|
90
77
|
"example",
|
|
@@ -92,15 +79,7 @@
|
|
|
92
79
|
],
|
|
93
80
|
"packageManager": "yarn@3.6.1",
|
|
94
81
|
"engines": {
|
|
95
|
-
"node": "18
|
|
96
|
-
"engine-strict": "true"
|
|
97
|
-
},
|
|
98
|
-
"jest": {
|
|
99
|
-
"preset": "react-native",
|
|
100
|
-
"modulePathIgnorePatterns": [
|
|
101
|
-
"<rootDir>/example/node_modules",
|
|
102
|
-
"<rootDir>/lib/"
|
|
103
|
-
]
|
|
82
|
+
"node": ">=18"
|
|
104
83
|
},
|
|
105
84
|
"commitlint": {
|
|
106
85
|
"extends": [
|
|
@@ -172,17 +151,17 @@
|
|
|
172
151
|
]
|
|
173
152
|
]
|
|
174
153
|
},
|
|
154
|
+
"create-react-native-library": {
|
|
155
|
+
"languages": "kotlin-objc",
|
|
156
|
+
"type": "turbo-module",
|
|
157
|
+
"cliVersion": "0.50.3"
|
|
158
|
+
},
|
|
175
159
|
"codegenConfig": {
|
|
176
|
-
"name": "
|
|
160
|
+
"name": "MappinteligencePlugin",
|
|
177
161
|
"type": "modules",
|
|
178
162
|
"jsSrcsDir": "src",
|
|
179
163
|
"android": {
|
|
180
164
|
"javaPackageName": "com.mappinteligenceplugin"
|
|
181
165
|
}
|
|
182
|
-
},
|
|
183
|
-
"create-react-native-library": {
|
|
184
|
-
"languages": "kotlin-objc",
|
|
185
|
-
"type": "turbo-module",
|
|
186
|
-
"version": "0.50.3"
|
|
187
166
|
}
|
|
188
167
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { MappIntelligencePlugin } from 'mapp-intelligence-reactnative-plugin';
|
|
2
2
|
|
|
3
|
-
const {
|
|
4
|
-
polyfillGlobal,
|
|
5
|
-
} = require('react-native/Libraries/Utilities/PolyfillFunctions');
|
|
6
3
|
const Promise = require('promise/setimmediate/es6-extensions');
|
|
7
4
|
const tracking = require('promise/setimmediate/rejection-tracking');
|
|
8
5
|
|
|
@@ -31,17 +28,15 @@ export const setGlobalErrorHandler = (
|
|
|
31
28
|
): void => {
|
|
32
29
|
onErrorCallback = errorCallback;
|
|
33
30
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
return Promise;
|
|
31
|
+
tracking.enable({
|
|
32
|
+
allRejections: true,
|
|
33
|
+
onUnhandled: (_: number, error: unknown) => {
|
|
34
|
+
errorHandler(error, false);
|
|
35
|
+
},
|
|
43
36
|
});
|
|
44
37
|
|
|
38
|
+
(global as any).Promise = Promise;
|
|
39
|
+
|
|
45
40
|
ErrorUtils.setGlobalHandler(errorHandler);
|
|
46
41
|
// const prevTracker = getUnhandledPromiseRejectionTracker();
|
|
47
42
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Platform, NativeModules } from 'react-native';
|
|
1
|
+
import { Platform, NativeModules, TurboModuleRegistry } from 'react-native';
|
|
2
2
|
import {
|
|
3
3
|
convertPageParameters,
|
|
4
4
|
convertSessionParamters,
|
|
@@ -26,16 +26,21 @@ const LINKING_ERROR =
|
|
|
26
26
|
'- You rebuilt the app after installing the package\n' +
|
|
27
27
|
'- You are not using Expo Go\n';
|
|
28
28
|
|
|
29
|
-
const mappPlugin =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
const mappPlugin =
|
|
30
|
+
// New Architecture / TurboModules
|
|
31
|
+
TurboModuleRegistry.get('MappinteligencePlugin') ||
|
|
32
|
+
TurboModuleRegistry.get('MappintelligencePlugin') ||
|
|
33
|
+
// Legacy bridge fallback
|
|
34
|
+
NativeModules.MappinteligencePlugin ||
|
|
35
|
+
NativeModules.MappintelligencePlugin ||
|
|
36
|
+
new Proxy(
|
|
37
|
+
{},
|
|
38
|
+
{
|
|
39
|
+
get() {
|
|
40
|
+
throw new Error(LINKING_ERROR);
|
|
41
|
+
},
|
|
42
|
+
}
|
|
43
|
+
);
|
|
39
44
|
|
|
40
45
|
export const MappIntelligencePlugin = {
|
|
41
46
|
/**
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { TurboModule } from 'react-native';
|
|
2
|
+
import { TurboModuleRegistry } from 'react-native';
|
|
3
|
+
|
|
4
|
+
export interface Spec extends TurboModule {
|
|
5
|
+
build(): Promise<number>;
|
|
6
|
+
initWithConfiguration(trackIDs: number[], domain: string): Promise<number>;
|
|
7
|
+
setLogLevel(level: number): Promise<number>;
|
|
8
|
+
setExceptionLogLevel(level: number): Promise<number>;
|
|
9
|
+
setRequestInterval(interval: number): Promise<number>;
|
|
10
|
+
setBatchSupportEnabled(enabled: boolean): Promise<number>;
|
|
11
|
+
setEnableBackgroundSendout(enabled: boolean): Promise<number>;
|
|
12
|
+
setBatchSupportSize(size: number): Promise<number>;
|
|
13
|
+
setRequestPerQueue(numberOfRequests: number): Promise<number>;
|
|
14
|
+
setShouldMigrate(migrate: boolean): Promise<number>;
|
|
15
|
+
setAnonymousTracking(anonymous: boolean): Promise<number>;
|
|
16
|
+
setSendAppVersionInEveryRequest(flag: boolean): Promise<number>;
|
|
17
|
+
setEnableUserMatching(enabled: boolean): Promise<number>;
|
|
18
|
+
trackPage(pageTitle: string): Promise<number>;
|
|
19
|
+
trackCustomPage(
|
|
20
|
+
pageTitle: string,
|
|
21
|
+
pageParameters: Object,
|
|
22
|
+
sessionParameters: Object,
|
|
23
|
+
userCategories: Object,
|
|
24
|
+
ecommerceParameters: Object,
|
|
25
|
+
campaignParameters: Object
|
|
26
|
+
): Promise<number>;
|
|
27
|
+
trackPageWithCustomData(
|
|
28
|
+
pageParameters: { [key: string]: string },
|
|
29
|
+
pageTitle: string
|
|
30
|
+
): Promise<number>;
|
|
31
|
+
trackAction(
|
|
32
|
+
name: string,
|
|
33
|
+
eventParameters: Object,
|
|
34
|
+
sessionParameters: Object,
|
|
35
|
+
userCategories: Object,
|
|
36
|
+
ecommerceParameters: Object,
|
|
37
|
+
campaignParameters: Object
|
|
38
|
+
): Promise<number>;
|
|
39
|
+
trackUrl(url: string, mediaCode?: string): Promise<number>;
|
|
40
|
+
trackMedia(mediaEvent: Object): Promise<number>;
|
|
41
|
+
trackException(name: string, message: string, stackTrace?: string): Promise<number>;
|
|
42
|
+
trackExceptionWithName(name: string, message: string, stackTrace?: string): Promise<number>;
|
|
43
|
+
setEverId(everId?: string): Promise<number>;
|
|
44
|
+
getEverId(): Promise<string>;
|
|
45
|
+
isInitialized(): Promise<boolean>;
|
|
46
|
+
setTemporarySessionId(sessionId?: string): Promise<number>;
|
|
47
|
+
optOut(sendData: boolean): Promise<number>;
|
|
48
|
+
optIn(sendData: boolean): Promise<number>;
|
|
49
|
+
reset(): Promise<number>;
|
|
50
|
+
sendRequestsAndClean(): Promise<number>;
|
|
51
|
+
getCurrentConfig(): Promise<string>;
|
|
52
|
+
nativeCrash(): Promise<void>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export default TurboModuleRegistry.getEnforcing<Spec>('MappinteligencePlugin');
|
package/src/UseWebTracking.tsx
CHANGED
|
@@ -21,30 +21,8 @@ export const useWebTracking = (
|
|
|
21
21
|
) => {
|
|
22
22
|
const webViewRef = useRef<WebView>(null);
|
|
23
23
|
|
|
24
|
-
const handleMessage = useCallback(
|
|
25
|
-
(event: WebViewMessageEvent) => {
|
|
26
|
-
try {
|
|
27
|
-
const message = JSON.parse(event.nativeEvent.data);
|
|
28
|
-
const method = message.method;
|
|
29
|
-
const name = message.name;
|
|
30
|
-
const params = message.params;
|
|
31
24
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (method === 'trackCustomPage') {
|
|
35
|
-
trackCustomPage(name, params);
|
|
36
|
-
} else if (method === 'trackCustomEvent') {
|
|
37
|
-
trackCustomEvent(name, params);
|
|
38
|
-
}
|
|
39
|
-
} catch (error) {
|
|
40
|
-
console.error('Error parsing message from WebView', error);
|
|
41
|
-
}
|
|
42
|
-
onMessage?.(event.nativeEvent.data);
|
|
43
|
-
},
|
|
44
|
-
[onMessage]
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
const trackCustomPage = (name: string, params: any) => {
|
|
25
|
+
const trackCustomPage = useCallback((name: string, params: any) => {
|
|
48
26
|
try {
|
|
49
27
|
const parameters = getJson(params);
|
|
50
28
|
console.log('Page Name: ', name, '; Params: ', parameters);
|
|
@@ -52,9 +30,9 @@ export const useWebTracking = (
|
|
|
52
30
|
} catch (error) {
|
|
53
31
|
console.error(error);
|
|
54
32
|
}
|
|
55
|
-
};
|
|
33
|
+
}, []);
|
|
56
34
|
|
|
57
|
-
const trackCustomEvent = (name: string, params: any) => {
|
|
35
|
+
const trackCustomEvent = useCallback((name: string, params: any) => {
|
|
58
36
|
try {
|
|
59
37
|
const parameters = getJson(params);
|
|
60
38
|
console.log('Event Name: ', name, '; Params: ', parameters);
|
|
@@ -69,7 +47,31 @@ export const useWebTracking = (
|
|
|
69
47
|
} catch (error) {
|
|
70
48
|
console.error(error);
|
|
71
49
|
}
|
|
72
|
-
};
|
|
50
|
+
}, []);
|
|
51
|
+
|
|
52
|
+
const handleMessage = useCallback(
|
|
53
|
+
(event: WebViewMessageEvent) => {
|
|
54
|
+
try {
|
|
55
|
+
const message = JSON.parse(event.nativeEvent.data);
|
|
56
|
+
const method = message.method;
|
|
57
|
+
const name = message.name;
|
|
58
|
+
const params = message.params;
|
|
59
|
+
|
|
60
|
+
console.log(method, name, params);
|
|
61
|
+
|
|
62
|
+
if (method === 'trackCustomPage') {
|
|
63
|
+
trackCustomPage(name, params);
|
|
64
|
+
} else if (method === 'trackCustomEvent') {
|
|
65
|
+
trackCustomEvent(name, params);
|
|
66
|
+
}
|
|
67
|
+
} catch (error) {
|
|
68
|
+
console.error('Error parsing message from WebView', error);
|
|
69
|
+
}
|
|
70
|
+
onMessage?.(event.nativeEvent.data);
|
|
71
|
+
},
|
|
72
|
+
[onMessage, trackCustomPage, trackCustomEvent]
|
|
73
|
+
);
|
|
74
|
+
|
|
73
75
|
|
|
74
76
|
const getJson = (data?: any | null): any => {
|
|
75
77
|
try {
|
|
@@ -106,7 +108,7 @@ export const useWebTracking = (
|
|
|
106
108
|
if (onLoad) {
|
|
107
109
|
onLoad();
|
|
108
110
|
}
|
|
109
|
-
}, []);
|
|
111
|
+
}, [onLoad]);
|
|
110
112
|
|
|
111
113
|
const getInjectedJavaScript = (script?: string | undefined | null) => {
|
|
112
114
|
if (script) {
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const {
|
|
4
|
-
polyfillGlobal,
|
|
5
|
-
} = require('react-native/Libraries/Utilities/PolyfillFunctions');
|
|
6
3
|
const Promise = require('promise/setimmediate/es6-extensions');
|
|
7
4
|
|
|
8
5
|
require('promise/setimmediate/done');
|
|
@@ -43,12 +40,10 @@ export const getUnhandledPromiseRejectionTracker = () => handler;
|
|
|
43
40
|
export const setUnhandledPromiseRejectionTracker = (tracker) => {
|
|
44
41
|
handler = tracker;
|
|
45
42
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
onUnhandled: tracker,
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
return Promise;
|
|
43
|
+
tracking.enable({
|
|
44
|
+
allRejections: true,
|
|
45
|
+
onUnhandled: tracker,
|
|
53
46
|
});
|
|
47
|
+
|
|
48
|
+
(global as any).Promise = Promise;
|
|
54
49
|
};
|