@dashx/react-native 1.5.0 → 1.5.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 (85) hide show
  1. package/README.md +1 -1
  2. package/ios/DashXReactNative.mm +7 -7
  3. package/ios/DashXReactNative.swift +15 -11
  4. package/package.json +13 -11
  5. package/.claude/settings.local.json +0 -7
  6. package/.claude/worktrees/autocapture-conventions-review-78f665/.gitattributes +0 -1
  7. package/.claude/worktrees/autocapture-conventions-review-78f665/.github/workflows/ci.yml +0 -67
  8. package/.claude/worktrees/autocapture-conventions-review-78f665/.gitignore +0 -49
  9. package/.claude/worktrees/autocapture-conventions-review-78f665/.nvmrc +0 -1
  10. package/.claude/worktrees/autocapture-conventions-review-78f665/CHANGELOG.md +0 -144
  11. package/.claude/worktrees/autocapture-conventions-review-78f665/CONTRIBUTING.md +0 -190
  12. package/.claude/worktrees/autocapture-conventions-review-78f665/DashXReactNative.podspec +0 -38
  13. package/.claude/worktrees/autocapture-conventions-review-78f665/LICENSE +0 -21
  14. package/.claude/worktrees/autocapture-conventions-review-78f665/README.md +0 -97
  15. package/.claude/worktrees/autocapture-conventions-review-78f665/__tests__/fallback.test.js +0 -72
  16. package/.claude/worktrees/autocapture-conventions-review-78f665/__tests__/index.test.js +0 -702
  17. package/.claude/worktrees/autocapture-conventions-review-78f665/android/.gitignore +0 -10
  18. package/.claude/worktrees/autocapture-conventions-review-78f665/android/.gradle/8.14.3/checksums/checksums.lock +0 -0
  19. package/.claude/worktrees/autocapture-conventions-review-78f665/android/.gradle/8.14.3/fileChanges/last-build.bin +0 -0
  20. package/.claude/worktrees/autocapture-conventions-review-78f665/android/.gradle/8.14.3/fileHashes/fileHashes.lock +0 -0
  21. package/.claude/worktrees/autocapture-conventions-review-78f665/android/.gradle/8.14.3/gc.properties +0 -0
  22. package/.claude/worktrees/autocapture-conventions-review-78f665/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  23. package/.claude/worktrees/autocapture-conventions-review-78f665/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  24. package/.claude/worktrees/autocapture-conventions-review-78f665/android/.gradle/vcs-1/gc.properties +0 -0
  25. package/.claude/worktrees/autocapture-conventions-review-78f665/android/build/reports/problems/problems-report.html +0 -663
  26. package/.claude/worktrees/autocapture-conventions-review-78f665/android/build.gradle +0 -121
  27. package/.claude/worktrees/autocapture-conventions-review-78f665/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  28. package/.claude/worktrees/autocapture-conventions-review-78f665/android/gradle/wrapper/gradle-wrapper.properties +0 -6
  29. package/.claude/worktrees/autocapture-conventions-review-78f665/android/gradle.properties +0 -1
  30. package/.claude/worktrees/autocapture-conventions-review-78f665/android/gradlew +0 -185
  31. package/.claude/worktrees/autocapture-conventions-review-78f665/android/gradlew.bat +0 -89
  32. package/.claude/worktrees/autocapture-conventions-review-78f665/android/settings.gradle +0 -27
  33. package/.claude/worktrees/autocapture-conventions-review-78f665/android/src/main/AndroidManifest.xml +0 -19
  34. package/.claude/worktrees/autocapture-conventions-review-78f665/android/src/main/java/com/dashx/rn/sdk/DashXNotificationClickedListener.kt +0 -113
  35. package/.claude/worktrees/autocapture-conventions-review-78f665/android/src/main/java/com/dashx/rn/sdk/DashXReactNativeFirebaseMessagingService.kt +0 -72
  36. package/.claude/worktrees/autocapture-conventions-review-78f665/android/src/main/java/com/dashx/rn/sdk/DashXReactNativeModuleImpl.kt +0 -445
  37. package/.claude/worktrees/autocapture-conventions-review-78f665/android/src/main/java/com/dashx/rn/sdk/MessageReceivedEventHolder.kt +0 -14
  38. package/.claude/worktrees/autocapture-conventions-review-78f665/android/src/main/java/com/dashx/rn/sdk/ReactNativeLibraryInfoProvider.kt +0 -8
  39. package/.claude/worktrees/autocapture-conventions-review-78f665/android/src/main/java/com/dashx/rn/sdk/util/Utils.kt +0 -208
  40. package/.claude/worktrees/autocapture-conventions-review-78f665/android/src/main/resources/META-INF/services/com.dashx.android.DashXLibraryInfoProvider +0 -1
  41. package/.claude/worktrees/autocapture-conventions-review-78f665/android/src/newarch/java/com/dashx/rn/sdk/DashXReactNativeModule.kt +0 -85
  42. package/.claude/worktrees/autocapture-conventions-review-78f665/android/src/newarch/java/com/dashx/rn/sdk/DashXReactNativePackage.kt +0 -33
  43. package/.claude/worktrees/autocapture-conventions-review-78f665/android/src/oldarch/java/com/dashx/rn/sdk/DashXReactNativeModule.kt +0 -106
  44. package/.claude/worktrees/autocapture-conventions-review-78f665/android/src/oldarch/java/com/dashx/rn/sdk/DashXReactNativePackage.kt +0 -33
  45. package/.claude/worktrees/autocapture-conventions-review-78f665/android/src/test/java/com/dashx/rn/sdk/util/UtilsTest.kt +0 -305
  46. package/.claude/worktrees/autocapture-conventions-review-78f665/babel.config.js +0 -3
  47. package/.claude/worktrees/autocapture-conventions-review-78f665/index.d.ts +0 -321
  48. package/.claude/worktrees/autocapture-conventions-review-78f665/index.js +0 -300
  49. package/.claude/worktrees/autocapture-conventions-review-78f665/ios/DashXEventEmitter.swift +0 -15
  50. package/.claude/worktrees/autocapture-conventions-review-78f665/ios/DashXNotificationHandler.swift +0 -301
  51. package/.claude/worktrees/autocapture-conventions-review-78f665/ios/DashXReactNative-Bridging-Header.h +0 -3
  52. package/.claude/worktrees/autocapture-conventions-review-78f665/ios/DashXReactNative.mm +0 -77
  53. package/.claude/worktrees/autocapture-conventions-review-78f665/ios/DashXReactNative.swift +0 -244
  54. package/.claude/worktrees/autocapture-conventions-review-78f665/ios/DashXReactNative.xcodeproj/project.pbxproj +0 -280
  55. package/.claude/worktrees/autocapture-conventions-review-78f665/ios/DashXReactNative.xcworkspace/contents.xcworkspacedata +0 -7
  56. package/.claude/worktrees/autocapture-conventions-review-78f665/ios/DashXReactNative.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  57. package/.claude/worktrees/autocapture-conventions-review-78f665/package.json +0 -123
  58. package/.claude/worktrees/autocapture-conventions-review-78f665/scripts/generate-bridge-shim.js +0 -259
  59. package/.claude/worktrees/autocapture-conventions-review-78f665/src/NativeDashXReactNative.ts +0 -42
  60. package/.claude/worktrees/autocapture-conventions-review-78f665/yarn.lock +0 -6244
  61. package/.gitattributes +0 -1
  62. package/.github/workflows/ci.yml +0 -67
  63. package/.gitignore +0 -49
  64. package/.nvmrc +0 -1
  65. package/CHANGELOG.md +0 -144
  66. package/CONTRIBUTING.md +0 -190
  67. package/__tests__/fallback.test.js +0 -72
  68. package/__tests__/index.test.js +0 -702
  69. package/android/.gitignore +0 -10
  70. package/android/.gradle/8.14.3/checksums/checksums.lock +0 -0
  71. package/android/.gradle/8.14.3/fileChanges/last-build.bin +0 -0
  72. package/android/.gradle/8.14.3/fileHashes/fileHashes.lock +0 -0
  73. package/android/.gradle/8.14.3/gc.properties +0 -0
  74. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  75. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  76. package/android/.gradle/vcs-1/gc.properties +0 -0
  77. package/android/build/reports/problems/problems-report.html +0 -663
  78. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  79. package/android/gradle/wrapper/gradle-wrapper.properties +0 -6
  80. package/android/gradlew +0 -185
  81. package/android/gradlew.bat +0 -89
  82. package/android/src/test/java/com/dashx/rn/sdk/util/UtilsTest.kt +0 -305
  83. package/babel.config.js +0 -3
  84. package/scripts/generate-bridge-shim.js +0 -259
  85. package/yarn.lock +0 -6244
