facia-mobilesdk 0.4.6 → 0.4.8
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
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
# Welcome to Facia React
|
|
2
|
-
|
|
3
|
-
Please note that this is the core plugin for React Native. For the comprehensive integration guide, please visit **[React Native Integration Guide](https://developers.facia.ai/platforms/react-sdk)**
|
|
1
|
+
# Welcome to Facia React Natice Plugin
|
|
2
|
+
Please note that this is the core plugin for React Native. For the comprehensive integration guide, please visit **[React Native Integration Guide](https://developers.facia.ai/mobile/sdks/platforms/react-sdk)**
|
package/android/build.gradle
CHANGED
|
@@ -32,7 +32,7 @@ buildscript {
|
|
|
32
32
|
mavenCentral()
|
|
33
33
|
}
|
|
34
34
|
dependencies {
|
|
35
|
-
classpath 'com.android.tools.build:gradle:
|
|
35
|
+
classpath 'com.android.tools.build:gradle:8.2.1'
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -73,7 +73,7 @@ repositories {
|
|
|
73
73
|
dependencies {
|
|
74
74
|
//noinspection GradleDynamicVersion
|
|
75
75
|
implementation 'com.facebook.react:react-native:+'
|
|
76
|
-
implementation 'com.github.FaciaMobile:android-core:
|
|
76
|
+
implementation 'com.github.FaciaMobile:android-core:2.0.4' // From node_modules
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
def configureReactNativePom(def pom) {
|
|
@@ -92,15 +92,26 @@ afterEvaluate { project ->
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
archiveClassifier.set('javadoc')
|
|
96
|
+
from androidJavadoc.destinationDir
|
|
97
|
+
}
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
99
|
+
task androidSourcesJar(type: Jar) {
|
|
100
|
+
archiveClassifier.set('sources')
|
|
101
|
+
from android.sourceSets.main.java.srcDirs
|
|
102
|
+
include '**/*.java'
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) {
|
|
106
|
+
// classifier = 'javadoc'
|
|
107
|
+
// from androidJavadoc.destinationDir
|
|
108
|
+
// }
|
|
109
|
+
|
|
110
|
+
// task androidSourcesJar(type: Jar) {
|
|
111
|
+
// classifier = 'sources'
|
|
112
|
+
// from android.sourceSets.main.java.srcDirs
|
|
113
|
+
// include '**/*.java'
|
|
114
|
+
// }
|
|
104
115
|
|
|
105
116
|
android.libraryVariants.all { variant ->
|
|
106
117
|
def name = variant.name.capitalize()
|
|
@@ -40,8 +40,7 @@ public class FaciaReactNativeModule extends ReactContextBaseJavaModule {
|
|
|
40
40
|
JSONObject configJson = new JSONObject(configObject);
|
|
41
41
|
|
|
42
42
|
FaciaAi faciaAi = new FaciaAi();
|
|
43
|
-
|
|
44
|
-
configJson.put("appInfo", "react-native 0.4.6");
|
|
43
|
+
|
|
45
44
|
faciaAi.createRequest(token,getCurrentActivity(), configJson, responseSet -> {
|
|
46
45
|
|
|
47
46
|
callback.invoke(new JSONObject(responseSet).toString());
|
package/facia-mobilesdk.podspec
CHANGED
package/ios/MobilesdkModule.m
CHANGED
|
@@ -18,18 +18,15 @@ RCT_EXPORT_METHOD(testMethod:(NSString *)name location:(NSString *)location)
|
|
|
18
18
|
// RCT_EXPORT_METHOD(verify:(NSString *)request auth:(NSString *)auth config:(NSString *)config callback: (RCTResponseSenderBlock) callback)
|
|
19
19
|
RCT_EXPORT_METHOD(verify:(NSString *)token config:(NSString *)config callback: (RCTResponseSenderBlock) callback)
|
|
20
20
|
{
|
|
21
|
-
Facia *facia = [[Facia alloc] init];
|
|
22
21
|
|
|
23
|
-
UIViewController* vc = RCTPresentedViewController();
|
|
24
|
-
NSMutableDictionary *modifiedConfig = [[self parseJSONString:config] mutableCopy];
|
|
25
|
-
|
|
26
|
-
modifiedConfig[@"platform"] = @"react-native-0.4.6";
|
|
27
|
-
modifiedConfig[@"appInfo"] = @"react-native 0.4.6";
|
|
28
22
|
|
|
23
|
+
Facia *facia = [[Facia alloc] init];
|
|
24
|
+
|
|
25
|
+
UIViewController* vc = RCTPresentedViewController();
|
|
29
26
|
__block RCTResponseSenderBlock originalCallback = [callback copy];
|
|
30
27
|
[facia createRequestWithParentViewController:vc
|
|
31
28
|
accessToken:token
|
|
32
|
-
configs:
|
|
29
|
+
configs:[self parseJSONString:config]
|
|
33
30
|
completion:^(NSDictionary *result) {
|
|
34
31
|
|
|
35
32
|
NSString *response = [self convertToJSONString:result];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "facia-mobilesdk",
|
|
3
3
|
"title": "React Native Mobilesdk Module",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.8",
|
|
5
5
|
"description": "Facia mobile SDK",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"files": [
|
|
@@ -12,19 +12,13 @@
|
|
|
12
12
|
"ios",
|
|
13
13
|
"facia-mobilesdk.podspec"
|
|
14
14
|
],
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"start": "react-native start",
|
|
24
|
-
|
|
25
|
-
"test": "jest"
|
|
26
|
-
|
|
27
|
-
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"android": "react-native run-android",
|
|
17
|
+
"ios": "react-native run-ios",
|
|
18
|
+
"lint": "eslint .",
|
|
19
|
+
"start": "react-native start",
|
|
20
|
+
"test": "jest"
|
|
21
|
+
},
|
|
28
22
|
"repository": {
|
|
29
23
|
"type": "git"
|
|
30
24
|
},
|
|
@@ -55,4 +49,4 @@
|
|
|
55
49
|
"prettier": {
|
|
56
50
|
"printWidth": 120
|
|
57
51
|
}
|
|
58
|
-
}
|
|
52
|
+
}
|