@forstaglobal/react-native-mobilesdk 3.9.2-beta.0

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 (53) hide show
  1. package/LICENSE +13 -0
  2. package/README.md +158 -0
  3. package/android/build.gradle +110 -0
  4. package/android/gradle.properties +5 -0
  5. package/android/src/main/AndroidManifest.xml +3 -0
  6. package/android/src/main/AndroidManifestNew.xml +2 -0
  7. package/android/src/main/java/com/mobilesdk/MobileSdkModule.kt +283 -0
  8. package/android/src/main/java/com/mobilesdk/MobileSdkPackage.kt +17 -0
  9. package/android/src/main/java/com/mobilesdk/module/MobileBridge.kt +15 -0
  10. package/android/src/main/java/com/mobilesdk/module/TriggerCallback.kt +60 -0
  11. package/ios/MobileSdk-Bridging-Header.h +2 -0
  12. package/ios/MobileSdk.mm +118 -0
  13. package/ios/MobileSdk.swift +257 -0
  14. package/ios/Mobilesdk.xcodeproj/project.pbxproj +351 -0
  15. package/ios/Mobilesdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata +4 -0
  16. package/ios/Mobilesdk.xcworkspace/contents.xcworkspacedata +10 -0
  17. package/ios/Mobilesdk.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  18. package/ios/Module/Exts.swift +16 -0
  19. package/ios/Module/MobileTriggerCallback.swift +49 -0
  20. package/ios/Module/SdkEmitter.mm +5 -0
  21. package/ios/Module/SdkEmitter.swift +26 -0
  22. package/ios/Podfile +7 -0
  23. package/ios/Podfile.lock +16 -0
  24. package/lib/commonjs/index.js +161 -0
  25. package/lib/commonjs/index.js.map +1 -0
  26. package/lib/commonjs/models/models.js +2 -0
  27. package/lib/commonjs/models/models.js.map +1 -0
  28. package/lib/commonjs/program/triggerCallback.js +38 -0
  29. package/lib/commonjs/program/triggerCallback.js.map +1 -0
  30. package/lib/commonjs/views/surveyWebView.js +60 -0
  31. package/lib/commonjs/views/surveyWebView.js.map +1 -0
  32. package/lib/module/index.js +116 -0
  33. package/lib/module/index.js.map +1 -0
  34. package/lib/module/models/models.js +2 -0
  35. package/lib/module/models/models.js.map +1 -0
  36. package/lib/module/program/triggerCallback.js +31 -0
  37. package/lib/module/program/triggerCallback.js.map +1 -0
  38. package/lib/module/views/surveyWebView.js +50 -0
  39. package/lib/module/views/surveyWebView.js.map +1 -0
  40. package/lib/typescript/index.d.ts +39 -0
  41. package/lib/typescript/index.d.ts.map +1 -0
  42. package/lib/typescript/models/models.d.ts +15 -0
  43. package/lib/typescript/models/models.d.ts.map +1 -0
  44. package/lib/typescript/program/triggerCallback.d.ts +20 -0
  45. package/lib/typescript/program/triggerCallback.d.ts.map +1 -0
  46. package/lib/typescript/views/surveyWebView.d.ts +17 -0
  47. package/lib/typescript/views/surveyWebView.d.ts.map +1 -0
  48. package/package.json +137 -0
  49. package/react-native-mobilesdk.podspec +43 -0
  50. package/src/index.tsx +202 -0
  51. package/src/models/models.ts +16 -0
  52. package/src/program/triggerCallback.ts +51 -0
  53. package/src/views/surveyWebView.tsx +69 -0
