shuftipro-onsite-mobilesdk 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # ShuftiPro React Native SDK
2
+
3
+ [React Native SDK](https://developers.shuftipro.com/docs/mobile/platforms/react-sdk)
@@ -0,0 +1,14 @@
1
+ README
2
+ ======
3
+
4
+ If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm:
5
+
6
+ 1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed
7
+ 2. Be sure to have a `local.properties` file in this folder that points to the Android SDK and NDK
8
+ ```
9
+ ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle
10
+ sdk.dir=/Users/{username}/Library/Android/sdk
11
+ ```
12
+ 3. Delete the `maven` folder
13
+ 4. Run `./gradlew installArchives`
14
+ 5. Verify that latest set of generated files is in the maven folder with the correct version number
@@ -0,0 +1,123 @@
1
+ // android/build.gradle
2
+
3
+ // based on:
4
+ //
5
+ // * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle
6
+ // original location:
7
+ // - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle
8
+ //
9
+ // * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle
10
+ // original location:
11
+ // - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
12
+
13
+ def DEFAULT_COMPILE_SDK_VERSION = 33
14
+ def DEFAULT_MIN_SDK_VERSION = 23
15
+ def DEFAULT_TARGET_SDK_VERSION = 33
16
+
17
+ def safeExtGet(prop, fallback) {
18
+ rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
19
+ }
20
+
21
+ apply plugin: 'com.android.library'
22
+ apply plugin: 'maven-publish'
23
+
24
+ buildscript {
25
+ // The Android Gradle plugin is only required when opening the android folder stand-alone.
26
+ // This avoids unnecessary downloads and potential conflicts when the library is included as a
27
+ // module dependency in an application project.
28
+ // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies
29
+ if (project == rootProject) {
30
+ repositories {
31
+ google()
32
+ mavenCentral()
33
+ }
34
+ dependencies {
35
+ classpath 'com.android.tools.build:gradle:4.1.3'
36
+ }
37
+ }
38
+ }
39
+
40
+ apply plugin: 'com.android.library'
41
+ apply plugin: 'maven-publish'
42
+
43
+ android {
44
+ compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
45
+ defaultConfig {
46
+ minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION)
47
+ targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION)
48
+ versionCode 1
49
+ versionName "1.0"
50
+ }
51
+ lintOptions {
52
+ abortOnError false
53
+ }
54
+
55
+ dataBinding {
56
+ enabled = true
57
+ }
58
+ }
59
+
60
+ repositories {
61
+ // ref: https://www.baeldung.com/maven-local-repository
62
+ // mavenLocal()
63
+
64
+ maven { url 'https://jitpack.io' }
65
+ maven {
66
+ // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
67
+ url "$rootDir/../node_modules/react-native/android"
68
+ }
69
+ maven {
70
+ // Android JSC is installed from npm
71
+ url "$rootDir/../node_modules/jsc-android/dist"
72
+ }
73
+ google()
74
+ mavenCentral()
75
+ }
76
+
77
+ dependencies {
78
+ //noinspection GradleDynamicVersion
79
+ implementation 'com.facebook.react:react-native:+' // From node_modules
80
+ implementation 'com.github.shuftipro:android-onsite-sdk:+'
81
+
82
+ }
83
+
84
+ def configureReactNativePom(def pom) {
85
+ def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text)
86
+
87
+
88
+ }
89
+
90
+ afterEvaluate { project ->
91
+ // some Gradle build hooks ref:
92
+ // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html
93
+ task androidJavadoc(type: Javadoc) {
94
+ source = android.sourceSets.main.java.srcDirs
95
+ classpath += files(android.bootClasspath)
96
+ include '**/*.java'
97
+ }
98
+
99
+ task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) {
100
+ classifier = 'javadoc'
101
+ from androidJavadoc.destinationDir
102
+ }
103
+
104
+ task androidSourcesJar(type: Jar) {
105
+ classifier = 'sources'
106
+ from android.sourceSets.main.java.srcDirs
107
+ include '**/*.java'
108
+ }
109
+
110
+ android.libraryVariants.all { variant ->
111
+ def name = variant.name.capitalize()
112
+ def javaCompileTask = variant.javaCompileProvider.get()
113
+
114
+ task "jar${name}"(type: Jar, dependsOn: javaCompileTask) {
115
+ from javaCompileTask.destinationDir
116
+ }
117
+ }
118
+
119
+ artifacts {
120
+ archives androidSourcesJar
121
+ archives androidJavadocJar
122
+ }
123
+ }
@@ -0,0 +1,4 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
+ package="com.shuftipro.plugins.reactnative">
3
+
4
+ </manifest>
@@ -0,0 +1,61 @@
1
+ package com.shuftipro.plugins.reactnative;
2
+
3
+ import androidx.annotation.Nullable;
4
+ import com.facebook.react.bridge.*;
5
+ import com.facebook.react.modules.core.*;
6
+ import org.jetbrains.annotations.*;
7
+ import com.sp.shuftipro_sdk.listener.ShuftiVerifyListener;
8
+ import com.sp.shuftipro_sdk.models.Shuftipro;
9
+
10
+ import java.util.HashMap;
11
+ import java.util.Map;
12
+
13
+ import android.util.Log;
14
+
15
+ import androidx.annotation.NonNull;
16
+
17
+ import org.json.JSONObject;
18
+
19
+ public class ShuftiproReactNativeModule extends ReactContextBaseJavaModule {
20
+
21
+ private final ReactApplicationContext reactContext;
22
+
23
+
24
+ private final static String LOG_TAG = "ShuftiproModule";
25
+
26
+ public ShuftiproReactNativeModule(@NonNull ReactApplicationContext reactContext) {
27
+ super(reactContext);
28
+ this.reactContext = reactContext;
29
+ }
30
+
31
+ @ReactMethod
32
+ public void testMethod() {
33
+ Log.d(LOG_TAG,LOG_TAG+ " testing++");
34
+ }
35
+
36
+ @ReactMethod
37
+ public void verify(String requestObject, String authObject, String configObject, Callback callback) {
38
+ try {
39
+ JSONObject requestJson = new JSONObject(requestObject);
40
+ JSONObject authJson = new JSONObject(authObject);
41
+ JSONObject configJson = new JSONObject(configObject);
42
+
43
+ Shuftipro.getInstance().shuftiproVerification(requestJson, authJson, configJson, getCurrentActivity(), new ShuftiVerifyListener() {
44
+ @Override
45
+ public void verificationStatus(@NonNull Map<String, ?> map) {
46
+ callback.invoke(new JSONObject(map).toString());
47
+ }
48
+ });
49
+
50
+ } catch (Exception e) {
51
+ e.printStackTrace();
52
+ }
53
+ }
54
+
55
+
56
+ @NonNull
57
+ @Override
58
+ public String getName() {
59
+ return "ShuftiproReactNativeModule";
60
+ }
61
+ }
@@ -0,0 +1,29 @@
1
+ package com.shuftipro.plugins.reactnative;
2
+
3
+ import androidx.annotation.NonNull;
4
+
5
+ import com.facebook.react.ReactPackage;
6
+ import com.facebook.react.bridge.JavaScriptModule;
7
+ import com.facebook.react.bridge.NativeModule;
8
+ import com.facebook.react.bridge.ReactApplicationContext;
9
+ import com.facebook.react.uimanager.ViewManager;
10
+
11
+ import java.util.ArrayList;
12
+ import java.util.Collections;
13
+ import java.util.List;
14
+
15
+ public class ShuftiproReactNativePackage implements ReactPackage {
16
+ @NonNull
17
+ @Override
18
+ public List<NativeModule> createNativeModules(@NonNull ReactApplicationContext reactContext) {
19
+ List<NativeModule> modules = new ArrayList<>();
20
+ modules.add(new ShuftiproReactNativeModule(reactContext));
21
+ return modules;
22
+ }
23
+
24
+ @NonNull
25
+ @Override
26
+ public List<ViewManager> createViewManagers(@NonNull ReactApplicationContext reactContext) {
27
+ return Collections.emptyList();
28
+ }
29
+ }
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+ import {NativeEventEmitter, NativeModules} from 'react-native';
2
+
3
+ const {ShuftiproReactNativeModule} = NativeModules;
4
+
5
+ export default ShuftiproReactNativeModule;
@@ -0,0 +1,6 @@
1
+ #import <React/RCTBridgeModule.h>
2
+ #import <React/RCTEventEmitter.h>
3
+
4
+ @interface MobilesdkModule : RCTEventEmitter <RCTBridgeModule>
5
+
6
+ @end
@@ -0,0 +1,99 @@
1
+ #import "MobilesdkModule.h"
2
+ #import <ShuftiPro/ShuftiPro-Swift.h>
3
+ #import <React/RCTLog.h>
4
+ #import <React/RCTUtils.h>
5
+
6
+ @implementation MobilesdkModule
7
+
8
+ RCT_EXPORT_MODULE(ShuftiproReactNativeModule)
9
+
10
+
11
+ RCT_EXPORT_METHOD(testMethod:(NSString *)name location:(NSString *)location)
12
+ {
13
+ ShuftiPro *shufti = [[ShuftiPro alloc] init];
14
+ RCTLogInfo(@"Pretending to create an event %@ at %@", [shufti getUniqueReference] , location);
15
+ }
16
+
17
+ RCT_EXPORT_METHOD(verify:(NSString *)request auth:(NSString *)auth config:(NSString *)config callback: (RCTResponseSenderBlock) callback)
18
+ {
19
+ ShuftiPro *shufti = [[ShuftiPro alloc] init];
20
+
21
+ // UIViewController *rootController =
22
+ // [UIApplication sharedApplication]delegate] window] rootViewController];
23
+ UIViewController* vc = RCTPresentedViewController();
24
+
25
+
26
+
27
+
28
+ // [shufti shuftiProVerificationWithRequestObject:requestObject authKeys:authKeys parentVC:vc configs:configs completion:^(NSDictionary *result) {
29
+ // NSLog(@"Verification succeeded. Result: %@", result);
30
+ //
31
+ // }];
32
+
33
+ NSLog(@"Call from OBjective C ");
34
+ NSLog(@"pasrsing string to json config %@", [self parseJSONString:config]);
35
+ NSLog(@"pasrsing string to json request %@", [self parseJSONString:request]);
36
+ NSLog(@"pasrsing string to json auth %@", [self parseJSONString:auth]);
37
+ [shufti shuftiProVerificationWithRequestObject:[self parseJSONString:request] authKeys:[self parseJSONString:auth] parentVC:vc configs:[self parseJSONString:config] completion:^(NSDictionary *result) {
38
+ NSLog(@"Verification completed. Result: %@", result);
39
+ NSString *response = [self convertToJSONString:result];
40
+
41
+ callback(@[response]);
42
+ }];
43
+
44
+
45
+ }
46
+
47
+
48
+ - (NSDictionary *)parseJSONString:(NSString *)jsonString {
49
+ NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
50
+
51
+ if (jsonData) {
52
+ NSError *error;
53
+ NSDictionary *jsonDictionary = [NSJSONSerialization JSONObjectWithData:jsonData options:kNilOptions error:&error];
54
+
55
+ if (error) {
56
+ NSLog(@"Error parsing JSON string: %@", error.localizedDescription);
57
+ }
58
+
59
+ return jsonDictionary;
60
+ }
61
+
62
+ return nil;
63
+ }
64
+
65
+ - (NSString *)convertToJSONString:(NSDictionary *)dictionary {
66
+ NSError *error;
67
+ NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dictionary options:NSJSONWritingPrettyPrinted error:&error];
68
+
69
+ if (error) {
70
+ NSLog(@"Error converting to JSON string: %@", error.localizedDescription);
71
+ return nil;
72
+ }
73
+
74
+ NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
75
+ return jsonString;
76
+ }
77
+
78
+
79
+ - (dispatch_queue_t)methodQueue
80
+ {
81
+ return dispatch_get_main_queue();
82
+ }
83
+
84
+ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(getName)
85
+ {
86
+ return [[UIDevice currentDevice] name];
87
+ }
88
+
89
+ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(getUniqueReference)
90
+ {
91
+ ShuftiPro *shufti = [[ShuftiPro alloc] init];
92
+ return [shufti getUniqueReference];
93
+ }
94
+
95
+ - (NSArray<NSString *> *)supportedEvents {
96
+ return @[@"verification.accepted", @"verification.declined", @"request.received", @"request.pending", @"request.unauthorized", @"request.invalid", @"request.timeout", @"permission.denied", @"verification.cancelled"];
97
+ }
98
+
99
+ @end
@@ -0,0 +1,281 @@
1
+ // !$*UTF8*$!
2
+ {
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 46;
7
+ objects = {
8
+
9
+ /* Begin PBXCopyFilesBuildPhase section */
10
+ 58B511D91A9E6C8500147676 /* CopyFiles */ = {
11
+ isa = PBXCopyFilesBuildPhase;
12
+ buildActionMask = 2147483647;
13
+ dstPath = "include/$(PRODUCT_NAME)";
14
+ dstSubfolderSpec = 16;
15
+ files = (
16
+ );
17
+ runOnlyForDeploymentPostprocessing = 0;
18
+ };
19
+ /* End PBXCopyFilesBuildPhase section */
20
+
21
+ /* Begin PBXFileReference section */
22
+ 134814201AA4EA6300B7C361 /* libMobilesdkModule.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMobilesdkModule.a; sourceTree = BUILT_PRODUCTS_DIR; };
23
+ /* End PBXFileReference section */
24
+
25
+ /* Begin PBXFrameworksBuildPhase section */
26
+ 58B511D81A9E6C8500147676 /* Frameworks */ = {
27
+ isa = PBXFrameworksBuildPhase;
28
+ buildActionMask = 2147483647;
29
+ files = (
30
+ );
31
+ runOnlyForDeploymentPostprocessing = 0;
32
+ };
33
+ /* End PBXFrameworksBuildPhase section */
34
+
35
+ /* Begin PBXGroup section */
36
+ 134814211AA4EA7D00B7C361 /* Products */ = {
37
+ isa = PBXGroup;
38
+ children = (
39
+ 134814201AA4EA6300B7C361 /* libMobilesdkModule.a */,
40
+ );
41
+ name = Products;
42
+ sourceTree = "<group>";
43
+ };
44
+ 58B511D21A9E6C8500147676 = {
45
+ isa = PBXGroup;
46
+ children = (
47
+ 134814211AA4EA7D00B7C361 /* Products */,
48
+ );
49
+ sourceTree = "<group>";
50
+ };
51
+ /* End PBXGroup section */
52
+
53
+ /* Begin PBXNativeTarget section */
54
+ 58B511DA1A9E6C8500147676 /* MobilesdkModule */ = {
55
+ isa = PBXNativeTarget;
56
+ buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "MobilesdkModule" */;
57
+ buildPhases = (
58
+ 58B511D71A9E6C8500147676 /* Sources */,
59
+ 58B511D81A9E6C8500147676 /* Frameworks */,
60
+ 58B511D91A9E6C8500147676 /* CopyFiles */,
61
+ );
62
+ buildRules = (
63
+ );
64
+ dependencies = (
65
+ );
66
+ name = MobilesdkModule;
67
+ productName = RCTDataManager;
68
+ productReference = 134814201AA4EA6300B7C361 /* libMobilesdkModule.a */;
69
+ productType = "com.apple.product-type.library.static";
70
+ };
71
+ /* End PBXNativeTarget section */
72
+
73
+ /* Begin PBXProject section */
74
+ 58B511D31A9E6C8500147676 /* Project object */ = {
75
+ isa = PBXProject;
76
+ attributes = {
77
+ LastUpgradeCheck = 0920;
78
+ ORGANIZATIONNAME = Facebook;
79
+ TargetAttributes = {
80
+ 58B511DA1A9E6C8500147676 = {
81
+ CreatedOnToolsVersion = 6.1.1;
82
+ };
83
+ };
84
+ };
85
+ buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "MobilesdkModule" */;
86
+ compatibilityVersion = "Xcode 3.2";
87
+ developmentRegion = en;
88
+ hasScannedForEncodings = 0;
89
+ knownRegions = (
90
+ en,
91
+ Base,
92
+ );
93
+ mainGroup = 58B511D21A9E6C8500147676;
94
+ productRefGroup = 58B511D21A9E6C8500147676;
95
+ projectDirPath = "";
96
+ projectRoot = "";
97
+ targets = (
98
+ 58B511DA1A9E6C8500147676 /* MobilesdkModule */,
99
+ );
100
+ };
101
+ /* End PBXProject section */
102
+
103
+ /* Begin PBXSourcesBuildPhase section */
104
+ 58B511D71A9E6C8500147676 /* Sources */ = {
105
+ isa = PBXSourcesBuildPhase;
106
+ buildActionMask = 2147483647;
107
+ files = (
108
+ );
109
+ runOnlyForDeploymentPostprocessing = 0;
110
+ };
111
+ /* End PBXSourcesBuildPhase section */
112
+
113
+ /* Begin XCBuildConfiguration section */
114
+ 58B511ED1A9E6C8500147676 /* Debug */ = {
115
+ isa = XCBuildConfiguration;
116
+ buildSettings = {
117
+ ALWAYS_SEARCH_USER_PATHS = NO;
118
+ CLANG_ANALYZER_NONNULL = YES;
119
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
120
+ CLANG_CXX_LIBRARY = "libc++";
121
+ CLANG_ENABLE_MODULES = YES;
122
+ CLANG_ENABLE_OBJC_ARC = YES;
123
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
124
+ CLANG_WARN_BOOL_CONVERSION = YES;
125
+ CLANG_WARN_COMMA = YES;
126
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
127
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
128
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
129
+ CLANG_WARN_EMPTY_BODY = YES;
130
+ CLANG_WARN_ENUM_CONVERSION = YES;
131
+ CLANG_WARN_INFINITE_RECURSION = YES;
132
+ CLANG_WARN_INT_CONVERSION = YES;
133
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
134
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
135
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
136
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
137
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
138
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
139
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
140
+ CLANG_WARN_UNREACHABLE_CODE = YES;
141
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
142
+ COPY_PHASE_STRIP = NO;
143
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
144
+ ENABLE_TESTABILITY = YES;
145
+ GCC_C_LANGUAGE_STANDARD = gnu99;
146
+ GCC_DYNAMIC_NO_PIC = NO;
147
+ GCC_NO_COMMON_BLOCKS = YES;
148
+ GCC_OPTIMIZATION_LEVEL = 0;
149
+ GCC_PREPROCESSOR_DEFINITIONS = (
150
+ "DEBUG=1",
151
+ "$(inherited)",
152
+ );
153
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
154
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
155
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
156
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
157
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
158
+ GCC_WARN_UNUSED_FUNCTION = YES;
159
+ GCC_WARN_UNUSED_VARIABLE = YES;
160
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
161
+ LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
162
+ LIBRARY_SEARCH_PATHS = (
163
+ "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
164
+ "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
165
+ "\"$(inherited)\"",
166
+ );
167
+ MTL_ENABLE_DEBUG_INFO = YES;
168
+ ONLY_ACTIVE_ARCH = YES;
169
+ SDKROOT = iphoneos;
170
+ };
171
+ name = Debug;
172
+ };
173
+ 58B511EE1A9E6C8500147676 /* Release */ = {
174
+ isa = XCBuildConfiguration;
175
+ buildSettings = {
176
+ ALWAYS_SEARCH_USER_PATHS = NO;
177
+ CLANG_ANALYZER_NONNULL = YES;
178
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
179
+ CLANG_CXX_LIBRARY = "libc++";
180
+ CLANG_ENABLE_MODULES = YES;
181
+ CLANG_ENABLE_OBJC_ARC = YES;
182
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
183
+ CLANG_WARN_BOOL_CONVERSION = YES;
184
+ CLANG_WARN_COMMA = YES;
185
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
186
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
187
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
188
+ CLANG_WARN_EMPTY_BODY = YES;
189
+ CLANG_WARN_ENUM_CONVERSION = YES;
190
+ CLANG_WARN_INFINITE_RECURSION = YES;
191
+ CLANG_WARN_INT_CONVERSION = YES;
192
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
193
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
194
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
195
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
196
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
197
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
198
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
199
+ CLANG_WARN_UNREACHABLE_CODE = YES;
200
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
201
+ COPY_PHASE_STRIP = YES;
202
+ ENABLE_NS_ASSERTIONS = NO;
203
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
204
+ GCC_C_LANGUAGE_STANDARD = gnu99;
205
+ GCC_NO_COMMON_BLOCKS = YES;
206
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
207
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
208
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
209
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
210
+ GCC_WARN_UNUSED_FUNCTION = YES;
211
+ GCC_WARN_UNUSED_VARIABLE = YES;
212
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
213
+ LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
214
+ LIBRARY_SEARCH_PATHS = (
215
+ "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
216
+ "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
217
+ "\"$(inherited)\"",
218
+ );
219
+ MTL_ENABLE_DEBUG_INFO = NO;
220
+ SDKROOT = iphoneos;
221
+ VALIDATE_PRODUCT = YES;
222
+ };
223
+ name = Release;
224
+ };
225
+ 58B511F01A9E6C8500147676 /* Debug */ = {
226
+ isa = XCBuildConfiguration;
227
+ buildSettings = {
228
+ HEADER_SEARCH_PATHS = (
229
+ "$(inherited)",
230
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
231
+ "$(SRCROOT)/../../../React/**",
232
+ "$(SRCROOT)/../../react-native/React/**",
233
+ );
234
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
235
+ OTHER_LDFLAGS = "-ObjC";
236
+ PRODUCT_NAME = MobilesdkModule;
237
+ SKIP_INSTALL = YES;
238
+ };
239
+ name = Debug;
240
+ };
241
+ 58B511F11A9E6C8500147676 /* Release */ = {
242
+ isa = XCBuildConfiguration;
243
+ buildSettings = {
244
+ HEADER_SEARCH_PATHS = (
245
+ "$(inherited)",
246
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
247
+ "$(SRCROOT)/../../../React/**",
248
+ "$(SRCROOT)/../../react-native/React/**",
249
+ );
250
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
251
+ OTHER_LDFLAGS = "-ObjC";
252
+ PRODUCT_NAME = MobilesdkModule;
253
+ SKIP_INSTALL = YES;
254
+ };
255
+ name = Release;
256
+ };
257
+ /* End XCBuildConfiguration section */
258
+
259
+ /* Begin XCConfigurationList section */
260
+ 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "MobilesdkModule" */ = {
261
+ isa = XCConfigurationList;
262
+ buildConfigurations = (
263
+ 58B511ED1A9E6C8500147676 /* Debug */,
264
+ 58B511EE1A9E6C8500147676 /* Release */,
265
+ );
266
+ defaultConfigurationIsVisible = 0;
267
+ defaultConfigurationName = Release;
268
+ };
269
+ 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "MobilesdkModule" */ = {
270
+ isa = XCConfigurationList;
271
+ buildConfigurations = (
272
+ 58B511F01A9E6C8500147676 /* Debug */,
273
+ 58B511F11A9E6C8500147676 /* Release */,
274
+ );
275
+ defaultConfigurationIsVisible = 0;
276
+ defaultConfigurationName = Release;
277
+ };
278
+ /* End XCConfigurationList section */
279
+ };
280
+ rootObject = 58B511D31A9E6C8500147676 /* Project object */;
281
+ }
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "group:MobilesdkModule.xcodeproj">
6
+ </FileRef>
7
+ </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>
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "shuftipro-onsite-mobilesdk",
3
+ "title": "React Native Mobilesdk Module",
4
+ "version": "0.0.1",
5
+ "description": "Shuftipro mobile SDK",
6
+ "main": "index.js",
7
+ "files": [
8
+ "README.md",
9
+ "android/src",
10
+ "android/build.gradle",
11
+ "index.js",
12
+ "ios",
13
+ "shuftipro-onsite-mobilesdk.podspec"
14
+ ],
15
+ "scripts": {
16
+
17
+ "android": "react-native run-android",
18
+
19
+ "ios": "react-native run-ios",
20
+
21
+ "lint": "eslint .",
22
+
23
+ "start": "react-native start",
24
+
25
+ "test": "jest"
26
+
27
+ },
28
+ "repository": {
29
+ "type": "git"
30
+ },
31
+ "keywords": [
32
+ "react-native",
33
+ "shuftipro",
34
+ "kyc",
35
+ "android",
36
+ "ios"
37
+ ],
38
+ "author": {
39
+ "name": "shuftipro",
40
+ "email": "support@shuftipro.com"
41
+ },
42
+ "license": "ShuftiPro",
43
+ "licenseFilename": "LICENSE",
44
+ "peerDependencies": {
45
+ "react-native": ">=0.60.0-rc.0 <1.0.x"
46
+ },
47
+ "devDependencies": {
48
+ "babel-eslint": "10.1.0",
49
+ "eslint": "7.12.1",
50
+ "eslint-plugin-react": "7.21.5",
51
+ "eslint-plugin-react-hooks": "4.2.0",
52
+ "eslint-plugin-react-native": "3.10.0",
53
+ "react-native": "0.63.3"
54
+ },
55
+ "prettier": {
56
+ "printWidth": 120
57
+ }
58
+ }
@@ -0,0 +1,22 @@
1
+ require "json"
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
+ sdk_version = "1.0.1"
5
+
6
+ Pod::Spec.new do |s|
7
+ s.name = "shuftipro-onsite-mobilesdk"
8
+ s.version = package["version"]
9
+ s.summary = package["title"]
10
+ s.description = package["description"]
11
+ s.homepage = "https://shuftipro.com"
12
+ s.license = "MIT"
13
+ s.authors = { "shuftipro" => "support@shuftipro.com" }
14
+ s.platforms = { :ios => "12.0" }
15
+ s.source = { :git => "https://github.com/shuftipro/ShuftiPro-Onsite" }
16
+
17
+ s.source_files = "ios/**/*.{h,c,m,swift}"
18
+ s.requires_arc = true
19
+
20
+ s.dependency "React-Core"
21
+ s.dependency "ShuftiPro-Onsite", "~> 1.0.1"
22
+ end