@multiplayer-app/session-recorder-react-native 0.0.1-beta.9 → 1.0.0-beta.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.
Files changed (178) hide show
  1. package/README.md +708 -83
  2. package/SessionRecorderNative.podspec +26 -0
  3. package/android/build.gradle +2 -0
  4. package/copy-react-native-dist.sh +33 -9
  5. package/dist/components/ScreenRecorderView/ScreenRecorderView.js +1 -1
  6. package/dist/components/ScreenRecorderView/ScreenRecorderView.js.map +1 -1
  7. package/dist/components/SessionRecorderWidget/ErrorBanner.d.ts +7 -0
  8. package/dist/components/SessionRecorderWidget/ErrorBanner.js +1 -0
  9. package/dist/components/SessionRecorderWidget/ErrorBanner.js.map +1 -0
  10. package/dist/components/SessionRecorderWidget/FinalPopover.d.ts +4 -3
  11. package/dist/components/SessionRecorderWidget/FinalPopover.js +1 -1
  12. package/dist/components/SessionRecorderWidget/FinalPopover.js.map +1 -1
  13. package/dist/components/SessionRecorderWidget/InitialPopover.d.ts +6 -3
  14. package/dist/components/SessionRecorderWidget/InitialPopover.js +1 -1
  15. package/dist/components/SessionRecorderWidget/InitialPopover.js.map +1 -1
  16. package/dist/components/SessionRecorderWidget/ModalContainer.js +1 -1
  17. package/dist/components/SessionRecorderWidget/ModalContainer.js.map +1 -1
  18. package/dist/components/SessionRecorderWidget/SessionRecorderWidget.js +1 -1
  19. package/dist/components/SessionRecorderWidget/SessionRecorderWidget.js.map +1 -1
  20. package/dist/components/SessionRecorderWidget/styles.d.ts +27 -7
  21. package/dist/components/SessionRecorderWidget/styles.js +1 -1
  22. package/dist/components/SessionRecorderWidget/styles.js.map +1 -1
  23. package/dist/components/index.d.ts +0 -1
  24. package/dist/components/index.js +1 -1
  25. package/dist/components/index.js.map +1 -1
  26. package/dist/config/constants.js +1 -1
  27. package/dist/config/constants.js.map +1 -1
  28. package/dist/config/defaults.d.ts +4 -4
  29. package/dist/config/defaults.js +1 -1
  30. package/dist/config/defaults.js.map +1 -1
  31. package/dist/config/masking.d.ts +2 -2
  32. package/dist/config/masking.js +1 -1
  33. package/dist/config/masking.js.map +1 -1
  34. package/dist/config/session-recorder.js +1 -1
  35. package/dist/config/session-recorder.js.map +1 -1
  36. package/dist/config/validators.d.ts +1 -1
  37. package/dist/config/validators.js +1 -1
  38. package/dist/config/validators.js.map +1 -1
  39. package/dist/config/widget.d.ts +9 -0
  40. package/dist/config/widget.js +1 -0
  41. package/dist/config/widget.js.map +1 -0
  42. package/dist/context/SessionRecorderContext.d.ts +11 -4
  43. package/dist/context/SessionRecorderContext.js +1 -1
  44. package/dist/context/SessionRecorderContext.js.map +1 -1
  45. package/dist/context/SessionRecorderStore.d.ts +12 -0
  46. package/dist/context/SessionRecorderStore.js +1 -0
  47. package/dist/context/SessionRecorderStore.js.map +1 -0
  48. package/dist/context/useSessionRecorderStore.d.ts +8 -0
  49. package/dist/context/useSessionRecorderStore.js +1 -0
  50. package/dist/context/useSessionRecorderStore.js.map +1 -0
  51. package/dist/context/useStoreSelector.d.ts +4 -0
  52. package/dist/context/useStoreSelector.js +1 -0
  53. package/dist/context/useStoreSelector.js.map +1 -0
  54. package/dist/index.d.ts +1 -0
  55. package/dist/index.js +1 -1
  56. package/dist/index.js.map +1 -1
  57. package/dist/native/GestureRecorderNative.d.ts +57 -0
  58. package/dist/native/GestureRecorderNative.js +1 -0
  59. package/dist/native/GestureRecorderNative.js.map +1 -0
  60. package/dist/native/SessionRecorderNative.d.ts +17 -5
  61. package/dist/native/SessionRecorderNative.js +1 -1
  62. package/dist/native/SessionRecorderNative.js.map +1 -1
  63. package/dist/native/index.d.ts +2 -0
  64. package/dist/native/index.js +1 -0
  65. package/dist/native/index.js.map +1 -0
  66. package/dist/otel/index.js +1 -1
  67. package/dist/otel/index.js.map +1 -1
  68. package/dist/patch/xhr.js +1 -1
  69. package/dist/patch/xhr.js.map +1 -1
  70. package/dist/recorder/eventExporter.d.ts +4 -1
  71. package/dist/recorder/eventExporter.js +1 -1
  72. package/dist/recorder/eventExporter.js.map +1 -1
  73. package/dist/recorder/gestureRecorder.d.ts +28 -62
  74. package/dist/recorder/gestureRecorder.js +1 -1
  75. package/dist/recorder/gestureRecorder.js.map +1 -1
  76. package/dist/recorder/index.d.ts +2 -0
  77. package/dist/recorder/index.js +1 -1
  78. package/dist/recorder/index.js.map +1 -1
  79. package/dist/recorder/navigationTracker.d.ts +4 -19
  80. package/dist/recorder/navigationTracker.js +1 -1
  81. package/dist/recorder/navigationTracker.js.map +1 -1
  82. package/dist/recorder/screenRecorder.d.ts +10 -5
  83. package/dist/recorder/screenRecorder.js +1 -1
  84. package/dist/recorder/screenRecorder.js.map +1 -1
  85. package/dist/services/api.service.d.ts +12 -3
  86. package/dist/services/api.service.js +1 -1
  87. package/dist/services/api.service.js.map +1 -1
  88. package/dist/services/network.service.d.ts +46 -0
  89. package/dist/services/network.service.js +1 -0
  90. package/dist/services/network.service.js.map +1 -0
  91. package/dist/services/screenMaskingService.d.ts +13 -5
  92. package/dist/services/screenMaskingService.js +1 -1
  93. package/dist/services/screenMaskingService.js.map +1 -1
  94. package/dist/services/storage.service.js +1 -1
  95. package/dist/services/storage.service.js.map +1 -1
  96. package/dist/session-recorder.d.ts +17 -33
  97. package/dist/session-recorder.js +1 -1
  98. package/dist/session-recorder.js.map +1 -1
  99. package/dist/types/configs.d.ts +85 -0
  100. package/dist/types/configs.js +1 -0
  101. package/dist/types/configs.js.map +1 -0
  102. package/dist/types/index.d.ts +1 -0
  103. package/dist/types/index.js +1 -1
  104. package/dist/types/index.js.map +1 -1
  105. package/dist/types/session-recorder.d.ts +105 -138
  106. package/dist/types/session-recorder.js +1 -1
  107. package/dist/types/session-recorder.js.map +1 -1
  108. package/dist/utils/constants.optional.d.ts +21 -0
  109. package/dist/utils/constants.optional.expo.d.ts +3 -0
  110. package/dist/utils/constants.optional.expo.js +1 -0
  111. package/dist/utils/constants.optional.expo.js.map +1 -0
  112. package/dist/utils/constants.optional.js +1 -0
  113. package/dist/utils/constants.optional.js.map +1 -0
  114. package/dist/utils/createStore.d.ts +8 -0
  115. package/dist/utils/createStore.js +1 -0
  116. package/dist/utils/createStore.js.map +1 -0
  117. package/dist/utils/logger.d.ts +2 -7
  118. package/dist/utils/logger.js +1 -1
  119. package/dist/utils/logger.js.map +1 -1
  120. package/dist/utils/platform.d.ts +8 -0
  121. package/dist/utils/platform.js +1 -1
  122. package/dist/utils/platform.js.map +1 -1
  123. package/dist/utils/rrweb-events.d.ts +4 -3
  124. package/dist/utils/rrweb-events.js +1 -1
  125. package/dist/utils/rrweb-events.js.map +1 -1
  126. package/dist/utils/session.d.ts +2 -1
  127. package/dist/utils/session.js +1 -1
  128. package/dist/utils/session.js.map +1 -1
  129. package/dist/utils/shallowEqual.d.ts +1 -0
  130. package/dist/utils/shallowEqual.js +1 -0
  131. package/dist/utils/shallowEqual.js.map +1 -0
  132. package/dist/version.d.ts +1 -1
  133. package/dist/version.js +1 -1
  134. package/dist/version.js.map +1 -1
  135. package/docs/AUTO_METADATA_DETECTION.md +108 -0
  136. package/ios/GestureRecorderNative.m +21 -0
  137. package/ios/GestureRecorderNative.swift +316 -0
  138. package/ios/SessionRecorderNative.m +5 -0
  139. package/ios/SessionRecorderNative.swift +478 -84
  140. package/package.json +13 -27
  141. package/react-native.config.js +7 -10
  142. package/app.plugin.js +0 -42
  143. package/dist/components/GestureCaptureWrapper/GestureCaptureWrapper.d.ts +0 -6
  144. package/dist/components/GestureCaptureWrapper/GestureCaptureWrapper.js +0 -1
  145. package/dist/components/GestureCaptureWrapper/GestureCaptureWrapper.js.map +0 -1
  146. package/dist/components/GestureCaptureWrapper/index.d.ts +0 -1
  147. package/dist/components/GestureCaptureWrapper/index.js +0 -1
  148. package/dist/components/GestureCaptureWrapper/index.js.map +0 -1
  149. package/dist/components/MaskableComponent.d.ts +0 -22
  150. package/dist/components/MaskableComponent.js +0 -1
  151. package/dist/components/MaskableComponent.js.map +0 -1
  152. package/dist/components/MaskableTextInput.d.ts +0 -14
  153. package/dist/components/MaskableTextInput.js +0 -1
  154. package/dist/components/MaskableTextInput.js.map +0 -1
  155. package/dist/native/ScreenMasking.d.ts +0 -21
  156. package/dist/native/ScreenMasking.js +0 -1
  157. package/dist/native/ScreenMasking.js.map +0 -1
  158. package/dist/recorder/screenshotManager.d.ts +0 -10
  159. package/dist/recorder/screenshotManager.js +0 -1
  160. package/dist/recorder/screenshotManager.js.map +0 -1
  161. package/dist/utils/componentRegistry.d.ts +0 -64
  162. package/dist/utils/componentRegistry.js +0 -1
  163. package/dist/utils/componentRegistry.js.map +0 -1
  164. package/dist/utils/nativeModuleTest.d.ts +0 -8
  165. package/dist/utils/nativeModuleTest.js +0 -1
  166. package/dist/utils/nativeModuleTest.js.map +0 -1
  167. package/dist/utils/reactNativeHierarchyExtractor.d.ts +0 -38
  168. package/dist/utils/reactNativeHierarchyExtractor.js +0 -1
  169. package/dist/utils/reactNativeHierarchyExtractor.js.map +0 -1
  170. package/dist/utils/screenshotMasker.d.ts +0 -96
  171. package/dist/utils/screenshotMasker.js +0 -1
  172. package/dist/utils/screenshotMasker.js.map +0 -1
  173. package/dist/utils/viewHierarchyTracker.d.ts +0 -89
  174. package/dist/utils/viewHierarchyTracker.js +0 -1
  175. package/dist/utils/viewHierarchyTracker.js.map +0 -1
  176. package/docs/NATIVE_MODULE_SETUP.md +0 -177
  177. package/plugin/package.json +0 -20
  178. package/plugin/src/index.js +0 -42
