@idnow/react-idcheckio 7.1.11

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.
@@ -0,0 +1,340 @@
1
+ // !$*UTF8*$!
2
+ {
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 46;
7
+ objects = {
8
+
9
+ /* Begin PBXBuildFile section */
10
+ 485645D568FDD8D4EEFC114C /* Pods_Idcheckio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 69F6F541E33F87AA4FB7A863 /* Pods_Idcheckio.framework */; };
11
+ 6800846C2384207F00AAC01F /* IdcheckioSdk+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6800846B2384207F00AAC01F /* IdcheckioSdk+Utils.swift */; };
12
+ B3E7B58A1CC2AC0600A0062D /* Idcheckio.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* Idcheckio.m */; };
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 /* libIdcheckio.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libIdcheckio.a; sourceTree = BUILT_PRODUCTS_DIR; };
29
+ 25309B92930C8F45ADEB2900 /* Pods-Idcheckio.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Idcheckio.release.xcconfig"; path = "Target Support Files/Pods-Idcheckio/Pods-Idcheckio.release.xcconfig"; sourceTree = "<group>"; };
30
+ 2D9DA34C574E3C400A2E0C09 /* Pods-Idcheckio.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Idcheckio.debug.xcconfig"; path = "Target Support Files/Pods-Idcheckio/Pods-Idcheckio.debug.xcconfig"; sourceTree = "<group>"; };
31
+ 6800846B2384207F00AAC01F /* IdcheckioSdk+Utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "IdcheckioSdk+Utils.swift"; sourceTree = "<group>"; };
32
+ 68AD25E623335F5E002976B7 /* IdcheckioKeys.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IdcheckioKeys.h; sourceTree = "<group>"; };
33
+ 69F6F541E33F87AA4FB7A863 /* Pods_Idcheckio.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Idcheckio.framework; sourceTree = BUILT_PRODUCTS_DIR; };
34
+ B3E7B5881CC2AC0600A0062D /* Idcheckio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Idcheckio.h; sourceTree = "<group>"; };
35
+ B3E7B5891CC2AC0600A0062D /* Idcheckio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Idcheckio.m; sourceTree = "<group>"; };
36
+ /* End PBXFileReference section */
37
+
38
+ /* Begin PBXFrameworksBuildPhase section */
39
+ 58B511D81A9E6C8500147676 /* Frameworks */ = {
40
+ isa = PBXFrameworksBuildPhase;
41
+ buildActionMask = 2147483647;
42
+ files = (
43
+ 485645D568FDD8D4EEFC114C /* Pods_Idcheckio.framework in Frameworks */,
44
+ );
45
+ runOnlyForDeploymentPostprocessing = 0;
46
+ };
47
+ /* End PBXFrameworksBuildPhase section */
48
+
49
+ /* Begin PBXGroup section */
50
+ 134814211AA4EA7D00B7C361 /* Products */ = {
51
+ isa = PBXGroup;
52
+ children = (
53
+ 134814201AA4EA6300B7C361 /* libIdcheckio.a */,
54
+ );
55
+ name = Products;
56
+ sourceTree = "<group>";
57
+ };
58
+ 58B511D21A9E6C8500147676 = {
59
+ isa = PBXGroup;
60
+ children = (
61
+ 6800846B2384207F00AAC01F /* IdcheckioSdk+Utils.swift */,
62
+ 68AD25E623335F5E002976B7 /* IdcheckioKeys.h */,
63
+ B3E7B5881CC2AC0600A0062D /* Idcheckio.h */,
64
+ B3E7B5891CC2AC0600A0062D /* Idcheckio.m */,
65
+ 134814211AA4EA7D00B7C361 /* Products */,
66
+ C24317436459140030DC3E33 /* Pods */,
67
+ 738991D28E6E163DBE2332F1 /* Frameworks */,
68
+ );
69
+ sourceTree = "<group>";
70
+ };
71
+ 738991D28E6E163DBE2332F1 /* Frameworks */ = {
72
+ isa = PBXGroup;
73
+ children = (
74
+ 69F6F541E33F87AA4FB7A863 /* Pods_Idcheckio.framework */,
75
+ );
76
+ name = Frameworks;
77
+ sourceTree = "<group>";
78
+ };
79
+ C24317436459140030DC3E33 /* Pods */ = {
80
+ isa = PBXGroup;
81
+ children = (
82
+ 2D9DA34C574E3C400A2E0C09 /* Pods-Idcheckio.debug.xcconfig */,
83
+ 25309B92930C8F45ADEB2900 /* Pods-Idcheckio.release.xcconfig */,
84
+ );
85
+ path = Pods;
86
+ sourceTree = "<group>";
87
+ };
88
+ /* End PBXGroup section */
89
+
90
+ /* Begin PBXNativeTarget section */
91
+ 58B511DA1A9E6C8500147676 /* Idcheckio */ = {
92
+ isa = PBXNativeTarget;
93
+ buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "Idcheckio" */;
94
+ buildPhases = (
95
+ 6D54DE408E7D4DC2FBB4958B /* [CP] Check Pods Manifest.lock */,
96
+ 58B511D71A9E6C8500147676 /* Sources */,
97
+ 58B511D81A9E6C8500147676 /* Frameworks */,
98
+ 58B511D91A9E6C8500147676 /* CopyFiles */,
99
+ );
100
+ buildRules = (
101
+ );
102
+ dependencies = (
103
+ );
104
+ name = Idcheckio;
105
+ productName = RCTDataManager;
106
+ productReference = 134814201AA4EA6300B7C361 /* libIdcheckio.a */;
107
+ productType = "com.apple.product-type.library.static";
108
+ };
109
+ /* End PBXNativeTarget section */
110
+
111
+ /* Begin PBXProject section */
112
+ 58B511D31A9E6C8500147676 /* Project object */ = {
113
+ isa = PBXProject;
114
+ attributes = {
115
+ LastUpgradeCheck = 0920;
116
+ ORGANIZATIONNAME = Facebook;
117
+ TargetAttributes = {
118
+ 58B511DA1A9E6C8500147676 = {
119
+ CreatedOnToolsVersion = 6.1.1;
120
+ LastSwiftMigration = 1100;
121
+ };
122
+ };
123
+ };
124
+ buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "Idcheckio" */;
125
+ compatibilityVersion = "Xcode 3.2";
126
+ developmentRegion = English;
127
+ hasScannedForEncodings = 0;
128
+ knownRegions = (
129
+ English,
130
+ en,
131
+ );
132
+ mainGroup = 58B511D21A9E6C8500147676;
133
+ productRefGroup = 58B511D21A9E6C8500147676;
134
+ projectDirPath = "";
135
+ projectRoot = "";
136
+ targets = (
137
+ 58B511DA1A9E6C8500147676 /* Idcheckio */,
138
+ );
139
+ };
140
+ /* End PBXProject section */
141
+
142
+ /* Begin PBXShellScriptBuildPhase section */
143
+ 6D54DE408E7D4DC2FBB4958B /* [CP] Check Pods Manifest.lock */ = {
144
+ isa = PBXShellScriptBuildPhase;
145
+ buildActionMask = 2147483647;
146
+ files = (
147
+ );
148
+ inputFileListPaths = (
149
+ );
150
+ inputPaths = (
151
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
152
+ "${PODS_ROOT}/Manifest.lock",
153
+ );
154
+ name = "[CP] Check Pods Manifest.lock";
155
+ outputFileListPaths = (
156
+ );
157
+ outputPaths = (
158
+ "$(DERIVED_FILE_DIR)/Pods-Idcheckio-checkManifestLockResult.txt",
159
+ );
160
+ runOnlyForDeploymentPostprocessing = 0;
161
+ shellPath = /bin/sh;
162
+ 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";
163
+ showEnvVarsInLog = 0;
164
+ };
165
+ /* End PBXShellScriptBuildPhase section */
166
+
167
+ /* Begin PBXSourcesBuildPhase section */
168
+ 58B511D71A9E6C8500147676 /* Sources */ = {
169
+ isa = PBXSourcesBuildPhase;
170
+ buildActionMask = 2147483647;
171
+ files = (
172
+ 6800846C2384207F00AAC01F /* IdcheckioSdk+Utils.swift in Sources */,
173
+ B3E7B58A1CC2AC0600A0062D /* Idcheckio.m in Sources */,
174
+ );
175
+ runOnlyForDeploymentPostprocessing = 0;
176
+ };
177
+ /* End PBXSourcesBuildPhase section */
178
+
179
+ /* Begin XCBuildConfiguration section */
180
+ 58B511ED1A9E6C8500147676 /* Debug */ = {
181
+ isa = XCBuildConfiguration;
182
+ buildSettings = {
183
+ ALWAYS_SEARCH_USER_PATHS = NO;
184
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
185
+ CLANG_CXX_LIBRARY = "libc++";
186
+ CLANG_ENABLE_MODULES = YES;
187
+ CLANG_ENABLE_OBJC_ARC = YES;
188
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
189
+ CLANG_WARN_BOOL_CONVERSION = YES;
190
+ CLANG_WARN_COMMA = YES;
191
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
192
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
193
+ CLANG_WARN_EMPTY_BODY = YES;
194
+ CLANG_WARN_ENUM_CONVERSION = YES;
195
+ CLANG_WARN_INFINITE_RECURSION = YES;
196
+ CLANG_WARN_INT_CONVERSION = YES;
197
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
198
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
199
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
200
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
201
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
202
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
203
+ CLANG_WARN_UNREACHABLE_CODE = YES;
204
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
205
+ COPY_PHASE_STRIP = NO;
206
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
207
+ ENABLE_TESTABILITY = YES;
208
+ GCC_C_LANGUAGE_STANDARD = gnu99;
209
+ GCC_DYNAMIC_NO_PIC = NO;
210
+ GCC_NO_COMMON_BLOCKS = YES;
211
+ GCC_OPTIMIZATION_LEVEL = 0;
212
+ GCC_PREPROCESSOR_DEFINITIONS = (
213
+ "DEBUG=1",
214
+ "$(inherited)",
215
+ );
216
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
217
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
218
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
219
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
220
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
221
+ GCC_WARN_UNUSED_FUNCTION = YES;
222
+ GCC_WARN_UNUSED_VARIABLE = YES;
223
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
224
+ MTL_ENABLE_DEBUG_INFO = YES;
225
+ ONLY_ACTIVE_ARCH = YES;
226
+ SDKROOT = iphoneos;
227
+ };
228
+ name = Debug;
229
+ };
230
+ 58B511EE1A9E6C8500147676 /* Release */ = {
231
+ isa = XCBuildConfiguration;
232
+ buildSettings = {
233
+ ALWAYS_SEARCH_USER_PATHS = NO;
234
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
235
+ CLANG_CXX_LIBRARY = "libc++";
236
+ CLANG_ENABLE_MODULES = YES;
237
+ CLANG_ENABLE_OBJC_ARC = YES;
238
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
239
+ CLANG_WARN_BOOL_CONVERSION = YES;
240
+ CLANG_WARN_COMMA = YES;
241
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
242
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
243
+ CLANG_WARN_EMPTY_BODY = YES;
244
+ CLANG_WARN_ENUM_CONVERSION = YES;
245
+ CLANG_WARN_INFINITE_RECURSION = YES;
246
+ CLANG_WARN_INT_CONVERSION = YES;
247
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
248
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
249
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
250
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
251
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
252
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
253
+ CLANG_WARN_UNREACHABLE_CODE = YES;
254
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
255
+ COPY_PHASE_STRIP = YES;
256
+ ENABLE_NS_ASSERTIONS = NO;
257
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
258
+ GCC_C_LANGUAGE_STANDARD = gnu99;
259
+ GCC_NO_COMMON_BLOCKS = YES;
260
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
261
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
262
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
263
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
264
+ GCC_WARN_UNUSED_FUNCTION = YES;
265
+ GCC_WARN_UNUSED_VARIABLE = YES;
266
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
267
+ MTL_ENABLE_DEBUG_INFO = NO;
268
+ SDKROOT = iphoneos;
269
+ VALIDATE_PRODUCT = YES;
270
+ };
271
+ name = Release;
272
+ };
273
+ 58B511F01A9E6C8500147676 /* Debug */ = {
274
+ isa = XCBuildConfiguration;
275
+ baseConfigurationReference = 2D9DA34C574E3C400A2E0C09 /* Pods-Idcheckio.debug.xcconfig */;
276
+ buildSettings = {
277
+ CLANG_ENABLE_MODULES = YES;
278
+ HEADER_SEARCH_PATHS = (
279
+ "$(inherited)",
280
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
281
+ "$(SRCROOT)/../../../React/**",
282
+ "$(SRCROOT)/../../react-native/React/**",
283
+ );
284
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
285
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
286
+ OTHER_LDFLAGS = "-ObjC";
287
+ PRODUCT_NAME = Idcheckio;
288
+ SKIP_INSTALL = YES;
289
+ SWIFT_OBJC_BRIDGING_HEADER = "Idcheckio-Bridging-Header.h";
290
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
291
+ SWIFT_VERSION = 5.0;
292
+ };
293
+ name = Debug;
294
+ };
295
+ 58B511F11A9E6C8500147676 /* Release */ = {
296
+ isa = XCBuildConfiguration;
297
+ baseConfigurationReference = 25309B92930C8F45ADEB2900 /* Pods-Idcheckio.release.xcconfig */;
298
+ buildSettings = {
299
+ CLANG_ENABLE_MODULES = YES;
300
+ HEADER_SEARCH_PATHS = (
301
+ "$(inherited)",
302
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
303
+ "$(SRCROOT)/../../../React/**",
304
+ "$(SRCROOT)/../../react-native/React/**",
305
+ );
306
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
307
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
308
+ OTHER_LDFLAGS = "-ObjC";
309
+ PRODUCT_NAME = Idcheckio;
310
+ SKIP_INSTALL = YES;
311
+ SWIFT_OBJC_BRIDGING_HEADER = "Idcheckio-Bridging-Header.h";
312
+ SWIFT_VERSION = 5.0;
313
+ };
314
+ name = Release;
315
+ };
316
+ /* End XCBuildConfiguration section */
317
+
318
+ /* Begin XCConfigurationList section */
319
+ 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "Idcheckio" */ = {
320
+ isa = XCConfigurationList;
321
+ buildConfigurations = (
322
+ 58B511ED1A9E6C8500147676 /* Debug */,
323
+ 58B511EE1A9E6C8500147676 /* Release */,
324
+ );
325
+ defaultConfigurationIsVisible = 0;
326
+ defaultConfigurationName = Release;
327
+ };
328
+ 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "Idcheckio" */ = {
329
+ isa = XCConfigurationList;
330
+ buildConfigurations = (
331
+ 58B511F01A9E6C8500147676 /* Debug */,
332
+ 58B511F11A9E6C8500147676 /* Release */,
333
+ );
334
+ defaultConfigurationIsVisible = 0;
335
+ defaultConfigurationName = Release;
336
+ };
337
+ /* End XCConfigurationList section */
338
+ };
339
+ rootObject = 58B511D31A9E6C8500147676 /* Project object */;
340
+ }
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "group:Idcheckio.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,49 @@
1
+ //
2
+ // IdcheckioKeys.h
3
+ // Idcheckio
4
+ //
5
+ // Created by Matthieu Legendre on 19/09/2019.
6
+ // Copyright © 2019 Facebook. All rights reserved.
7
+ //
8
+ #ifndef IdcheckioKeys_h
9
+ #define IdcheckioKeys_h
10
+
11
+ /* Parameters key */
12
+ #define docTypeKey @"docType"
13
+ #define confirmationTypeKey @"confirmationType"
14
+ #define sideOneExtractionKey @"sideOneExtraction"
15
+ #define sideTwoExtractionKey @"sideTwoExtraction"
16
+ #define codelineKey @"codeline"
17
+ #define faceDetectionKey @"faceDetection"
18
+ #define scanBothSidesKey @"scanBothSides"
19
+ #define useHdKey @"useHd"
20
+ #define integrityCheckKey @"integrityCheck"
21
+ #define readEmrtdKey @"readEmrtd"
22
+ #define docLivenessKey @"docLiveness"
23
+ #define orientationKey @"orientation"
24
+ #define onlineConfigKey @"onlineConfig"
25
+ #define biometricConsentKey @"biometricConsent"
26
+ #define enableManualAnalysisKey @"enableManualAnalysis"
27
+ #define folderUidKey @"folderUid"
28
+ #define cisTypeKey @"cisType"
29
+ #define isReferenceDocumentKey @"isReferenceDocument"
30
+ #define themeKey @"theme"
31
+ #define primaryColorKey @"primaryColor"
32
+ #define foregroundColorKey @"foregroundColor"
33
+ #define backgroundColorKey @"backgroundColor"
34
+ #define borderColorKey @"borderColor"
35
+ #define textColorKey @"textColor"
36
+ #define titleColorKey @"titleColor"
37
+
38
+ /* Extra parameters key */
39
+ #define languageKey @"language"
40
+ #define manualButtonTimerKey @"manualButtonTimer"
41
+ #define maxPictureFilesizeKey @"maxPictureFilesize"
42
+ #define feedbackLevelKey @"feedbackLevel"
43
+ #define adjustCropKey @"adjustCrop"
44
+ #define confirmAbortKey @"confirmAbort"
45
+ #define sdkEnvironmentKey @"sdkEnvironment"
46
+ #define captureModeKey @"captureMode"
47
+
48
+
49
+ #endif /* Header_h */
@@ -0,0 +1,35 @@
1
+ //
2
+ // IdcheckioSdk+Utils.swift
3
+ //
4
+ // Created by Matthieu Legendre on 10/09/2019.
5
+ //
6
+
7
+ import Foundation
8
+ import IDCheckIOSDK
9
+
10
+ public class IdcheckioObjcUtil: NSObject {
11
+ @objc public static func resultToJSON(_ result: IdcheckioResult) -> String {
12
+ if let jsonData = try? JSONEncoder().encode(result) {
13
+ return String(data: jsonData, encoding: .utf8) ?? ""
14
+ } else {
15
+ return "{}"
16
+ }
17
+ }
18
+
19
+ @objc public static func getErrorJson(_ error: NSError) -> String {
20
+ if let jsonData = try? JSONEncoder().encode(error as! IdcheckioError) {
21
+ return String(data: jsonData, encoding: .utf8) ?? ""
22
+ } else {
23
+ return "{\"message\":\"Internal error.\",\"details\":\"INTERNAL_ERROR\",\"cause\":\"INTERNAL_ERROR\"}"
24
+ }
25
+ }
26
+
27
+ @objc public static func missingFolderUid() -> String {
28
+ let error = IdcheckioError.customerError(details: "MISSING_FOLDER_UID", message: "The ips folderUid is mandatory to start an ips session.", subcause: nil)
29
+ if let jsonData = try? JSONEncoder().encode(error) {
30
+ return String(data: jsonData, encoding: .utf8) ?? ""
31
+ } else {
32
+ return "{\"message\":\"Internal error.\",\"details\":\"INTERNAL_ERROR\",\"cause\":\"INTERNAL_ERROR\"}"
33
+ }
34
+ }
35
+ }
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@idnow/react-idcheckio",
3
+ "title": "IDCheckIO SDK ReactNative",
4
+ "version": "7.1.11",
5
+ "description": "React Native plugin for IDCheck.io Mobile SDK",
6
+ "main": "index.js",
7
+ "scripts": {
8
+ "test": "echo \"Error: no test specified\" && exit 1"
9
+ },
10
+ "keywords": [
11
+ "react-native"
12
+ ],
13
+ "author": "IDnow",
14
+ "license": "ISC",
15
+ "readmeFilename": "README.md",
16
+ "private": false,
17
+ "peerDependencies": {
18
+ "react": "17.0.1",
19
+ "react-native": ">=0.64.0"
20
+ },
21
+ "dependencies": {}
22
+ }
@@ -0,0 +1,89 @@
1
+ #!/bin/sh
2
+
3
+ # Steps to publish to npm:
4
+ # - Make sure to have npm installed
5
+ # - Execute this sh script from command line
6
+ # - In command prompt press enter when asked to continue login in browser
7
+ # - After successfully logged in from browser, the command prompt will continue with deploy
8
+ # - Another login might be asked in prompt; continue as mentioned in previous step
9
+
10
+ # Steps to create npm account
11
+ # - https://www.npmjs.com/signup
12
+ # - Ask for access in idnow
13
+
14
+ PACKAGE_VERSION=$(node -p -e "require('./package.json').version")
15
+
16
+ # Don't modify theses two variables!
17
+ current_android_version="7.1.10"
18
+ current_ios_version="7.1.9"
19
+
20
+ # Read version wanted from input
21
+ android_value=""
22
+ ios_value=""
23
+ common_version=""
24
+
25
+ # Function to extract and compare minor versions and update the common version to use for the package one
26
+ update_package_version() {
27
+ # Extract minor versions after the second dot
28
+ minor_version1=${1##*.}
29
+ minor_version2=${2##*.}
30
+
31
+ # Compare minor versions numerically
32
+ if [[ $minor_version1 -gt $minor_version2 ]]; then
33
+ common_version=$1
34
+ elif [[ $minor_version1 -lt $minor_version2 ]]; then
35
+ common_version=$2
36
+ else # idem
37
+ common_version=$1
38
+ fi
39
+ }
40
+
41
+ # Process parameters using getopts with clear option handling
42
+ while getopts ":a:i:" opt; do
43
+ case $opt in
44
+ a) android_value="$OPTARG" ;;
45
+ i) ios_value="$OPTARG" ;;
46
+ \?) echo "Invalid option: -$OPTARG" >&2; exit 1 ;;
47
+ esac
48
+ done
49
+
50
+ # Shift remaining arguments after options are processed
51
+ shift $((OPTIND - 1))
52
+
53
+ if [[ ! -n $android_value || ! -n $ios_value ]]; then
54
+ echo "[Usage]\n$0 -a (Android version ex: 8.0.0) -i (iOS version ex: 8.0.1)"
55
+ fi
56
+
57
+ # Validate parameter values (optional, adjust validation as needed)
58
+ if [[ -n "$android_value" && ! "$android_value" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
59
+ echo "Error: Invalid value for -android: '$android_value'" >&2
60
+ exit 1
61
+ fi
62
+
63
+ if [[ -n "$ios_value" && ! "$ios_value" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
64
+ echo "Error: Invalid value for -iOS: '$ios_value'" >&2
65
+ exit 1
66
+ fi
67
+
68
+ # Determine package version
69
+ if [[ -n "$android_value" && -n "$ios_value" ]]; then
70
+ update_package_version $android_value $ios_value
71
+ fi
72
+
73
+ # Update versions for IDC
74
+ sed -i '' "s/sdk:$current_android_version/sdk:$android_value/g" android/build.gradle
75
+ sed -i '' "s/~> $current_ios_version/~> $ios_value/g" ReactIdcheckio.podspec
76
+ sed -i '' "s/= \"$PACKAGE_VERSION/= \"$common_version/g" ReactIdcheckio.podspec
77
+ sed -i '' "s/current_android_version=\"$current_android_version/current_android_version=\"$android_value/g" release-public.sh
78
+ sed -i '' "s/current_ios_version=\"$current_ios_version/current_ios_version=\"$ios_value/g" release-public.sh
79
+
80
+ npm version "$common_version"
81
+
82
+ echo
83
+ echo "* * * * * * * Releasing $common_version public scoped package * * * * * * *"
84
+ echo
85
+
86
+ # Make sure current user is logged in under organization scope
87
+ npm login --registry=https://registry.npmjs.org --scope=@idnow
88
+ # Publish
89
+ npm publish --access public