@@ -1,280 +0,0 @@
1
- // !$*UTF8*$!
2
- {
3
- archiveVersion = 1;
4
- classes = {
5
- };
6
- objectVersion = 46;
7
- objects = {
8
-
9
- /* Begin PBXBuildFile section */
10
- 5124AEE72A7A25120079E503 /* DashXReactNative.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* DashXReactNative.m */; };
11
- 5124AEE82A7A25120079E503 /* DashX.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C3CFED3289B9C6E00D184AB /* DashX.swift */; };
12
- 5124AEE92A7A25120079E503 /* DashXEventEmitter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C3CFED4289B9C6E00D184AB /* DashXEventEmitter.swift */; };
13
- /* End PBXBuildFile section */
14
-
15
- /* Begin PBXCopyFilesBuildPhase section */
16
- 58B511D91A9E6C8500147676 /* CopyFiles */ = {
17
- isa = PBXCopyFilesBuildPhase;
18
- buildActionMask = 2147483647;
19
- dstPath = "include/$(PRODUCT_NAME)";
20
- dstSubfolderSpec = 16;
21
- files = (
22
- );
23
- runOnlyForDeploymentPostprocessing = 0;
24
- };
25
- /* End PBXCopyFilesBuildPhase section */
26
-
27
- /* Begin PBXFileReference section */
28
- 134814201AA4EA6300B7C361 /* libDashXReactNative.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libDashXReactNative.a; sourceTree = BUILT_PRODUCTS_DIR; };
29
- 7C3CFED0289B9C6D00D184AB /* DashXReactNative-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "DashXReactNative-Bridging-Header.h"; sourceTree = "<group>"; };
30
- 7C3CFED2289B9C6E00D184AB /* DashXReactNative.xcworkspace */ = {isa = PBXFileReference; lastKnownFileType = wrapper.workspace; path = DashXReactNative.xcworkspace; sourceTree = "<group>"; };
31
- 7C3CFED3289B9C6E00D184AB /* DashX.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DashX.swift; sourceTree = "<group>"; };
32
- 7C3CFED4289B9C6E00D184AB /* DashXEventEmitter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DashXEventEmitter.swift; sourceTree = "<group>"; };
33
- B3E7B5891CC2AC0600A0062D /* DashXReactNative.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DashXReactNative.m; sourceTree = "<group>"; };
34
- /* End PBXFileReference section */
35
-
36
- /* Begin PBXFrameworksBuildPhase section */
37
- 58B511D81A9E6C8500147676 /* Frameworks */ = {
38
- isa = PBXFrameworksBuildPhase;
39
- buildActionMask = 2147483647;
40
- files = (
41
- );
42
- runOnlyForDeploymentPostprocessing = 0;
43
- };
44
- /* End PBXFrameworksBuildPhase section */
45
-
46
- /* Begin PBXGroup section */
47
- 134814211AA4EA7D00B7C361 /* Products */ = {
48
- isa = PBXGroup;
49
- children = (
50
- 134814201AA4EA6300B7C361 /* libDashXReactNative.a */,
51
- );
52
- name = Products;
53
- sourceTree = "<group>";
54
- };
55
- 58B511D21A9E6C8500147676 = {
56
- isa = PBXGroup;
57
- children = (
58
- B3E7B5891CC2AC0600A0062D /* DashXReactNative.m */,
59
- 134814211AA4EA7D00B7C361 /* Products */,
60
- 7C3CFED3289B9C6E00D184AB /* DashX.swift */,
61
- 7C3CFED4289B9C6E00D184AB /* DashXEventEmitter.swift */,
62
- 7C3CFED2289B9C6E00D184AB /* DashXReactNative.xcworkspace */,
63
- 7C3CFED0289B9C6D00D184AB /* DashXReactNative-Bridging-Header.h */,
64
- );
65
- sourceTree = "<group>";
66
- };
67
- /* End PBXGroup section */
68
-
69
- /* Begin PBXNativeTarget section */
70
- 58B511DA1A9E6C8500147676 /* DashXReactNative */ = {
71
- isa = PBXNativeTarget;
72
- buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "DashXReactNative" */;
73
- buildPhases = (
74
- 58B511D71A9E6C8500147676 /* Sources */,
75
- 58B511D81A9E6C8500147676 /* Frameworks */,
76
- 58B511D91A9E6C8500147676 /* CopyFiles */,
77
- );
78
- buildRules = (
79
- );
80
- dependencies = (
81
- );
82
- name = DashXReactNative;
83
- productName = RCTDataManager;
84
- productReference = 134814201AA4EA6300B7C361 /* libDashXReactNative.a */;
85
- productType = "com.apple.product-type.library.static";
86
- };
87
- /* End PBXNativeTarget section */
88
-
89
- /* Begin PBXProject section */
90
- 58B511D31A9E6C8500147676 /* Project object */ = {
91
- isa = PBXProject;
92
- attributes = {
93
- LastUpgradeCheck = 0830;
94
- ORGANIZATIONNAME = Facebook;
95
- TargetAttributes = {
96
- 58B511DA1A9E6C8500147676 = {
97
- CreatedOnToolsVersion = 6.1.1;
98
- LastSwiftMigration = 1340;
99
- };
100
- };
101
- };
102
- buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "DashXReactNative" */;
103
- compatibilityVersion = "Xcode 3.2";
104
- developmentRegion = English;
105
- hasScannedForEncodings = 0;
106
- knownRegions = (
107
- English,
108
- en,
109
- );
110
- mainGroup = 58B511D21A9E6C8500147676;
111
- productRefGroup = 58B511D21A9E6C8500147676;
112
- projectDirPath = "";
113
- projectRoot = "";
114
- targets = (
115
- 58B511DA1A9E6C8500147676 /* DashXReactNative */,
116
- );
117
- };
118
- /* End PBXProject section */
119
-
120
- /* Begin PBXSourcesBuildPhase section */
121
- 58B511D71A9E6C8500147676 /* Sources */ = {
122
- isa = PBXSourcesBuildPhase;
123
- buildActionMask = 2147483647;
124
- files = (
125
- 5124AEE72A7A25120079E503 /* DashXReactNative.m in Sources */,
126
- 5124AEE82A7A25120079E503 /* DashX.swift in Sources */,
127
- 5124AEE92A7A25120079E503 /* DashXEventEmitter.swift in Sources */,
128
- );
129
- runOnlyForDeploymentPostprocessing = 0;
130
- };
131
- /* End PBXSourcesBuildPhase section */
132
-
133
- /* Begin XCBuildConfiguration section */
134
- 58B511ED1A9E6C8500147676 /* Debug */ = {
135
- isa = XCBuildConfiguration;
136
- buildSettings = {
137
- ALWAYS_SEARCH_USER_PATHS = NO;
138
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
139
- CLANG_CXX_LIBRARY = "libc++";
140
- CLANG_ENABLE_MODULES = YES;
141
- CLANG_ENABLE_OBJC_ARC = YES;
142
- CLANG_WARN_BOOL_CONVERSION = YES;
143
- CLANG_WARN_CONSTANT_CONVERSION = YES;
144
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
145
- CLANG_WARN_EMPTY_BODY = YES;
146
- CLANG_WARN_ENUM_CONVERSION = YES;
147
- CLANG_WARN_INFINITE_RECURSION = YES;
148
- CLANG_WARN_INT_CONVERSION = YES;
149
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
150
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
151
- CLANG_WARN_UNREACHABLE_CODE = YES;
152
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
153
- COPY_PHASE_STRIP = NO;
154
- ENABLE_STRICT_OBJC_MSGSEND = YES;
155
- ENABLE_TESTABILITY = YES;
156
- GCC_C_LANGUAGE_STANDARD = gnu99;
157
- GCC_DYNAMIC_NO_PIC = NO;
158
- GCC_NO_COMMON_BLOCKS = YES;
159
- GCC_OPTIMIZATION_LEVEL = 0;
160
- GCC_PREPROCESSOR_DEFINITIONS = (
161
- "DEBUG=1",
162
- "$(inherited)",
163
- );
164
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
165
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
166
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
167
- GCC_WARN_UNDECLARED_SELECTOR = YES;
168
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
169
- GCC_WARN_UNUSED_FUNCTION = YES;
170
- GCC_WARN_UNUSED_VARIABLE = YES;
171
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
172
- MTL_ENABLE_DEBUG_INFO = YES;
173
- ONLY_ACTIVE_ARCH = YES;
174
- SDKROOT = iphoneos;
175
- };
176
- name = Debug;
177
- };
178
- 58B511EE1A9E6C8500147676 /* Release */ = {
179
- isa = XCBuildConfiguration;
180
- buildSettings = {
181
- ALWAYS_SEARCH_USER_PATHS = NO;
182
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
183
- CLANG_CXX_LIBRARY = "libc++";
184
- CLANG_ENABLE_MODULES = YES;
185
- CLANG_ENABLE_OBJC_ARC = YES;
186
- CLANG_WARN_BOOL_CONVERSION = YES;
187
- CLANG_WARN_CONSTANT_CONVERSION = YES;
188
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
189
- CLANG_WARN_EMPTY_BODY = YES;
190
- CLANG_WARN_ENUM_CONVERSION = YES;
191
- CLANG_WARN_INFINITE_RECURSION = YES;
192
- CLANG_WARN_INT_CONVERSION = YES;
193
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
194
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
195
- CLANG_WARN_UNREACHABLE_CODE = YES;
196
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
197
- COPY_PHASE_STRIP = YES;
198
- ENABLE_NS_ASSERTIONS = NO;
199
- ENABLE_STRICT_OBJC_MSGSEND = YES;
200
- GCC_C_LANGUAGE_STANDARD = gnu99;
201
- GCC_NO_COMMON_BLOCKS = YES;
202
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
203
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
204
- GCC_WARN_UNDECLARED_SELECTOR = YES;
205
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
206
- GCC_WARN_UNUSED_FUNCTION = YES;
207
- GCC_WARN_UNUSED_VARIABLE = YES;
208
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
209
- MTL_ENABLE_DEBUG_INFO = NO;
210
- SDKROOT = iphoneos;
211
- VALIDATE_PRODUCT = YES;
212
- };
213
- name = Release;
214
- };
215
- 58B511F01A9E6C8500147676 /* Debug */ = {
216
- isa = XCBuildConfiguration;
217
- buildSettings = {
218
- CLANG_ENABLE_MODULES = YES;
219
- HEADER_SEARCH_PATHS = (
220
- "$(inherited)",
221
- /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
222
- "$(SRCROOT)/../../../React/**",
223
- "$(SRCROOT)/../../react-native/React/**",
224
- );
225
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
226
- LIBRARY_SEARCH_PATHS = "$(inherited)";
227
- OTHER_LDFLAGS = "-ObjC";
228
- PRODUCT_NAME = DashXReactNative;
229
- SKIP_INSTALL = YES;
230
- SWIFT_OBJC_BRIDGING_HEADER = "DashXReactNative-Bridging-Header.h";
231
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
232
- SWIFT_VERSION = 5.0;
233
- };
234
- name = Debug;
235
- };
236
- 58B511F11A9E6C8500147676 /* Release */ = {
237
- isa = XCBuildConfiguration;
238
- buildSettings = {
239
- CLANG_ENABLE_MODULES = YES;
240
- HEADER_SEARCH_PATHS = (
241
- "$(inherited)",
242
- /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
243
- "$(SRCROOT)/../../../React/**",
244
- "$(SRCROOT)/../../react-native/React/**",
245
- );
246
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
247
- LIBRARY_SEARCH_PATHS = "$(inherited)";
248
- OTHER_LDFLAGS = "-ObjC";
249
- PRODUCT_NAME = DashXReactNative;
250
- SKIP_INSTALL = YES;
251
- SWIFT_OBJC_BRIDGING_HEADER = "DashXReactNative-Bridging-Header.h";
252
- SWIFT_VERSION = 5.0;
253
- };
254
- name = Release;
255
- };
256
- /* End XCBuildConfiguration section */
257
-
258
- /* Begin XCConfigurationList section */
259
- 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "DashXReactNative" */ = {
260
- isa = XCConfigurationList;
261
- buildConfigurations = (
262
- 58B511ED1A9E6C8500147676 /* Debug */,
263
- 58B511EE1A9E6C8500147676 /* Release */,
264
- );
265
- defaultConfigurationIsVisible = 0;
266
- defaultConfigurationName = Release;
267
- };
268
- 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "DashXReactNative" */ = {
269
- isa = XCConfigurationList;
270
- buildConfigurations = (
271
- 58B511F01A9E6C8500147676 /* Debug */,
272
- 58B511F11A9E6C8500147676 /* Release */,
273
- );
274
- defaultConfigurationIsVisible = 0;
275
- defaultConfigurationName = Release;
276
- };
277
- /* End XCConfigurationList section */
278
- };
279
- rootObject = 58B511D31A9E6C8500147676 /* Project object */;
280
- }
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Workspace
3
- version = "1.0">
4
- <FileRef
5
- location = "group:DashXReactNative.xcodeproj">
6
- </FileRef>
7
- </Workspace>
@@ -1,8 +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>IDEDidComputeMac32BitWarning</key>
6
- <true/>
7
- </dict>
8
- </plist>
@@ -1,123 +0,0 @@
1
- {
2
- "name": "@dashx/react-native",
3
- "title": "DashX React Native",
4
- "version": "1.5.0",
5
- "description": "DashX SDK for React Native",
6
- "main": "index.js",
7
- "types": "index.d.ts",
8
- "files": [
9
- "!**/__fixtures__",
10
- "!**/__mocks__",
11
- "!**/__tests__",
12
- "!**/.*",
13
- "!android/build",
14
- "!android/gradle",
15
- "!android/gradlew.bat",
16
- "!android/gradlew",
17
- "!android/local.properties",
18
- "!ios/build",
19
- "*.podspec",
20
- "android",
21
- "DashXReactNative.podspec",
22
- "index.js",
23
- "index.d.ts",
24
- "ios",
25
- "src",
26
- "README.md"
27
- ],
28
- "codegenConfig": {
29
- "name": "RNDashXReactNativeSpec",
30
- "type": "modules",
31
- "jsSrcsDir": "src",
32
- "android": {
33
- "javaPackageName": "com.dashx.rn.sdk"
34
- }
35
- },
36
- "scripts": {
37
- "test": "jest",
38
- "lint": "eslint index.js && yarn run check-bridge-shim",
39
- "sync-bridge-shim": "node scripts/generate-bridge-shim.js",
40
- "check-bridge-shim": "node scripts/generate-bridge-shim.js && git diff --exit-code ios/DashXReactNative.mm"
41
- },
42
- "repository": {
43
- "type": "git",
44
- "url": "https://github.com/dashxhq/dashx-react-native"
45
- },
46
- "keywords": [
47
- "react-native",
48
- "ios",
49
- "android"
50
- ],
51
- "author": {
52
- "name": "Team DashX",
53
- "email": "dev@dashx.com"
54
- },
55
- "license": "MIT",
56
- "licenseFilename": "LICENSE",
57
- "homepage": "https://github.com/dashxhq/dashx-react-native#readme",
58
- "publishConfig": {
59
- "registry": "https://registry.npmjs.org/"
60
- },
61
- "peerDependencies": {
62
- "react": ">=17.0.0",
63
- "react-native": ">=0.74.0"
64
- },
65
- "devDependencies": {
66
- "@commitlint/config-conventional": "^17.0.2",
67
- "@react-native/eslint-config": "0.77.3",
68
- "del-cli": "^5.0.0",
69
- "eslint": "^8.4.1",
70
- "eslint-config-prettier": "^8.5.0",
71
- "eslint-plugin-prettier": "^4.0.0",
72
- "jest": "^28.1.1",
73
- "pod-install": "^0.1.0",
74
- "prettier": "^2.0.5",
75
- "react": "18.3.1",
76
- "react-native": "0.77.3",
77
- "turbo": "^1.10.7"
78
- },
79
- "engines": {
80
- "node": ">= 16.0.0"
81
- },
82
- "dependencies": {},
83
- "eslintConfig": {
84
- "root": true,
85
- "extends": [
86
- "@react-native",
87
- "prettier"
88
- ],
89
- "plugins": [
90
- "prettier"
91
- ],
92
- "rules": {
93
- "prettier/prettier": [
94
- "error",
95
- {
96
- "quoteProps": "consistent",
97
- "singleQuote": true,
98
- "tabWidth": 2,
99
- "trailingComma": "es5",
100
- "useTabs": false
101
- }
102
- ]
103
- }
104
- },
105
- "eslintIgnore": [
106
- "node_modules/",
107
- "lib/"
108
- ],
109
- "prettier": {
110
- "quoteProps": "consistent",
111
- "singleQuote": true,
112
- "trailingComma": "es5"
113
- },
114
- "jest": {
115
- "testEnvironment": "node",
116
- "transform": {
117
- "^.+\\.js$": "babel-jest"
118
- },
119
- "transformIgnorePatterns": [
120
- "node_modules/(?!react-native)"
121
- ]
122
- }
123
- }
@@ -1,259 +0,0 @@
1
- #!/usr/bin/env node
2
- /* eslint-disable no-console */
3
- //
4
- // generate-bridge-shim.js — regenerate `ios/DashXReactNative.mm` from the
5
- // Swift bridge's @objc declarations.
6
- //
7
- // Why this exists:
8
- //
9
- // React Native's iOS bridge needs each Swift method to be declared TWICE for
10
- // dual-arch support — once in Swift (`@objc(selector:parts:) func name(...)`)
11
- // and once in ObjC++ (`RCT_EXTERN_METHOD(selector:(Type)arg ...)` in the .mm).
12
- // The two declarations must agree on selector and arg types — when they
13
- // don't, the new-arch TurboModule runtime can't find the method and JS calls
14
- // fail with "Objective-C method signature ... can not be found." We learned
15
- // that the hard way when we widened `unsubscribe` to a Promise method,
16
- // updated the Swift side, and forgot the .mm.
17
- //
18
- // This script makes the Swift file the single source of truth and emits the
19
- // matching .mm. Run via `yarn sync-bridge-shim` after editing the Swift
20
- // bridge; CI verifies the .mm is up to date by re-running the script and
21
- // failing on a non-empty `git diff`.
22
- //
23
- // Conventions assumed about the Swift bridge file:
24
- // 1. Each bridged method is preceded by `@objc` (zero-arg) or
25
- // `@objc(selector:parts:)` (multi-arg) on its own line.
26
- // 2. The `@objc` line is immediately followed by `func name(...)`. Blank
27
- // lines between are tolerated.
28
- // 3. Multi-arg methods always use the explicit `@objc(...)` form so the
29
- // selector parts are unambiguous (no auto-derivation).
30
- // 4. Zero-arg methods use bare `@objc`. The selector is just the method
31
- // name.
32
- // 5. The class itself is decorated with `@objc(DashXReactNative)` — this
33
- // script ignores any `@objc` decoration that's NOT followed by `func`.
34
- //
35
- // If the Swift file uses a parameter type the SWIFT_TO_OBJC table doesn't
36
- // know, the script errors loudly with the offending type name. Adding new
37
- // types is a one-line entry in the table — preferred to a silent fallback.
38
-
39
- const fs = require('fs')
40
- const path = require('path')
41
-
42
- const REPO_ROOT = path.resolve(__dirname, '..')
43
- const SWIFT_PATH = path.join(REPO_ROOT, 'ios', 'DashXReactNative.swift')
44
- const MM_PATH = path.join(REPO_ROOT, 'ios', 'DashXReactNative.mm')
45
-
46
- // Swift parameter type → ObjC declaration. The values are written verbatim
47
- // into the .mm so they include pointers and `_Nullable` annotations where
48
- // applicable. Add new entries when the bridge starts using a new type.
49
- const SWIFT_TO_OBJC = {
50
- 'String': 'NSString *',
51
- 'String?': 'NSString * _Nullable',
52
- 'NSString': 'NSString *',
53
- 'NSString?': 'NSString * _Nullable',
54
- 'NSDictionary': 'NSDictionary *',
55
- 'NSDictionary?': 'NSDictionary * _Nullable',
56
- 'Bool': 'BOOL',
57
- 'Double': 'double',
58
- '@escaping RCTPromiseResolveBlock': 'RCTPromiseResolveBlock',
59
- '@escaping RCTPromiseRejectBlock': 'RCTPromiseRejectBlock',
60
- }
61
-
62
- const HEADER = `//
63
- // AUTO-GENERATED FROM DashXReactNative.swift — DO NOT EDIT.
64
- // Regenerate with \`yarn sync-bridge-shim\` after editing the Swift file.
65
- //
66
- // The Swift class's @objc method declarations are the source of truth.
67
- // This file mirrors them so old-arch React Native consumers (which discover
68
- // methods via RCT_EXTERN_METHOD) and new-arch consumers (which dispatch via
69
- // the codegen-generated TurboModule spec) both find consistent signatures.
70
- //
71
-
72
- #import <React/RCTBridgeModule.h>
73
- #import <React/RCTEventEmitter.h>
74
-
75
- #ifdef RCT_NEW_ARCH_ENABLED
76
- #import "RNDashXReactNativeSpec.h"
77
- #endif
78
-
79
- @interface RCT_EXTERN_MODULE(DashXReactNative, RCTEventEmitter)
80
-
81
- `
82
-
83
- const FOOTER = `
84
- @end
85
-
86
- #ifdef RCT_NEW_ARCH_ENABLED
87
- @interface DashXReactNative () <NativeDashXReactNativeSpec>
88
- @end
89
-
90
- @implementation DashXReactNative (TurboModule)
91
-
92
- - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
93
- (const facebook::react::ObjCTurboModule::InitParams &)params
94
- {
95
- return std::make_shared<facebook::react::NativeDashXReactNativeSpecJSI>(params);
96
- }
97
-
98
- @end
99
- #endif
100
- `
101
-
102
- function fail(message) {
103
- console.error(`generate-bridge-shim: ${message}`)
104
- process.exit(1)
105
- }
106
-
107
- function translateType(swiftType) {
108
- const trimmed = swiftType.trim()
109
- if (!(trimmed in SWIFT_TO_OBJC)) {
110
- fail(
111
- `unknown Swift parameter type "${trimmed}". Add a mapping to ` +
112
- `SWIFT_TO_OBJC in scripts/generate-bridge-shim.js if this is a ` +
113
- `legitimate new type the bridge needs.`
114
- )
115
- }
116
- return SWIFT_TO_OBJC[trimmed]
117
- }
118
-
119
- // Parse a Swift parameter list like "_ urn: String, options: NSDictionary?,
120
- // resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock"
121
- // into an array of { argName, type } pairs in declaration order. The Swift
122
- // argument LABEL ("_" or the external label) is irrelevant for emitting the
123
- // .mm — the selector parts already encode the labels.
124
- function parseSwiftParams(paramsRaw) {
125
- if (paramsRaw.trim() === '') return []
126
-
127
- // Split on commas that are NOT inside angle brackets / parens. The bridge
128
- // doesn't currently use generics, so a plain split is enough.
129
- const parts = paramsRaw.split(',').map((p) => p.trim()).filter(Boolean)
130
-
131
- return parts.map((part) => {
132
- // Forms:
133
- // "_ name: Type"
134
- // "label name: Type"
135
- // "name: Type" (label = name)
136
- const m = part.match(/^(?:(\S+)\s+)?(\w+)\s*:\s*(.+)$/)
137
- if (!m) {
138
- fail(`could not parse parameter "${part}" in DashXReactNative.swift`)
139
- }
140
- const argName = m[2]
141
- const type = m[3]
142
- return { argName, type }
143
- })
144
- }
145
-
146
- // Read the Swift bridge and walk it for @objc-decorated funcs. Returns an
147
- // array of { name, selectorOverride, params } in source order. Decorations
148
- // without a following `func` (e.g. the class-level @objc(DashXReactNative))
149
- // are skipped.
150
- function extractMethods(source) {
151
- const lines = source.split('\n')
152
- const methods = []
153
-
154
- for (let i = 0; i < lines.length; i++) {
155
- const trimmed = lines[i].trim()
156
- const objc = trimmed.match(/^@objc(?:\(([^)]+)\))?\s*$/)
157
- if (!objc) continue
158
- const selectorOverride = objc[1] || null
159
-
160
- // Find the next non-blank line. If it's not a `func`, this @objc isn't
161
- // for us (could be a class declaration, a property, etc.).
162
- let j = i + 1
163
- while (j < lines.length && lines[j].trim() === '') j++
164
- if (j >= lines.length) continue
165
-
166
- let sig = lines[j]
167
- if (!/^\s*func\s/.test(sig)) continue
168
-
169
- // Multi-line param lists: keep accumulating until parens balance.
170
- let openParens = (sig.match(/\(/g) || []).length
171
- let closeParens = (sig.match(/\)/g) || []).length
172
- while (openParens > closeParens && j + 1 < lines.length) {
173
- j++
174
- sig += ' ' + lines[j].trim()
175
- openParens += (lines[j].match(/\(/g) || []).length
176
- closeParens += (lines[j].match(/\)/g) || []).length
177
- }
178
-
179
- const m = sig.match(/func\s+(\w+)\s*\(([^)]*)\)/)
180
- if (!m) {
181
- fail(
182
- `could not parse @objc'd function signature near line ${j + 1}: ` +
183
- `"${sig.trim()}"`
184
- )
185
- }
186
- const [, name, paramsRaw] = m
187
-
188
- methods.push({
189
- name,
190
- selectorOverride,
191
- params: parseSwiftParams(paramsRaw),
192
- })
193
- }
194
-
195
- return methods
196
- }
197
-
198
- // Build the RCT_EXTERN_METHOD line for one method. Selector parts come from
199
- // the @objc(selector:parts:) override (or the bare method name for zero-arg
200
- // methods). Types come from the parsed Swift params.
201
- function emitDeclaration(method) {
202
- const { name, selectorOverride, params } = method
203
-
204
- if (params.length === 0) {
205
- // Zero-arg method — RCT_EXTERN_METHOD(name) with no parens.
206
- return `RCT_EXTERN_METHOD(${name})`
207
- }
208
-
209
- if (!selectorOverride) {
210
- fail(
211
- `multi-arg method "${name}" must use explicit @objc(selector:parts:) ` +
212
- `form so its selector is unambiguous.`
213
- )
214
- }
215
-
216
- // Selector parts: "fetchRecord:options:resolve:reject:" → ["fetchRecord",
217
- // "options", "resolve", "reject"]. The first part is the method name.
218
- // Expect (params.length) parts total — if the count differs, the @objc
219
- // override and the func signature have drifted.
220
- const labels = selectorOverride.split(':').filter(Boolean)
221
- if (labels.length !== params.length) {
222
- fail(
223
- `method "${name}" has ${labels.length} selector parts but ` +
224
- `${params.length} parameters — these must match. Update the ` +
225
- `@objc(...) override or the func signature in DashXReactNative.swift.`
226
- )
227
- }
228
-
229
- // Interleave: "label1:(Type1)argName1 label2:(Type2)argName2 ..."
230
- // The first label is the method name; subsequent labels precede their
231
- // typed arg.
232
- const pieces = labels.map((label, idx) => {
233
- const { argName, type } = params[idx]
234
- const objcType = translateType(type)
235
- return `${label}:(${objcType})${argName}`
236
- })
237
-
238
- return `RCT_EXTERN_METHOD(${pieces.join(' ')})`
239
- }
240
-
241
- function main() {
242
- const source = fs.readFileSync(SWIFT_PATH, 'utf8')
243
- const methods = extractMethods(source)
244
-
245
- if (methods.length === 0) {
246
- fail(`no @objc-decorated methods found in ${SWIFT_PATH}`)
247
- }
248
-
249
- const declarations = methods.map((m) => emitDeclaration(m) + ';').join('\n\n')
250
- const out = HEADER + declarations + '\n' + FOOTER
251
-
252
- fs.writeFileSync(MM_PATH, out)
253
- console.log(
254
- `generate-bridge-shim: wrote ${methods.length} RCT_EXTERN_METHOD ` +
255
- `declarations to ios/DashXReactNative.mm`
256
- )
257
- }
258
-
259
- main()