@screeb/react-native 0.8.12 → 0.8.15
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/android/build.gradle +2 -3
- package/android/gradle.properties +2 -2
- package/android/src/main/java/com/screebmodule/ScreebModuleModule.kt +32 -0
- package/ios/ScreebModule.m +4 -0
- package/ios/ScreebModule.swift +24 -0
- package/package.json +2 -2
- package/screeb-module.podspec +2 -2
- package/src/index.tsx +12 -0
package/android/build.gradle
CHANGED
|
@@ -8,7 +8,7 @@ buildscript {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
dependencies {
|
|
11
|
-
classpath 'com.android.tools.build:gradle:7.1
|
|
11
|
+
classpath 'com.android.tools.build:gradle:7.3.1'
|
|
12
12
|
// noinspection DifferentKotlinGradleVersion
|
|
13
13
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
14
14
|
}
|
|
@@ -32,7 +32,6 @@ android {
|
|
|
32
32
|
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
|
|
33
33
|
versionCode 1
|
|
34
34
|
versionName "0.2.0"
|
|
35
|
-
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
buildTypes {
|
|
@@ -124,6 +123,6 @@ def kotlin_version = getExtOrDefault('kotlinVersion')
|
|
|
124
123
|
dependencies {
|
|
125
124
|
// noinspection GradleDynamicVersion
|
|
126
125
|
api 'com.facebook.react:react-native:+'
|
|
127
|
-
implementation "app.screeb.sdk:survey:1.
|
|
126
|
+
implementation "app.screeb.sdk:survey:1.12.3"
|
|
128
127
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.7.0"
|
|
129
128
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
ScreebModule_kotlinVersion=1.6.0
|
|
2
|
-
ScreebModule_compileSdkVersion=
|
|
3
|
-
ScreebModule_targetSdkVersion=
|
|
2
|
+
ScreebModule_compileSdkVersion=33
|
|
3
|
+
ScreebModule_targetSdkVersion=33
|
|
@@ -115,6 +115,38 @@ class ScreebModuleModule(reactContext: ReactApplicationContext) :
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
+
@ReactMethod
|
|
119
|
+
fun debug(){
|
|
120
|
+
Log.d("ScreebModule","Called debug")
|
|
121
|
+
Handler(Looper.getMainLooper()).post {
|
|
122
|
+
Screeb.debug()
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@ReactMethod
|
|
127
|
+
fun debugTargeting(){
|
|
128
|
+
Log.d("ScreebModule","Called debugTargeting")
|
|
129
|
+
Handler(Looper.getMainLooper()).post {
|
|
130
|
+
Screeb.debugTargeting()
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@ReactMethod
|
|
135
|
+
fun resetIdentity(){
|
|
136
|
+
Log.d("ScreebModule","Called resetIdentity")
|
|
137
|
+
Handler(Looper.getMainLooper()).post {
|
|
138
|
+
Screeb.resetIdentity()
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@ReactMethod
|
|
143
|
+
fun closeSdk(){
|
|
144
|
+
Log.d("ScreebModule","Called closeSdk")
|
|
145
|
+
Handler(Looper.getMainLooper()).post {
|
|
146
|
+
Screeb.closeSdk()
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
118
150
|
companion object {
|
|
119
151
|
|
|
120
152
|
@JvmStatic
|
package/ios/ScreebModule.m
CHANGED
|
@@ -10,6 +10,10 @@ RCT_EXTERN_METHOD(unassignGroup:(NSString *)type name:(NSString *)name_ properti
|
|
|
10
10
|
RCT_EXTERN_METHOD(trackEvent:(NSString *)eventId properties:(NSDictionary<NSString *, id> *)properties_)
|
|
11
11
|
RCT_EXTERN_METHOD(trackScreen:(NSString *)screen properties:(NSDictionary<NSString *, id> *)properties_)
|
|
12
12
|
RCT_EXTERN_METHOD(startSurvey:(NSString *)surveyId allowMultipleResponses:(BOOL)allowMultipleResponses_ hiddenFields:(NSDictionary<NSString *, id> *)hiddenFields_)
|
|
13
|
+
RCT_EXTERN_METHOD(debug)
|
|
14
|
+
RCT_EXTERN_METHOD(debugTargeting)
|
|
15
|
+
RCT_EXTERN_METHOD(closeSdk)
|
|
16
|
+
RCT_EXTERN_METHOD(resetIdentity)
|
|
13
17
|
+ (BOOL)requiresMainQueueSetup
|
|
14
18
|
{
|
|
15
19
|
return YES;
|
package/ios/ScreebModule.swift
CHANGED
|
@@ -91,6 +91,30 @@ class ScreebModule: NSObject {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
@objc func debug(){
|
|
95
|
+
DispatchQueue.main.async {
|
|
96
|
+
Screeb.debug()
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@objc func debugTargeting(){
|
|
101
|
+
DispatchQueue.main.async {
|
|
102
|
+
Screeb.debugTargeting()
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@objc func resetIdentity(){
|
|
107
|
+
DispatchQueue.main.async {
|
|
108
|
+
Screeb.resetIdentity()
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@objc func closeSdk(){
|
|
113
|
+
DispatchQueue.main.async {
|
|
114
|
+
Screeb.closeSdk()
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
94
118
|
private func mapToAnyEncodable(map: [String: Any]) -> [String: AnyEncodable?] {
|
|
95
119
|
return map.mapValues{
|
|
96
120
|
value in
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@screeb/react-native",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.15",
|
|
4
4
|
"description": "A react-native module to integrate Screeb mobile sdk for Android and/or iOS.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
@@ -51,4 +51,4 @@
|
|
|
51
51
|
"react": "*",
|
|
52
52
|
"react-native": "*"
|
|
53
53
|
}
|
|
54
|
-
}
|
|
54
|
+
}
|
package/screeb-module.podspec
CHANGED
|
@@ -10,11 +10,11 @@ Pod::Spec.new do |s|
|
|
|
10
10
|
s.license = package["license"]
|
|
11
11
|
s.authors = package["author"]
|
|
12
12
|
|
|
13
|
-
s.platforms = { :ios => "12.
|
|
13
|
+
s.platforms = { :ios => "12.4" }
|
|
14
14
|
s.source = { :git => "https://github.com/ScreebApp/sdk-reactnative.git", :tag => "#{s.version}" }
|
|
15
15
|
|
|
16
16
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
17
17
|
|
|
18
18
|
s.dependency "React-Core"
|
|
19
|
-
s.dependency "Screeb", '~> 1.
|
|
19
|
+
s.dependency "Screeb", '~> 1.12.3'
|
|
20
20
|
end
|
package/src/index.tsx
CHANGED
|
@@ -49,3 +49,15 @@ export function trackScreen(name: string, properties?: Map<string, any>) {
|
|
|
49
49
|
export function startSurvey(surveyId: string, allowMultipleResponses?: boolean, hiddenFields?: Map<string, any>) {
|
|
50
50
|
return ScreebModule.startSurvey(surveyId, allowMultipleResponses ?? true, hiddenFields);
|
|
51
51
|
}
|
|
52
|
+
export function debug(){
|
|
53
|
+
return ScreebModule.debug();
|
|
54
|
+
}
|
|
55
|
+
export function debugTargeting(){
|
|
56
|
+
return ScreebModule.debugTargeting();
|
|
57
|
+
}
|
|
58
|
+
export function resetIdentity(){
|
|
59
|
+
return ScreebModule.resetIdentity();
|
|
60
|
+
}
|
|
61
|
+
export function closeSdk(){
|
|
62
|
+
return ScreebModule.closeSdk();
|
|
63
|
+
}
|