airbridge-react-native-sdk-restricted 4.1.4 → 4.1.6
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 +6 -1
- package/android/src/main/java/co/ab180/airbridge/reactnative/extension/JSONConvert.kt +1 -1
- package/android/src/main/java/co/ab180/airbridge/reactnative/module/AttributionInteractor.kt +3 -2
- package/android/src/main/java/co/ab180/airbridge/reactnative/module/DeeplinkInteractor.kt +3 -2
- package/android/src/main/java/co/ab180/airbridge/reactnative/module/FetchInteractor.kt +3 -2
- package/android/src/main/java/co/ab180/airbridge/reactnative/module/PlacementInteractor.kt +3 -2
- package/changelog.md +11 -0
- package/package.json +1 -1
- package/qa/ios/Podfile.lock +1 -1
- package/qa/package-lock.json +1964 -4487
package/android/build.gradle
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import groovy.json.JsonSlurper
|
|
2
|
+
import com.android.Version
|
|
2
3
|
|
|
3
4
|
apply plugin: 'com.android.library'
|
|
4
5
|
apply plugin: 'kotlin-android'
|
|
@@ -15,10 +16,14 @@ buildscript {
|
|
|
15
16
|
ext.safeExtGet("kotlinVersion", "1.5.31")
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
|
-
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
android {
|
|
22
|
+
def agpVersion = Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
|
|
23
|
+
if (agpVersion >= 7) {
|
|
24
|
+
namespace "co.ab180.airbridge.reactnative"
|
|
25
|
+
}
|
|
26
|
+
|
|
22
27
|
compileSdkVersion safeExtGet("compileSdkVersion", 34)
|
|
23
28
|
|
|
24
29
|
defaultConfig {
|
|
@@ -20,7 +20,7 @@ internal fun JSONObject.toMap(): Map<String, Any> {
|
|
|
20
20
|
|
|
21
21
|
internal fun JSONArray.toList(): List<Any> {
|
|
22
22
|
val list = LinkedList<Any>()
|
|
23
|
-
for (index in 0
|
|
23
|
+
for (index in 0 until length()) {
|
|
24
24
|
opt(index)?.also {
|
|
25
25
|
when (it) {
|
|
26
26
|
is JSONObject -> { list.add(it.toMap()) }
|
package/android/src/main/java/co/ab180/airbridge/reactnative/module/AttributionInteractor.kt
CHANGED
|
@@ -6,6 +6,7 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
|
6
6
|
import com.facebook.react.bridge.ReactMethod
|
|
7
7
|
import com.facebook.react.bridge.ReadableMap
|
|
8
8
|
import com.facebook.react.bridge.WritableNativeMap
|
|
9
|
+
import com.facebook.react.modules.core.DeviceEventManagerModule
|
|
9
10
|
import java.lang.ref.WeakReference
|
|
10
11
|
|
|
11
12
|
internal class AttributionInteractor(
|
|
@@ -26,14 +27,14 @@ internal class AttributionInteractor(
|
|
|
26
27
|
|
|
27
28
|
if (initialAttribution != null) {
|
|
28
29
|
weakThis.get()?.reactApplicationContext
|
|
29
|
-
?.getJSModule(
|
|
30
|
+
?.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
|
|
30
31
|
?.emit("airbridge.attribution", initialAttribution?.toReadableMap())
|
|
31
32
|
initialAttribution = null
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
onAttributionReceived = { attribution ->
|
|
35
36
|
weakThis.get()?.reactApplicationContext
|
|
36
|
-
?.getJSModule(
|
|
37
|
+
?.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
|
|
37
38
|
?.emit("airbridge.attribution", attribution.toReadableMap())
|
|
38
39
|
}
|
|
39
40
|
}
|
|
@@ -5,6 +5,7 @@ import com.facebook.react.bridge.ReactApplicationContext
|
|
|
5
5
|
import com.facebook.react.bridge.ReactContext
|
|
6
6
|
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
7
7
|
import com.facebook.react.bridge.ReactMethod
|
|
8
|
+
import com.facebook.react.modules.core.DeviceEventManagerModule
|
|
8
9
|
import java.lang.ref.WeakReference
|
|
9
10
|
|
|
10
11
|
internal class DeeplinkInteractor(
|
|
@@ -25,14 +26,14 @@ internal class DeeplinkInteractor(
|
|
|
25
26
|
|
|
26
27
|
if (initialDeeplink != null) {
|
|
27
28
|
weakThis.get()?.reactApplicationContext
|
|
28
|
-
?.getJSModule(
|
|
29
|
+
?.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
|
|
29
30
|
?.emit("airbridge.deeplink", initialDeeplink.toString())
|
|
30
31
|
initialDeeplink = null
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
onDeeplinkReceived = { deeplink ->
|
|
34
35
|
weakThis.get()?.reactApplicationContext
|
|
35
|
-
?.getJSModule(
|
|
36
|
+
?.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
|
|
36
37
|
?.emit("airbridge.deeplink", deeplink.toString())
|
|
37
38
|
}
|
|
38
39
|
}
|
|
@@ -7,6 +7,7 @@ import com.facebook.react.bridge.ReactContext
|
|
|
7
7
|
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
8
8
|
import com.facebook.react.bridge.ReactMethod
|
|
9
9
|
import com.facebook.react.bridge.WritableNativeMap
|
|
10
|
+
import com.facebook.react.modules.core.DeviceEventManagerModule
|
|
10
11
|
|
|
11
12
|
internal class FetchInteractor(
|
|
12
13
|
reactContext: ReactApplicationContext?
|
|
@@ -20,7 +21,7 @@ internal class FetchInteractor(
|
|
|
20
21
|
onFailure = { onFailure(it.message ?: "Unexplained failure") }
|
|
21
22
|
)
|
|
22
23
|
reactApplicationContext
|
|
23
|
-
?.getJSModule(
|
|
24
|
+
?.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
|
|
24
25
|
?.emit("airbridge.fetch", WritableNativeMap().apply {
|
|
25
26
|
putString("id", promiseID)
|
|
26
27
|
putString("type", "onResolve")
|
|
@@ -35,7 +36,7 @@ internal class FetchInteractor(
|
|
|
35
36
|
onFailure = { onFailure(it.message ?: "Unexplained failure") }
|
|
36
37
|
)
|
|
37
38
|
reactApplicationContext
|
|
38
|
-
?.getJSModule(
|
|
39
|
+
?.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
|
|
39
40
|
?.emit("airbridge.fetch", WritableNativeMap().apply {
|
|
40
41
|
putString("id", promiseID)
|
|
41
42
|
putString("type", "onResolve")
|
|
@@ -9,6 +9,7 @@ import com.facebook.react.bridge.ReactContext
|
|
|
9
9
|
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
10
10
|
import com.facebook.react.bridge.ReactMethod
|
|
11
11
|
import com.facebook.react.bridge.WritableNativeMap
|
|
12
|
+
import com.facebook.react.modules.core.DeviceEventManagerModule
|
|
12
13
|
|
|
13
14
|
internal class PlacementInteractor(
|
|
14
15
|
reactContext: ReactApplicationContext?
|
|
@@ -23,7 +24,7 @@ internal class PlacementInteractor(
|
|
|
23
24
|
onFailure = { onFailure(it.message ?: "Unexplained failure") }
|
|
24
25
|
)
|
|
25
26
|
reactApplicationContext
|
|
26
|
-
?.getJSModule(
|
|
27
|
+
?.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
|
|
27
28
|
?.emit("airbridge.placement", WritableNativeMap().apply {
|
|
28
29
|
putString("id", promiseID)
|
|
29
30
|
putString("type", "onResolve")
|
|
@@ -40,7 +41,7 @@ internal class PlacementInteractor(
|
|
|
40
41
|
onFailure = { onFailure(it.message ?: "Unexplained failure") }
|
|
41
42
|
)
|
|
42
43
|
reactApplicationContext
|
|
43
|
-
?.getJSModule(
|
|
44
|
+
?.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
|
|
44
45
|
?.emit("airbridge.placement", WritableNativeMap().apply {
|
|
45
46
|
putString("id", promiseID)
|
|
46
47
|
putString("type", "onResolve")
|
package/changelog.md
CHANGED
package/package.json
CHANGED