@@ -1,89 +0,0 @@
1
- import { ViewHierarchyNode, MaskRegion } from '../types';
2
- /**
3
- * Class for tracking view hierarchy and detecting elements that should be masked
4
- */
5
- export declare class ViewHierarchyTracker {
6
- private hierarchy;
7
- private maskedElements;
8
- private screenDimensions;
9
- constructor(screenDimensions?: {
10
- width: number;
11
- height: number;
12
- });
13
- /**
14
- * Update the view hierarchy
15
- * @param hierarchy - The current view hierarchy
16
- */
17
- updateHierarchy(hierarchy: ViewHierarchyNode[]): void;
18
- /**
19
- * Extract elements that should be masked from the hierarchy
20
- */
21
- private extractMaskedElements;
22
- /**
23
- * Traverse the hierarchy tree to find masked elements
24
- * @param nodes - Array of hierarchy nodes
25
- */
26
- private traverseHierarchy;
27
- /**
28
- * Determine if an element should be masked
29
- * @param node - The hierarchy node to check
30
- * @returns true if the element should be masked
31
- */
32
- private shouldMaskElement;
33
- /**
34
- * Check if a node represents an input field
35
- * @param node - The hierarchy node to check
36
- * @returns true if the node is an input field
37
- */
38
- private isInputField;
39
- /**
40
- * Check if a node has sensitive data markers
41
- * @param node - The hierarchy node to check
42
- * @returns true if the node has sensitive data markers
43
- */
44
- private hasSensitiveDataMarker;
45
- /**
46
- * Get mask regions from the current hierarchy
47
- * @returns Array of mask regions
48
- */
49
- getMaskRegions(): MaskRegion[];
50
- /**
51
- * Traverse hierarchy to collect mask regions
52
- * @param nodes - Array of hierarchy nodes
53
- * @param regions - Array to collect mask regions
54
- */
55
- private traverseHierarchyForRegions;
56
- /**
57
- * Add a manual mask region
58
- * @param region - The region to mask
59
- */
60
- addManualRegion(region: MaskRegion): void;
61
- /**
62
- * Clear all mask regions
63
- */
64
- clearRegions(): void;
65
- /**
66
- * Get the current hierarchy
67
- * @returns Current view hierarchy
68
- */
69
- getHierarchy(): ViewHierarchyNode[];
70
- /**
71
- * Get masked element IDs
72
- * @returns Set of masked element IDs
73
- */
74
- getMaskedElements(): Set<string>;
75
- /**
76
- * Update screen dimensions
77
- * @param dimensions - Screen dimensions
78
- */
79
- updateScreenDimensions(dimensions: {
80
- width: number;
81
- height: number;
82
- }): void;
83
- /**
84
- * Check if an element is masked by ID
85
- * @param elementId - Element ID to check
86
- * @returns true if the element is masked
87
- */
88
- isElementMasked(elementId: string): boolean;
89
- }
@@ -1 +0,0 @@
1
- "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ViewHierarchyTracker=void 0;var _typeof2=_interopRequireDefault(require("@babel/runtime/helpers/typeof"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]};},e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}var ViewHierarchyTracker=exports.ViewHierarchyTracker=function(){function ViewHierarchyTracker(screenDimensions){(0,_classCallCheck2["default"])(this,ViewHierarchyTracker);this.hierarchy=[];this.maskedElements=new Set();this.screenDimensions=null;this.screenDimensions=screenDimensions||null;}return(0,_createClass2["default"])(ViewHierarchyTracker,[{key:"updateHierarchy",value:function updateHierarchy(hierarchy){this.hierarchy=hierarchy;this.extractMaskedElements();}},{key:"extractMaskedElements",value:function extractMaskedElements(){this.maskedElements.clear();this.traverseHierarchy(this.hierarchy);}},{key:"traverseHierarchy",value:function traverseHierarchy(nodes){var _iterator=_createForOfIteratorHelper(nodes),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var node=_step.value;if(this.shouldMaskElement(node)){if(node.id){this.maskedElements.add(node.id);}node.masked=true;}if(node.children){this.traverseHierarchy(node.children);}}}catch(err){_iterator.e(err);}finally{_iterator.f();}}},{key:"shouldMaskElement",value:function shouldMaskElement(node){var _a;if(node.accessibilityLabel==='ph-no-capture'||node.accessibilityLabel==='mask-input'||((_a=node.props)===null||_a===void 0?void 0:_a.testID)==='mask-input'){return true;}if(this.isInputField(node)){return true;}if(this.hasSensitiveDataMarker(node)){return true;}return false;}},{key:"isInputField",value:function isInputField(node){var inputTypes=['TextInput','TextInputMask','Input','PasswordInput','SecureTextInput'];if(inputTypes.includes(node.type)){return true;}var props=node.props||{};if(props.secureTextEntry===true){return true;}if(props.password===true||props.isPassword===true||props.inputType==='password'){return true;}var placeholder=props.placeholder||'';var sensitivePlaceholders=['password','pass','pwd','secret','token','key','credit card','card number','cvv','ssn','social security','phone','email','address','zip','postal'];if(sensitivePlaceholders.some(function(sensitive){return placeholder.toLowerCase().includes(sensitive);})){return true;}return false;}},{key:"hasSensitiveDataMarker",value:function hasSensitiveDataMarker(node){var props=node.props||{};if(props.sensitive===true||props["private"]===true||props.confidential===true){return true;}var style=props.style||{};if((0,_typeof2["default"])(style)==='object'&&style.sensitive===true){return true;}return false;}},{key:"getMaskRegions",value:function getMaskRegions(){var regions=[];this.traverseHierarchyForRegions(this.hierarchy,regions);return regions;}},{key:"traverseHierarchyForRegions",value:function traverseHierarchyForRegions(nodes,regions){var _iterator2=_createForOfIteratorHelper(nodes),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var node=_step2.value;if(node.masked&&node.bounds){var region={x:node.bounds.x,y:node.bounds.y,width:node.bounds.width,height:node.bounds.height,type:'blackout',elementId:node.id};regions.push(region);}if(node.children){this.traverseHierarchyForRegions(node.children,regions);}}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}}},{key:"addManualRegion",value:function addManualRegion(region){}},{key:"clearRegions",value:function clearRegions(){this.maskedElements.clear();this.hierarchy=[];}},{key:"getHierarchy",value:function getHierarchy(){return this.hierarchy;}},{key:"getMaskedElements",value:function getMaskedElements(){return new Set(this.maskedElements);}},{key:"updateScreenDimensions",value:function updateScreenDimensions(dimensions){this.screenDimensions=dimensions;}},{key:"isElementMasked",value:function isElementMasked(elementId){return this.maskedElements.has(elementId);}}]);}();
@@ -1 +0,0 @@
1
- {"version":3,"file":"viewHierarchyTracker.js","sourceRoot":"","sources":["../../src/utils/viewHierarchyTracker.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,OAAO,oBAAoB;IAK/B,YAAY,gBAAoD;QAJxD,cAAS,GAAwB,EAAE,CAAA;QACnC,mBAAc,GAAgB,IAAI,GAAG,EAAE,CAAA;QACvC,qBAAgB,GAA6C,IAAI,CAAA;QAGvE,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,IAAI,IAAI,CAAA;IAClD,CAAC;IAED;;;OAGG;IACH,eAAe,CAAC,SAA8B;QAC5C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;QAC1B,IAAI,CAAC,qBAAqB,EAAE,CAAA;IAC9B,CAAC;IAED;;OAEG;IACK,qBAAqB;QAC3B,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAA;QAC3B,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACxC,CAAC;IAED;;;OAGG;IACK,iBAAiB,CAAC,KAA0B;QAClD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC;gBACjC,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC;oBACZ,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;gBAClC,CAAC;gBACD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA;YACpB,CAAC;YAED,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAClB,IAAI,CAAC,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@
1
- # Native Module Setup Guide
2
-
3
- This guide explains how to properly set up the Session Recorder React Native library with native modules in both React Native and Expo projects.
4
-
5
- ## Issues Fixed
6
-
7
- ### 1. Missing iOS Native Files in NPM Package
8
-
9
- **Problem**: The iOS native implementation files (`SessionRecorderNative.m` and `SessionRecorderNative.swift`) were not being included in the published npm package.
10
-
11
- **Solution**: Updated `.npmignore` to exclude source files but include the compiled native modules.
12
-
13
- ### 2. Auto-linking Configuration
14
-
15
- **Problem**: The library wasn't properly configured for auto-linking in Expo projects.
16
-
17
- **Solution**:
18
-
19
- - Added `expo` configuration section to `package.json`
20
- - Created an Expo plugin for automatic Podfile configuration
21
- - Updated podspec with proper Expo compatibility settings
22
-
23
- ### 3. Podspec Configuration
24
-
25
- **Problem**: The podspec wasn't optimized for Expo compatibility.
26
-
27
- **Solution**: Added proper header search paths and Expo-specific configurations.
28
-
29
- ## Setup Instructions
30
-
31
- ### For Expo Projects
32
-
33
- 1. **Install the package**:
34
-
35
- ```bash
36
- npm install @multiplayer-app/session-recorder-react-native
37
- ```
38
-
39
- 2. **Add to app.json/app.config.js**:
40
-
41
- ```json
42
- {
43
- "expo": {
44
- "plugins": ["@multiplayer-app/session-recorder-react-native"]
45
- }
46
- }
47
- ```
48
-
49
- The plugin will automatically be detected via the `app.plugin.js` file in the package root.
50
-
51
- 3. **Run prebuild** (if using development build):
52
-
53
- ```bash
54
- npx expo prebuild --clean
55
- ```
56
-
57
- 4. **Install iOS dependencies**:
58
- ```bash
59
- cd ios && pod install && cd ..
60
- ```
61
-
62
- ### For React Native CLI Projects
63
-
64
- 1. **Install the package**:
65
-
66
- ```bash
67
- npm install @multiplayer-app/session-recorder-react-native
68
- ```
69
-
70
- 2. **iOS Setup**:
71
-
72
- ```bash
73
- cd ios && pod install && cd ..
74
- ```
75
-
76
- 3. **Android Setup**: No additional steps required (auto-linking handles it)
77
-
78
- ## Troubleshooting
79
-
80
- ### "Pod SessionRecorderNative files are missing"
81
-
82
- This error occurs when the iOS native files aren't properly included in the package or auto-linking fails.
83
-
84
- **Solutions**:
85
-
86
- 1. **Check package installation**:
87
-
88
- ```bash
89
- ls node_modules/@multiplayer-app/session-recorder-react-native/ios/
90
- ```
91
-
92
- Should show: `SessionRecorderNative.m`, `SessionRecorderNative.podspec`, `SessionRecorderNative.swift`
93
-
94
- 2. **Clear and reinstall**:
95
-
96
- ```bash
97
- rm -rf node_modules
98
- npm install
99
- cd ios && pod install --repo-update && cd ..
100
- ```
101
-
102
- 3. **For Expo projects, ensure plugin is configured**:
103
- ```json
104
- {
105
- "expo": {
106
- "plugins": ["@multiplayer-app/session-recorder-react-native"]
107
- }
108
- }
109
- ```
110
-
111
- ### Auto-linking Issues
112
-
113
- If auto-linking doesn't work:
114
-
115
- 1. **Check react-native.config.js** (should be automatically created):
116
-
117
- ```javascript
118
- module.exports = {
119
- dependencies: {
120
- '@multiplayer-app/session-recorder-react-native': {
121
- platforms: {
122
- android: {
123
- sourceDir: '../android',
124
- packageImportPath: 'import com.multiplayer.sessionrecorder.SessionRecorderPackage;'
125
- },
126
- ios: {
127
- podspecPath: '../ios/SessionRecorderNative.podspec'
128
- }
129
- }
130
- }
131
- }
132
- }
133
- ```
134
-
135
- 2. **Manual linking** (if auto-linking fails):
136
- - iOS: Add to Podfile manually
137
- - Android: Add to MainApplication.java manually
138
-
139
- ## File Structure
140
-
141
- The package includes these native files:
142
-
143
- ```
144
- ios/
145
- ├── SessionRecorderNative.m # Objective-C bridge
146
- ├── SessionRecorderNative.podspec # CocoaPods specification
147
- └── SessionRecorderNative.swift # Swift implementation
148
-
149
- android/
150
- ├── build.gradle # Android build configuration
151
- └── src/main/java/com/multiplayer/sessionrecorder/
152
- ├── SessionRecorderModule.kt # Main Android module
153
- ├── SessionRecorderPackage.kt # Package registration
154
- ├── ScreenMaskingModule.kt # Screen masking module
155
- └── ScreenMaskingPackage.kt # Screen masking package
156
- ```
157
-
158
- ## Verification
159
-
160
- To verify the setup is working:
161
-
162
- 1. **Check iOS**:
163
-
164
- ```bash
165
- cd ios && pod list | grep SessionRecorderNative
166
- ```
167
-
168
- 2. **Check Android**: Look for the package in `android/app/src/main/java/`
169
-
170
- 3. **Test in code**:
171
-
172
- ```javascript
173
- import { SessionRecorderNative } from '@multiplayer-app/session-recorder-react-native'
174
-
175
- // This should not throw an error
176
- console.log('Native module loaded:', SessionRecorderNative)
177
- ```
@@ -1,20 +0,0 @@
1
- {
2
- "name": "@multiplayer-app/session-recorder-react-native-plugin",
3
- "version": "0.0.1-beta.9",
4
- "description": "Expo plugin for Session Recorder React Native",
5
- "main": "src/index.js",
6
- "keywords": [
7
- "expo",
8
- "plugin",
9
- "session-recorder",
10
- "react-native"
11
- ],
12
- "author": "Multiplayer Software, Inc.",
13
- "license": "MIT",
14
- "dependencies": {
15
- "@expo/config-plugins": "^7.0.0"
16
- },
17
- "peerDependencies": {
18
- "expo": ">=49.0.0"
19
- }
20
- }
@@ -1,42 +0,0 @@
1
- const { withDangerousMod } = require('@expo/config-plugins')
2
- const fs = require('fs')
3
- const path = require('path')
4
-
5
- const withSessionRecorder = (config) => {
6
- return withDangerousMod(config, [
7
- 'ios',
8
- async (config) => {
9
- const projectRoot = config.modRequest.projectRoot
10
- const platformRoot = config.modRequest.platformProjectRoot
11
-
12
- // Ensure the Podfile includes our native module
13
- const podfilePath = path.join(platformRoot, 'Podfile')
14
-
15
- if (fs.existsSync(podfilePath)) {
16
- let podfileContent = fs.readFileSync(podfilePath, 'utf8')
17
-
18
- // Check if our pod is already included
19
- if (!podfileContent.includes('SessionRecorderNative')) {
20
- // Add our pod to the Podfile
21
- const podEntry = ` pod 'SessionRecorderNative', :path => '../node_modules/@multiplayer-app/session-recorder-react-native/ios'\n`
22
-
23
- // Find the target section and add our pod
24
- const targetRegex = /(target ['"][^'"]+['"] do)/
25
- if (targetRegex.test(podfileContent)) {
26
- podfileContent = podfileContent.replace(targetRegex, `$1\n${podEntry}`)
27
- } else {
28
- // If no target found, add at the end before the end statement
29
- podfileContent = podfileContent.replace(/(end\s*$)/, `${podEntry}$1`)
30
- }
31
-
32
- fs.writeFileSync(podfilePath, podfileContent)
33
- console.log('✅ Added SessionRecorderNative to Podfile')
34
- }
35
- }
36
-
37
- return config
38
- }
39
- ])
40
- }
41
-
42
- module.exports = withSessionRecorder