@@ -0,0 +1,351 @@
1
+ // !$*UTF8*$!
2
+ {
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 46;
7
+ objects = {
8
+
9
+ /* Begin PBXBuildFile section */
10
+ 22B56327649A19DC078C541A /* Pods_Mobilesdk.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A73BA7DBF7DE33508DCC5DF /* Pods_Mobilesdk.framework */; };
11
+ 2D326A9F2AD8B53200B2A5C7 /* TriggerCallback.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D326A9D2AD8B53200B2A5C7 /* TriggerCallback.swift */; };
12
+ 2D326AA02AD8B53200B2A5C7 /* TriggerCallbackBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D326A9E2AD8B53200B2A5C7 /* TriggerCallbackBridge.m */; };
13
+ F4FF95D7245B92E800C19C63 /* Mobilesdk.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4FF95D6245B92E800C19C63 /* Mobilesdk.swift */; };
14
+ /* End PBXBuildFile section */
15
+
16
+ /* Begin PBXCopyFilesBuildPhase section */
17
+ 58B511D91A9E6C8500147676 /* CopyFiles */ = {
18
+ isa = PBXCopyFilesBuildPhase;
19
+ buildActionMask = 2147483647;
20
+ dstPath = "include/$(PRODUCT_NAME)";
21
+ dstSubfolderSpec = 16;
22
+ files = (
23
+ );
24
+ runOnlyForDeploymentPostprocessing = 0;
25
+ };
26
+ /* End PBXCopyFilesBuildPhase section */
27
+
28
+ /* Begin PBXFileReference section */
29
+ 0E4FC8FADE7EB672217188C9 /* Pods-Mobilesdk.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mobilesdk.release.xcconfig"; path = "Target Support Files/Pods-Mobilesdk/Pods-Mobilesdk.release.xcconfig"; sourceTree = "<group>"; };
30
+ 134814201AA4EA6300B7C361 /* libMobilesdk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMobilesdk.a; sourceTree = BUILT_PRODUCTS_DIR; };
31
+ 2D326A992AD8B38F00B2A5C7 /* Exts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Exts.swift; sourceTree = "<group>"; };
32
+ 2D326A9D2AD8B53200B2A5C7 /* TriggerCallback.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TriggerCallback.swift; sourceTree = "<group>"; };
33
+ 2D326A9E2AD8B53200B2A5C7 /* TriggerCallbackBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TriggerCallbackBridge.m; sourceTree = "<group>"; };
34
+ 6A73BA7DBF7DE33508DCC5DF /* Pods_Mobilesdk.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Mobilesdk.framework; sourceTree = BUILT_PRODUCTS_DIR; };
35
+ 83878EE108D19505560247B1 /* Pods-Mobilesdk.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mobilesdk.debug.xcconfig"; path = "Target Support Files/Pods-Mobilesdk/Pods-Mobilesdk.debug.xcconfig"; sourceTree = "<group>"; };
36
+ B3E7B5891CC2AC0600A0062D /* Mobilesdk.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Mobilesdk.mm; sourceTree = "<group>"; };
37
+ F4FF95D5245B92E700C19C63 /* Mobilesdk-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Mobilesdk-Bridging-Header.h"; sourceTree = "<group>"; };
38
+ F4FF95D6245B92E800C19C63 /* Mobilesdk.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Mobilesdk.swift; sourceTree = "<group>"; };
39
+ /* End PBXFileReference section */
40
+
41
+ /* Begin PBXFrameworksBuildPhase section */
42
+ 58B511D81A9E6C8500147676 /* Frameworks */ = {
43
+ isa = PBXFrameworksBuildPhase;
44
+ buildActionMask = 2147483647;
45
+ files = (
46
+ 22B56327649A19DC078C541A /* Pods_Mobilesdk.framework in Frameworks */,
47
+ );
48
+ runOnlyForDeploymentPostprocessing = 0;
49
+ };
50
+ /* End PBXFrameworksBuildPhase section */
51
+
52
+ /* Begin PBXGroup section */
53
+ 134814211AA4EA7D00B7C361 /* Products */ = {
54
+ isa = PBXGroup;
55
+ children = (
56
+ 134814201AA4EA6300B7C361 /* libMobilesdk.a */,
57
+ );
58
+ name = Products;
59
+ sourceTree = "<group>";
60
+ };
61
+ 2D326A9C2AD8B51500B2A5C7 /* Module */ = {
62
+ isa = PBXGroup;
63
+ children = (
64
+ 2D326A9D2AD8B53200B2A5C7 /* TriggerCallback.swift */,
65
+ 2D326A9E2AD8B53200B2A5C7 /* TriggerCallbackBridge.m */,
66
+ );
67
+ path = Module;
68
+ sourceTree = "<group>";
69
+ };
70
+ 4356A549ED0A74962CC5A2CB /* Pods */ = {
71
+ isa = PBXGroup;
72
+ children = (
73
+ 83878EE108D19505560247B1 /* Pods-Mobilesdk.debug.xcconfig */,
74
+ 0E4FC8FADE7EB672217188C9 /* Pods-Mobilesdk.release.xcconfig */,
75
+ );
76
+ path = Pods;
77
+ sourceTree = "<group>";
78
+ };
79
+ 4BE55DDE6D0A6F02C72C8A17 /* Frameworks */ = {
80
+ isa = PBXGroup;
81
+ children = (
82
+ 6A73BA7DBF7DE33508DCC5DF /* Pods_Mobilesdk.framework */,
83
+ );
84
+ name = Frameworks;
85
+ sourceTree = "<group>";
86
+ };
87
+ 58B511D21A9E6C8500147676 = {
88
+ isa = PBXGroup;
89
+ children = (
90
+ 2D326A9C2AD8B51500B2A5C7 /* Module */,
91
+ 2D326A992AD8B38F00B2A5C7 /* Exts.swift */,
92
+ F4FF95D6245B92E800C19C63 /* Mobilesdk.swift */,
93
+ B3E7B5891CC2AC0600A0062D /* Mobilesdk.mm */,
94
+ F4FF95D5245B92E700C19C63 /* Mobilesdk-Bridging-Header.h */,
95
+ 134814211AA4EA7D00B7C361 /* Products */,
96
+ 4356A549ED0A74962CC5A2CB /* Pods */,
97
+ 4BE55DDE6D0A6F02C72C8A17 /* Frameworks */,
98
+ );
99
+ sourceTree = "<group>";
100
+ };
101
+ /* End PBXGroup section */
102
+
103
+ /* Begin PBXNativeTarget section */
104
+ 58B511DA1A9E6C8500147676 /* Mobilesdk */ = {
105
+ isa = PBXNativeTarget;
106
+ buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "Mobilesdk" */;
107
+ buildPhases = (
108
+ 2DED216658FF935C449A5C96 /* [CP] Check Pods Manifest.lock */,
109
+ 58B511D71A9E6C8500147676 /* Sources */,
110
+ 58B511D81A9E6C8500147676 /* Frameworks */,
111
+ 58B511D91A9E6C8500147676 /* CopyFiles */,
112
+ );
113
+ buildRules = (
114
+ );
115
+ dependencies = (
116
+ );
117
+ name = Mobilesdk;
118
+ productName = RCTDataManager;
119
+ productReference = 134814201AA4EA6300B7C361 /* libMobilesdk.a */;
120
+ productType = "com.apple.product-type.library.static";
121
+ };
122
+ /* End PBXNativeTarget section */
123
+
124
+ /* Begin PBXProject section */
125
+ 58B511D31A9E6C8500147676 /* Project object */ = {
126
+ isa = PBXProject;
127
+ attributes = {
128
+ LastUpgradeCheck = 0920;
129
+ ORGANIZATIONNAME = Facebook;
130
+ TargetAttributes = {
131
+ 58B511DA1A9E6C8500147676 = {
132
+ CreatedOnToolsVersion = 6.1.1;
133
+ };
134
+ };
135
+ };
136
+ buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "Mobilesdk" */;
137
+ compatibilityVersion = "Xcode 3.2";
138
+ developmentRegion = English;
139
+ hasScannedForEncodings = 0;
140
+ knownRegions = (
141
+ English,
142
+ en,
143
+ );
144
+ mainGroup = 58B511D21A9E6C8500147676;
145
+ productRefGroup = 58B511D21A9E6C8500147676;
146
+ projectDirPath = "";
147
+ projectRoot = "";
148
+ targets = (
149
+ 58B511DA1A9E6C8500147676 /* Mobilesdk */,
150
+ );
151
+ };
152
+ /* End PBXProject section */
153
+
154
+ /* Begin PBXShellScriptBuildPhase section */
155
+ 2DED216658FF935C449A5C96 /* [CP] Check Pods Manifest.lock */ = {
156
+ isa = PBXShellScriptBuildPhase;
157
+ buildActionMask = 2147483647;
158
+ files = (
159
+ );
160
+ inputFileListPaths = (
161
+ );
162
+ inputPaths = (
163
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
164
+ "${PODS_ROOT}/Manifest.lock",
165
+ );
166
+ name = "[CP] Check Pods Manifest.lock";
167
+ outputFileListPaths = (
168
+ );
169
+ outputPaths = (
170
+ "$(DERIVED_FILE_DIR)/Pods-Mobilesdk-checkManifestLockResult.txt",
171
+ );
172
+ runOnlyForDeploymentPostprocessing = 0;
173
+ shellPath = /bin/sh;
174
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
175
+ showEnvVarsInLog = 0;
176
+ };
177
+ /* End PBXShellScriptBuildPhase section */
178
+
179
+ /* Begin PBXSourcesBuildPhase section */
180
+ 58B511D71A9E6C8500147676 /* Sources */ = {
181
+ isa = PBXSourcesBuildPhase;
182
+ buildActionMask = 2147483647;
183
+ files = (
184
+ F4FF95D7245B92E800C19C63 /* Mobilesdk.swift in Sources */,
185
+ 2D326A9F2AD8B53200B2A5C7 /* TriggerCallback.swift in Sources */,
186
+ 2D326AA02AD8B53200B2A5C7 /* TriggerCallbackBridge.m in Sources */,
187
+ );
188
+ runOnlyForDeploymentPostprocessing = 0;
189
+ };
190
+ /* End PBXSourcesBuildPhase section */
191
+
192
+ /* Begin XCBuildConfiguration section */
193
+ 58B511ED1A9E6C8500147676 /* Debug */ = {
194
+ isa = XCBuildConfiguration;
195
+ buildSettings = {
196
+ ALWAYS_SEARCH_USER_PATHS = NO;
197
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
198
+ CLANG_CXX_LIBRARY = "libc++";
199
+ CLANG_ENABLE_MODULES = YES;
200
+ CLANG_ENABLE_OBJC_ARC = YES;
201
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
202
+ CLANG_WARN_BOOL_CONVERSION = YES;
203
+ CLANG_WARN_COMMA = YES;
204
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
205
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
206
+ CLANG_WARN_EMPTY_BODY = YES;
207
+ CLANG_WARN_ENUM_CONVERSION = YES;
208
+ CLANG_WARN_INFINITE_RECURSION = YES;
209
+ CLANG_WARN_INT_CONVERSION = YES;
210
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
211
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
212
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
213
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
214
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
215
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
216
+ CLANG_WARN_UNREACHABLE_CODE = YES;
217
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
218
+ COPY_PHASE_STRIP = NO;
219
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
220
+ ENABLE_TESTABILITY = YES;
221
+ "EXCLUDED_ARCHS[sdk=*]" = arm64;
222
+ GCC_C_LANGUAGE_STANDARD = gnu99;
223
+ GCC_DYNAMIC_NO_PIC = NO;
224
+ GCC_NO_COMMON_BLOCKS = YES;
225
+ GCC_OPTIMIZATION_LEVEL = 0;
226
+ GCC_PREPROCESSOR_DEFINITIONS = (
227
+ "DEBUG=1",
228
+ "$(inherited)",
229
+ );
230
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
231
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
232
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
233
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
234
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
235
+ GCC_WARN_UNUSED_FUNCTION = YES;
236
+ GCC_WARN_UNUSED_VARIABLE = YES;
237
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
238
+ MTL_ENABLE_DEBUG_INFO = YES;
239
+ ONLY_ACTIVE_ARCH = YES;
240
+ SDKROOT = iphoneos;
241
+ };
242
+ name = Debug;
243
+ };
244
+ 58B511EE1A9E6C8500147676 /* Release */ = {
245
+ isa = XCBuildConfiguration;
246
+ buildSettings = {
247
+ ALWAYS_SEARCH_USER_PATHS = NO;
248
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
249
+ CLANG_CXX_LIBRARY = "libc++";
250
+ CLANG_ENABLE_MODULES = YES;
251
+ CLANG_ENABLE_OBJC_ARC = YES;
252
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
253
+ CLANG_WARN_BOOL_CONVERSION = YES;
254
+ CLANG_WARN_COMMA = YES;
255
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
256
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
257
+ CLANG_WARN_EMPTY_BODY = YES;
258
+ CLANG_WARN_ENUM_CONVERSION = YES;
259
+ CLANG_WARN_INFINITE_RECURSION = YES;
260
+ CLANG_WARN_INT_CONVERSION = YES;
261
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
262
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
263
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
264
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
265
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
266
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
267
+ CLANG_WARN_UNREACHABLE_CODE = YES;
268
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
269
+ COPY_PHASE_STRIP = YES;
270
+ ENABLE_NS_ASSERTIONS = NO;
271
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
272
+ "EXCLUDED_ARCHS[sdk=*]" = arm64;
273
+ GCC_C_LANGUAGE_STANDARD = gnu99;
274
+ GCC_NO_COMMON_BLOCKS = YES;
275
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
276
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
277
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
278
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
279
+ GCC_WARN_UNUSED_FUNCTION = YES;
280
+ GCC_WARN_UNUSED_VARIABLE = YES;
281
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
282
+ MTL_ENABLE_DEBUG_INFO = NO;
283
+ SDKROOT = iphoneos;
284
+ VALIDATE_PRODUCT = YES;
285
+ };
286
+ name = Release;
287
+ };
288
+ 58B511F01A9E6C8500147676 /* Debug */ = {
289
+ isa = XCBuildConfiguration;
290
+ baseConfigurationReference = 83878EE108D19505560247B1 /* Pods-Mobilesdk.debug.xcconfig */;
291
+ buildSettings = {
292
+ HEADER_SEARCH_PATHS = (
293
+ "$(inherited)",
294
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
295
+ "$(SRCROOT)/../../../React/**",
296
+ "$(SRCROOT)/../../react-native/React/**",
297
+ );
298
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
299
+ OTHER_LDFLAGS = "-ObjC";
300
+ PRODUCT_NAME = Mobilesdk;
301
+ SKIP_INSTALL = YES;
302
+ SWIFT_OBJC_BRIDGING_HEADER = "Mobilesdk-Bridging-Header.h";
303
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
304
+ SWIFT_VERSION = 5.0;
305
+ };
306
+ name = Debug;
307
+ };
308
+ 58B511F11A9E6C8500147676 /* Release */ = {
309
+ isa = XCBuildConfiguration;
310
+ baseConfigurationReference = 0E4FC8FADE7EB672217188C9 /* Pods-Mobilesdk.release.xcconfig */;
311
+ buildSettings = {
312
+ HEADER_SEARCH_PATHS = (
313
+ "$(inherited)",
314
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
315
+ "$(SRCROOT)/../../../React/**",
316
+ "$(SRCROOT)/../../react-native/React/**",
317
+ );
318
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
319
+ OTHER_LDFLAGS = "-ObjC";
320
+ PRODUCT_NAME = Mobilesdk;
321
+ SKIP_INSTALL = YES;
322
+ SWIFT_OBJC_BRIDGING_HEADER = "Mobilesdk-Bridging-Header.h";
323
+ SWIFT_VERSION = 5.0;
324
+ };
325
+ name = Release;
326
+ };
327
+ /* End XCBuildConfiguration section */
328
+
329
+ /* Begin XCConfigurationList section */
330
+ 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "Mobilesdk" */ = {
331
+ isa = XCConfigurationList;
332
+ buildConfigurations = (
333
+ 58B511ED1A9E6C8500147676 /* Debug */,
334
+ 58B511EE1A9E6C8500147676 /* Release */,
335
+ );
336
+ defaultConfigurationIsVisible = 0;
337
+ defaultConfigurationName = Release;
338
+ };
339
+ 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "Mobilesdk" */ = {
340
+ isa = XCConfigurationList;
341
+ buildConfigurations = (
342
+ 58B511F01A9E6C8500147676 /* Debug */,
343
+ 58B511F11A9E6C8500147676 /* Release */,
344
+ );
345
+ defaultConfigurationIsVisible = 0;
346
+ defaultConfigurationName = Release;
347
+ };
348
+ /* End XCConfigurationList section */
349
+ };
350
+ rootObject = 58B511D31A9E6C8500147676 /* Project object */;
351
+ }
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ </Workspace>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "group:Mobilesdk.xcodeproj">
6
+ </FileRef>
7
+ <FileRef
8
+ location = "group:Pods/Pods.xcodeproj">
9
+ </FileRef>
10
+ </Workspace>
@@ -0,0 +1,8 @@
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>
@@ -0,0 +1,16 @@
1
+ import Foundation
2
+
3
+ extension NSDictionary {
4
+ var swiftDictionary: [String: String] {
5
+ var swiftDictionary = [String: String]()
6
+
7
+ for key: Any in self.allKeys {
8
+ let stringKey = key as! String
9
+ if let keyValue = self.value(forKey: stringKey) {
10
+ swiftDictionary[stringKey] = "\(keyValue)"
11
+ }
12
+ }
13
+
14
+ return swiftDictionary
15
+ }
16
+ }
@@ -0,0 +1,49 @@
1
+ import ConfirmitMobileSDK
2
+ import Foundation
3
+
4
+ class MobileTriggerCallback: ProgramCallback {
5
+ private let serverId: String
6
+ private let programKey: String
7
+
8
+ init(serverId: String, programKey: String) {
9
+ self.serverId = serverId
10
+ self.programKey = programKey
11
+ }
12
+
13
+ func onSurveyDownloadCompleted(triggerInfo: ConfirmitMobileSDK.TriggerInfo, surveyId: String, error: Error?) {}
14
+
15
+ func onSurveyStart(config: ConfirmitMobileSDK.SurveyFrameConfig) {}
16
+
17
+ func onScenarioLoad(triggerInfo: ConfirmitMobileSDK.TriggerInfo, error: Error?) {
18
+ SdkEmitter.shared.sendEvent(withName: "__mobileOnScenarioLoad", body: [
19
+ "serverId": serverId,
20
+ "programKey": programKey,
21
+ "error": error?.localizedDescription ?? ""
22
+ ])
23
+ }
24
+
25
+ func onScenarioError(triggerInfo: ConfirmitMobileSDK.TriggerInfo, error: Error) {
26
+ SdkEmitter.shared.sendEvent(withName: "__mobileOnScenarioError", body: [
27
+ "serverId": serverId,
28
+ "programKey": programKey,
29
+ "error": error.localizedDescription
30
+ ])
31
+ }
32
+
33
+ func onAppFeedback(triggerInfo: ConfirmitMobileSDK.TriggerInfo, data: [String: String?]) {}
34
+
35
+ func onWebSurveyStart(surveyWebView: ConfirmitMobileSDK.SurveyWebViewController) {
36
+ surveyWebView.getSurveyUrl { url, _ in
37
+ guard let token = url?.token, let url = url?.url else {
38
+ return
39
+ }
40
+
41
+ SdkEmitter.shared.sendEvent(withName: "__mobileOnWebSurveyStart", body: [
42
+ "serverId": self.serverId,
43
+ "programKey": self.programKey,
44
+ "token": token,
45
+ "url": url
46
+ ])
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,5 @@
1
+ #import <React/RCTBridgeModule.h>
2
+
3
+ @interface RCT_EXTERN_MODULE(SdkEmitter, NSObject)
4
+
5
+ @end
@@ -0,0 +1,26 @@
1
+ import Foundation
2
+
3
+ @objc(SdkEmitter)
4
+ class SdkEmitter: RCTEventEmitter {
5
+ private static var instance: SdkEmitter?
6
+ static var shared: SdkEmitter {
7
+ if let instance = instance {
8
+ return instance
9
+ }
10
+
11
+ fatalError("Trigger callback haven't been initialized yet")
12
+ }
13
+
14
+ override class func requiresMainQueueSetup() -> Bool {
15
+ return true
16
+ }
17
+
18
+ override init() {
19
+ super.init()
20
+ SdkEmitter.instance = self
21
+ }
22
+
23
+ override func supportedEvents() -> [String]! {
24
+ return ["__mobileOnWebSurveyStart", "__mobileOnScenarioError", "__mobileOnScenarioLoad", "__mobileOnSurveyClosed"]
25
+ }
26
+ }
package/ios/Podfile ADDED
@@ -0,0 +1,7 @@
1
+ platform :ios, '12.0'
2
+
3
+ target 'Mobilesdk' do
4
+ use_frameworks!
5
+
6
+ pod 'ConfirmitMobileSDK', '3.9.2-beta.0'
7
+ end
@@ -0,0 +1,16 @@
1
+ PODS:
2
+ - ConfirmitMobileSDK (3.9.2)
3
+
4
+ DEPENDENCIES:
5
+ - ConfirmitMobileSDK
6
+
7
+ SPEC REPOS:
8
+ trunk:
9
+ - ConfirmitMobileSDK
10
+
11
+ SPEC CHECKSUMS:
12
+ ConfirmitMobileSDK: bb0fee431634ad9d7267ce44891162ddb1954d22
13
+
14
+ PODFILE CHECKSUM: 8e4ae4c1c62773815f9364146f1b308f27578266
15
+
16
+ COCOAPODS: 1.12.0
@@ -0,0 +1,161 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "SurveyWebView", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _surveyWebView.default;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "TriggerManager", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _triggerCallback.TriggerManager;
16
+ }
17
+ });
18
+ exports.configureAustralia = configureAustralia;
19
+ exports.configureCanada = configureCanada;
20
+ exports.configureGermany = configureGermany;
21
+ exports.configureHxAustralia = configureHxAustralia;
22
+ exports.configureHxPlatform = configureHxPlatform;
23
+ exports.configureServer = configureServer;
24
+ exports.configureUk = configureUk;
25
+ exports.configureUs = configureUs;
26
+ exports.deleteAll = deleteAll;
27
+ exports.deleteProgram = deleteProgram;
28
+ exports.enableLog = enableLog;
29
+ exports.getAustralia = getAustralia;
30
+ exports.getCanada = getCanada;
31
+ exports.getGermany = getGermany;
32
+ exports.getHxAustralia = getHxAustralia;
33
+ exports.getHxPlatform = getHxPlatform;
34
+ exports.getServer = getServer;
35
+ exports.getServers = getServers;
36
+ exports.getUk = getUk;
37
+ exports.getUs = getUs;
38
+ exports.initSdk = initSdk;
39
+ exports.injectWebView = injectWebView;
40
+ exports.notifyAppForeground = notifyAppForeground;
41
+ exports.notifyEvent = notifyEvent;
42
+ exports.notifyEventWithData = notifyEventWithData;
43
+ exports.removeCallback = removeCallback;
44
+ exports.setCallback = setCallback;
45
+ exports.triggerDownload = triggerDownload;
46
+ var _reactNative = require("react-native");
47
+ var _surveyWebView = _interopRequireDefault(require("./views/surveyWebView"));
48
+ var _triggerCallback = require("./program/triggerCallback");
49
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
50
+ const LINKING_ERROR = `The package 'react-native-mobilesdk' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({
51
+ ios: "- You have run 'pod install'\n",
52
+ default: ''
53
+ }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
54
+ const MobileSdk = _reactNative.NativeModules.MobileSdk ? _reactNative.NativeModules.MobileSdk : new Proxy({}, {
55
+ get() {
56
+ throw new Error(LINKING_ERROR);
57
+ }
58
+ });
59
+ function injectWebView() {
60
+ MobileSdk.injectWebView();
61
+ }
62
+
63
+ // Confirmit
64
+ function initSdk() {
65
+ return MobileSdk.initSdk();
66
+ }
67
+ function enableLog(enable) {
68
+ MobileSdk.enableLog(enable);
69
+ }
70
+
71
+ // Trigger
72
+ function notifyEvent(event) {
73
+ MobileSdk.notifyEvent(event);
74
+ }
75
+ function notifyAppForeground(data) {
76
+ MobileSdk.notifyAppForeground(data);
77
+ }
78
+ function deleteProgram(serverId, programKey, deleteCustomData) {
79
+ return MobileSdk.deleteProgram(serverId, programKey, deleteCustomData);
80
+ }
81
+ function deleteAll(deleteCustomData) {
82
+ return MobileSdk.deleteAll(deleteCustomData);
83
+ }
84
+ function setCallback(serverId, programKey) {
85
+ MobileSdk.setCallback(serverId, programKey);
86
+ }
87
+ function removeCallback(serverId, programKey) {
88
+ MobileSdk.removeCallback(serverId, programKey);
89
+ }
90
+ function triggerDownload(serverId, programKey) {
91
+ return MobileSdk.triggerDownload(serverId, programKey);
92
+ }
93
+ function notifyEventWithData(event, data) {
94
+ MobileSdk.notifyEventWithData(event, data);
95
+ }
96
+
97
+ // Server
98
+ async function getUs() {
99
+ return transformServer(await MobileSdk.getUs());
100
+ }
101
+ async function getUk() {
102
+ return transformServer(await MobileSdk.getUk());
103
+ }
104
+ async function getAustralia() {
105
+ return transformServer(await MobileSdk.getAustralia());
106
+ }
107
+ async function getCanada() {
108
+ return transformServer(await MobileSdk.getCanada());
109
+ }
110
+ async function getGermany() {
111
+ return transformServer(await MobileSdk.getGermany());
112
+ }
113
+ async function getHxPlatform() {
114
+ return transformServer(await MobileSdk.getHxPlatform());
115
+ }
116
+ async function getHxAustralia() {
117
+ return transformServer(await MobileSdk.getHxAustralia());
118
+ }
119
+ async function configureUs(clientId, clientSecret) {
120
+ return await MobileSdk.configureUs(clientId, clientSecret);
121
+ }
122
+ async function configureUk(clientId, clientSecret) {
123
+ return await MobileSdk.configureUk(clientId, clientSecret);
124
+ }
125
+ async function configureAustralia(clientId, clientSecret) {
126
+ return await MobileSdk.configureAustralia(clientId, clientSecret);
127
+ }
128
+ async function configureCanada(clientId, clientSecret) {
129
+ return await MobileSdk.configureCanada(clientId, clientSecret);
130
+ }
131
+ async function configureGermany(clientId, clientSecret) {
132
+ return await MobileSdk.configureGermany(clientId, clientSecret);
133
+ }
134
+ async function configureHxPlatform(clientId, clientSecret) {
135
+ return await MobileSdk.configureHxPlatform(clientId, clientSecret);
136
+ }
137
+ async function configureHxAustralia(clientId, clientSecret) {
138
+ return await MobileSdk.configureHxAustralia(clientId, clientSecret);
139
+ }
140
+ async function configureServer(name, host, clientId, clientSecret) {
141
+ return transformServer(await MobileSdk.configureServer(name, host, clientId, clientSecret));
142
+ }
143
+ async function getServer(serverId) {
144
+ return transformServer(await MobileSdk.getServer(serverId));
145
+ }
146
+ async function getServers() {
147
+ const result = await MobileSdk.getServers();
148
+ const servers = [];
149
+ for (const server of result) {
150
+ servers.push(transformServer(server));
151
+ }
152
+ return servers;
153
+ }
154
+ function transformServer(result) {
155
+ return {
156
+ host: result.host,
157
+ name: result.name,
158
+ serverId: result.serverId
159
+ };
160
+ }
161
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_surveyWebView","_interopRequireDefault","_triggerCallback","obj","__esModule","default","LINKING_ERROR","Platform","select","ios","MobileSdk","NativeModules","Proxy","get","Error","injectWebView","initSdk","enableLog","enable","notifyEvent","event","notifyAppForeground","data","deleteProgram","serverId","programKey","deleteCustomData","deleteAll","setCallback","removeCallback","triggerDownload","notifyEventWithData","getUs","transformServer","getUk","getAustralia","getCanada","getGermany","getHxPlatform","getHxAustralia","configureUs","clientId","clientSecret","configureUk","configureAustralia","configureCanada","configureGermany","configureHxPlatform","configureHxAustralia","configureServer","name","host","getServer","getServers","result","servers","server","push"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAMA,IAAAC,cAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,gBAAA,GAAAH,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AAC5B,QAAQ,CAAC,CAAC;AAC7D;AAEO,eAAe6B,UAAUA,CAAA,EAA4B;EAC1D,MAAMC,MAAM,GAAG,MAAM5C,SAAS,CAAC2C,UAAU,CAAC,CAAC;EAC3C,MAAME,OAAO,GAAG,EAAE;EAClB,KAAK,MAAMC,MAAM,IAAIF,MAAM,EAAE;IAC3BC,OAAO,CAACE,IAAI,CAACxB,eAAe,CAACuB,MAAM,CAAC,CAAC;EACvC;EAEA,OAAOD,OAAO;AAChB;AAEA,SAAStB,eAAeA,CAACqB,MAAW,EAAgB;EAClD,OAAO;IACLH,IAAI,EAAEG,MAAM,CAACH,IAAI;IACjBD,IAAI,EAAEI,MAAM,CAACJ,IAAI;IACjB1B,QAAQ,EAAE8B,MAAM,CAAC9B;EACnB,CAAC;AACH"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["models/models.ts"],"mappings":""}