airbridge-react-native-sdk-restricted 4.1.0 → 4.1.2
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/.github/workflows/documentation.yml +3 -0
- package/airbridge_sdk.json +1 -1
- package/android/src/main/java/co/ab180/airbridge/reactnative/AirbridgeReactNative.kt +13 -1
- package/changelog.md +9 -0
- package/ios/AirbridgeReactNative/AirbridgeReactNative.swift +14 -2
- package/package.json +2 -2
- package/qa/airbridge_qa.json +1 -1
- package/qa/android/app/src/main/AndroidManifest.xml +23 -0
- package/qa/ios/AirbridgeQA/AirbridgeQA.entitlements +1 -0
- package/qa/ios/AirbridgeQA/Info.plist +8 -0
- package/qa/ios/InternalLibrary/airbridge-ios-sdk-qa-library.podspec +1 -1
- package/qa/ios/InternalLibrary/airbridge-ios-sdk-restricted.podspec +1 -1
- package/qa/ios/Podfile.lock +19 -11
- package/qa/package-lock.json +13 -2
- package/qa/package.json +1 -0
- package/qa/source/App.js +2 -1
- package/qa/source/common/QALog.js +12 -0
- package/script/ChangeProductionSDK.sh +3 -1
package/airbridge_sdk.json
CHANGED
|
@@ -31,6 +31,8 @@ class AirbridgeReactNative : ReactPackage {
|
|
|
31
31
|
companion object {
|
|
32
32
|
private var lifecycleIntegration: AirbridgeLifecycleIntegration? = null
|
|
33
33
|
|
|
34
|
+
private var isHandleAirbridgeDeeplinkOnly: Boolean = false
|
|
35
|
+
|
|
34
36
|
/**
|
|
35
37
|
* Initialize Airbridge SDK.
|
|
36
38
|
*
|
|
@@ -55,6 +57,8 @@ class AirbridgeReactNative : ReactPackage {
|
|
|
55
57
|
token: String,
|
|
56
58
|
airbridgeJSON: Map<String, Any>?
|
|
57
59
|
) {
|
|
60
|
+
setExtraOptions(airbridgeJSON)
|
|
61
|
+
|
|
58
62
|
Airbridge.initializeSDK(
|
|
59
63
|
app,
|
|
60
64
|
AirbridgeOptionBuilder(name, token)
|
|
@@ -87,7 +91,7 @@ class AirbridgeReactNative : ReactPackage {
|
|
|
87
91
|
onSuccess = { DeeplinkInteractor.onDeeplinkReceived(it) },
|
|
88
92
|
onFailure = { Log.d("AirbridgeReactNative", "Failure on Airbridge.handleDeeplink: error={${it.localizedMessage}}") }
|
|
89
93
|
)
|
|
90
|
-
if (handled) { return }
|
|
94
|
+
if (handled || isHandleAirbridgeDeeplinkOnly) { return }
|
|
91
95
|
intent.data?.also {
|
|
92
96
|
DeeplinkInteractor.onDeeplinkReceived(it)
|
|
93
97
|
}
|
|
@@ -106,6 +110,14 @@ class AirbridgeReactNative : ReactPackage {
|
|
|
106
110
|
fun setLifecycleIntegration(lifecycleIntegration: AirbridgeLifecycleIntegration) {
|
|
107
111
|
AirbridgeReactNative.lifecycleIntegration = lifecycleIntegration
|
|
108
112
|
}
|
|
113
|
+
|
|
114
|
+
private fun setExtraOptions(airbridgeJSON: Map<String, Any>?) {
|
|
115
|
+
val json = airbridgeJSON ?: return
|
|
116
|
+
|
|
117
|
+
(json["isHandleAirbridgeDeeplinkOnly"] as? Boolean)?.also {
|
|
118
|
+
isHandleAirbridgeDeeplinkOnly = it
|
|
119
|
+
}
|
|
120
|
+
}
|
|
109
121
|
}
|
|
110
122
|
|
|
111
123
|
override fun createNativeModules(
|
package/changelog.md
CHANGED
|
@@ -10,6 +10,9 @@ import Airbridge
|
|
|
10
10
|
|
|
11
11
|
@objc(AirbridgeReactNative_Swift)
|
|
12
12
|
public class AirbridgeReactNative: NSObject {
|
|
13
|
+
|
|
14
|
+
private static var isHandleAirbridgeDeeplinkOnly: Bool = false
|
|
15
|
+
|
|
13
16
|
/// Initialize Airbridge SDK.
|
|
14
17
|
/// - Parameter name: Name of Airbridge app that set on dashboard.
|
|
15
18
|
/// - Parameter token: App token of Airbridge app that displayed on dashboard.
|
|
@@ -31,6 +34,8 @@ public class AirbridgeReactNative: NSObject {
|
|
|
31
34
|
token: String,
|
|
32
35
|
airbridgeJSON: [AnyHashable: Any]?
|
|
33
36
|
) {
|
|
37
|
+
setExtraOptions(airbridgeJSON: airbridgeJSON)
|
|
38
|
+
|
|
34
39
|
Airbridge.initializeSDK(
|
|
35
40
|
option: AirbridgeOptionBuilder(name: name, token: token)
|
|
36
41
|
.setAirbridgeJSON(airbridgeJSON)
|
|
@@ -60,7 +65,7 @@ public class AirbridgeReactNative: NSObject {
|
|
|
60
65
|
} onFailure: { error in
|
|
61
66
|
Logger.debug("Failure on Airbridge.handleDeeplink: error={\(error.localizedDescription)}")
|
|
62
67
|
}
|
|
63
|
-
guard !handled else { return }
|
|
68
|
+
guard !(handled || isHandleAirbridgeDeeplinkOnly) else { return }
|
|
64
69
|
DeeplinkInteractor.onDeeplinkReceived(url)
|
|
65
70
|
}
|
|
66
71
|
|
|
@@ -74,9 +79,16 @@ public class AirbridgeReactNative: NSObject {
|
|
|
74
79
|
let handled = Airbridge.handleDeeplink(userActivity: userActivity) { url in
|
|
75
80
|
DeeplinkInteractor.onDeeplinkReceived(url)
|
|
76
81
|
}
|
|
77
|
-
guard !handled, let url = userActivity.webpageURL else { return }
|
|
82
|
+
guard !(handled || isHandleAirbridgeDeeplinkOnly), let url = userActivity.webpageURL else { return }
|
|
78
83
|
DeeplinkInteractor.onDeeplinkReceived(url)
|
|
79
84
|
}
|
|
85
|
+
|
|
86
|
+
private static func setExtraOptions(airbridgeJSON: [AnyHashable: Any]?) {
|
|
87
|
+
guard let airbridgeJSON else { return }
|
|
88
|
+
if let isHandleAirbridgeDeeplinkOnly = airbridgeJSON["isHandleAirbridgeDeeplinkOnly"] as? Bool {
|
|
89
|
+
AirbridgeReactNative.isHandleAirbridgeDeeplinkOnly = isHandleAirbridgeDeeplinkOnly
|
|
90
|
+
}
|
|
91
|
+
}
|
|
80
92
|
}
|
|
81
93
|
|
|
82
94
|
func loadAirbridgeJSON() -> [AnyHashable: Any]? {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "airbridge-react-native-sdk-restricted",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.2",
|
|
4
4
|
"description": "Airbridge SDK for React Native",
|
|
5
5
|
"main": "build/source/module.js",
|
|
6
6
|
"types": "build/source/module.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"prepublishOnly": "npm run build; npm run document",
|
|
14
14
|
"build": "tsc --project ./source/tsconfig.json",
|
|
15
15
|
"build:watch": "npm run build -- --watch",
|
|
16
|
-
"document": "typedoc source/module.ts --tsconfig ./source/tsconfig.json --disableSources --out build/document",
|
|
16
|
+
"document": "npx typedoc source/module.ts --tsconfig ./source/tsconfig.json --disableSources --out build/document",
|
|
17
17
|
"test": "jest --config ./test/jest.json"
|
|
18
18
|
},
|
|
19
19
|
"author": "ab180",
|
package/qa/airbridge_qa.json
CHANGED
|
@@ -42,6 +42,29 @@
|
|
|
42
42
|
|
|
43
43
|
<data android:scheme="qaabr" />
|
|
44
44
|
</intent-filter>
|
|
45
|
+
<intent-filter>
|
|
46
|
+
<!-- it is not airbridge link. for testing scheme -->
|
|
47
|
+
<action android:name="android.intent.action.VIEW" />
|
|
48
|
+
|
|
49
|
+
<category android:name="android.intent.category.DEFAULT" />
|
|
50
|
+
<category android:name="android.intent.category.BROWSABLE" />
|
|
51
|
+
|
|
52
|
+
<data android:scheme="other" />
|
|
53
|
+
</intent-filter>
|
|
54
|
+
<intent-filter android:autoVerify="true">
|
|
55
|
+
<!-- it is not airbridge link. for testing link -->
|
|
56
|
+
<action android:name="android.intent.action.VIEW" />
|
|
57
|
+
|
|
58
|
+
<category android:name="android.intent.category.DEFAULT" />
|
|
59
|
+
<category android:name="android.intent.category.BROWSABLE" />
|
|
60
|
+
|
|
61
|
+
<data
|
|
62
|
+
android:host="sdk-test.ab180.co"
|
|
63
|
+
android:scheme="http" />
|
|
64
|
+
<data
|
|
65
|
+
android:host="sdk-test.ab180.co"
|
|
66
|
+
android:scheme="https" />
|
|
67
|
+
</intent-filter>
|
|
45
68
|
<intent-filter android:autoVerify="true">
|
|
46
69
|
<action android:name="android.intent.action.VIEW" />
|
|
47
70
|
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
<string>applinks:qa.dev1.ab180.co</string>
|
|
20
20
|
<string>applinks:qa.dev2.ab180.co</string>
|
|
21
21
|
<string>applinks:xn--qa--bw8n.xn--ob0bx63e.com</string>
|
|
22
|
+
<string>applinks:sdk-test.ab180.co</string>
|
|
22
23
|
</array>
|
|
23
24
|
<key>com.apple.security.application-groups</key>
|
|
24
25
|
<array>
|
|
@@ -30,6 +30,14 @@
|
|
|
30
30
|
<string>qaabr</string>
|
|
31
31
|
</array>
|
|
32
32
|
</dict>
|
|
33
|
+
<dict>
|
|
34
|
+
<key>CFBundleTypeRole</key>
|
|
35
|
+
<string>None</string>
|
|
36
|
+
<key>CFBundleURLSchemes</key>
|
|
37
|
+
<array>
|
|
38
|
+
<string>other</string>
|
|
39
|
+
</array>
|
|
40
|
+
</dict>
|
|
33
41
|
</array>
|
|
34
42
|
<key>CFBundleVersion</key>
|
|
35
43
|
<string>$(CURRENT_PROJECT_VERSION)</string>
|
|
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
|
|
|
17
17
|
s.swift_version = '5.0'
|
|
18
18
|
|
|
19
19
|
s.source = {
|
|
20
|
-
:http => "https://sdk-internal.airbridge.io/build/#{airbridge_qa['intenral_library']['ios_version']}/AirbridgeQALibrary.zip"
|
|
20
|
+
:http => "https://sdk-internal.airbridge.io/build/airbridge-ios-sdk/#{airbridge_qa['intenral_library']['ios_version']}/AirbridgeQALibrary.zip"
|
|
21
21
|
}
|
|
22
22
|
s.preserve_paths = 'AirbridgeQALibrary'
|
|
23
23
|
s.source_files = 'AirbridgeQALibrary/.Source/AirbridgeQALibrary.swift'
|
|
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
|
|
|
17
17
|
s.swift_version = '5.0'
|
|
18
18
|
|
|
19
19
|
s.source = {
|
|
20
|
-
:http => "https://sdk-internal.airbridge.io/build/#{airbridge_qa['intenral_library']['ios_version']}/AirbridgeRestricted.zip"
|
|
20
|
+
:http => "https://sdk-internal.airbridge.io/build/airbridge-ios-sdk/#{airbridge_qa['intenral_library']['ios_version']}/AirbridgeRestricted.zip"
|
|
21
21
|
}
|
|
22
22
|
s.preserve_paths = 'Airbridge'
|
|
23
23
|
s.source_files = 'Airbridge/.Source/Airbridge.swift'
|
package/qa/ios/Podfile.lock
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
PODS:
|
|
2
|
-
- airbridge-ios-sdk (4.1.
|
|
3
|
-
- airbridge-ios-sdk-qa-library (4.1.
|
|
4
|
-
- airbridge-react-native-sdk (4.1.
|
|
5
|
-
- airbridge-ios-sdk (= 4.1.
|
|
2
|
+
- airbridge-ios-sdk (4.1.1)
|
|
3
|
+
- airbridge-ios-sdk-qa-library (4.1.1)
|
|
4
|
+
- airbridge-react-native-sdk (4.1.2):
|
|
5
|
+
- airbridge-ios-sdk (= 4.1.1)
|
|
6
6
|
- React
|
|
7
7
|
- boost (1.84.0)
|
|
8
8
|
- DoubleConversion (1.1.6)
|
|
@@ -1323,6 +1323,8 @@ PODS:
|
|
|
1323
1323
|
- ReactCommon/turbomodule/bridging
|
|
1324
1324
|
- ReactCommon/turbomodule/core
|
|
1325
1325
|
- Yoga
|
|
1326
|
+
- react-native-native-log (0.1.3):
|
|
1327
|
+
- React
|
|
1326
1328
|
- react-native-safe-area-context (4.10.9):
|
|
1327
1329
|
- React-Core
|
|
1328
1330
|
- react-native-simple-toast (3.3.1):
|
|
@@ -1667,7 +1669,8 @@ PODS:
|
|
|
1667
1669
|
- Yoga (0.0.0)
|
|
1668
1670
|
|
|
1669
1671
|
DEPENDENCIES:
|
|
1670
|
-
- airbridge-ios-sdk
|
|
1672
|
+
- airbridge-ios-sdk (from `InternalLibrary/airbridge-ios-sdk.podspec`)
|
|
1673
|
+
- airbridge-ios-sdk-qa-library (from `InternalLibrary/airbridge-ios-sdk-qa-library.podspec`)
|
|
1671
1674
|
- airbridge-react-native-sdk (from `../node_modules/airbridge-react-native-sdk`)
|
|
1672
1675
|
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
|
|
1673
1676
|
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
|
|
@@ -1708,6 +1711,7 @@ DEPENDENCIES:
|
|
|
1708
1711
|
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
|
|
1709
1712
|
- React-Mapbuffer (from `../node_modules/react-native/ReactCommon`)
|
|
1710
1713
|
- React-microtasksnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/microtasks`)
|
|
1714
|
+
- react-native-native-log (from `../node_modules/react-native-native-log`)
|
|
1711
1715
|
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
|
|
1712
1716
|
- react-native-simple-toast (from `../node_modules/react-native-simple-toast`)
|
|
1713
1717
|
- react-native-webview (from `../node_modules/react-native-webview`)
|
|
@@ -1746,7 +1750,6 @@ DEPENDENCIES:
|
|
|
1746
1750
|
|
|
1747
1751
|
SPEC REPOS:
|
|
1748
1752
|
trunk:
|
|
1749
|
-
- airbridge-ios-sdk
|
|
1750
1753
|
- Firebase
|
|
1751
1754
|
- FirebaseCore
|
|
1752
1755
|
- FirebaseCoreExtension
|
|
@@ -1761,8 +1764,10 @@ SPEC REPOS:
|
|
|
1761
1764
|
- Toast
|
|
1762
1765
|
|
|
1763
1766
|
EXTERNAL SOURCES:
|
|
1767
|
+
airbridge-ios-sdk:
|
|
1768
|
+
:podspec: InternalLibrary/airbridge-ios-sdk.podspec
|
|
1764
1769
|
airbridge-ios-sdk-qa-library:
|
|
1765
|
-
:podspec:
|
|
1770
|
+
:podspec: InternalLibrary/airbridge-ios-sdk-qa-library.podspec
|
|
1766
1771
|
airbridge-react-native-sdk:
|
|
1767
1772
|
:path: "../node_modules/airbridge-react-native-sdk"
|
|
1768
1773
|
boost:
|
|
@@ -1836,6 +1841,8 @@ EXTERNAL SOURCES:
|
|
|
1836
1841
|
:path: "../node_modules/react-native/ReactCommon"
|
|
1837
1842
|
React-microtasksnativemodule:
|
|
1838
1843
|
:path: "../node_modules/react-native/ReactCommon/react/nativemodule/microtasks"
|
|
1844
|
+
react-native-native-log:
|
|
1845
|
+
:path: "../node_modules/react-native-native-log"
|
|
1839
1846
|
react-native-safe-area-context:
|
|
1840
1847
|
:path: "../node_modules/react-native-safe-area-context"
|
|
1841
1848
|
react-native-simple-toast:
|
|
@@ -1908,9 +1915,9 @@ EXTERNAL SOURCES:
|
|
|
1908
1915
|
:path: "../node_modules/react-native/ReactCommon/yoga"
|
|
1909
1916
|
|
|
1910
1917
|
SPEC CHECKSUMS:
|
|
1911
|
-
airbridge-ios-sdk:
|
|
1912
|
-
airbridge-ios-sdk-qa-library:
|
|
1913
|
-
airbridge-react-native-sdk:
|
|
1918
|
+
airbridge-ios-sdk: 15ace7850c2afd3cd5e581c435e1ebc711f07e9b
|
|
1919
|
+
airbridge-ios-sdk-qa-library: 250f5e5329b11ee06b1ae69b050d9152a2656f7a
|
|
1920
|
+
airbridge-react-native-sdk: 0b26fbd5d93268d3bec6b977e97b97a98c5ac540
|
|
1914
1921
|
boost: 4cb898d0bf20404aab1850c656dcea009429d6c1
|
|
1915
1922
|
DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5
|
|
1916
1923
|
FBLazyVector: a3071c12f1650bfa84f2815e9982426256a0aae1
|
|
@@ -1956,6 +1963,7 @@ SPEC CHECKSUMS:
|
|
|
1956
1963
|
React-logger: 0a81d1a40650bbdafb255fe4616edb83feed0ee9
|
|
1957
1964
|
React-Mapbuffer: b758bec0d9994c10a2841dfd5ec70673665fd3e2
|
|
1958
1965
|
React-microtasksnativemodule: f25dba9c8c3f8be0b3368d52b99abd6e381dee1d
|
|
1966
|
+
react-native-native-log: bd883a7b018c0cdd9d23bc806a074bc067cfb7a9
|
|
1959
1967
|
react-native-safe-area-context: ab8f4a3d8180913bd78ae75dd599c94cce3d5e9a
|
|
1960
1968
|
react-native-simple-toast: 1f1cc551d419bc0ab05dcb0136554006c274789d
|
|
1961
1969
|
react-native-webview: 8d898b88c0bc3f90f232882d0aef9ef29c1b9160
|
|
@@ -1996,4 +2004,4 @@ SPEC CHECKSUMS:
|
|
|
1996
2004
|
|
|
1997
2005
|
PODFILE CHECKSUM: 2b544c256d0818052e2175afac7b026f5c3e9567
|
|
1998
2006
|
|
|
1999
|
-
COCOAPODS: 1.
|
|
2007
|
+
COCOAPODS: 1.16.2
|
package/qa/package-lock.json
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"react": "18.3.1",
|
|
16
16
|
"react-native": "0.75.1",
|
|
17
17
|
"react-native-gesture-handler": "^2.18.0",
|
|
18
|
+
"react-native-native-log": "^0.1.3",
|
|
18
19
|
"react-native-safe-area-context": "^4.10.8",
|
|
19
20
|
"react-native-screens": "^3.33.0",
|
|
20
21
|
"react-native-simple-toast": "^3.3.1",
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
}
|
|
43
44
|
},
|
|
44
45
|
"..": {
|
|
45
|
-
"version": "4.1.
|
|
46
|
+
"version": "4.1.2",
|
|
46
47
|
"license": "MIT",
|
|
47
48
|
"devDependencies": {
|
|
48
49
|
"@types/jest": "^29.5.12",
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
"jest": "29.7.0",
|
|
51
52
|
"react": "^18.3.1",
|
|
52
53
|
"react-native": "^0.75.1",
|
|
53
|
-
"typedoc": "^0.26.
|
|
54
|
+
"typedoc": "^0.26.8",
|
|
54
55
|
"typescript": "^5.5.4"
|
|
55
56
|
},
|
|
56
57
|
"peerDependencies": {
|
|
@@ -14067,6 +14068,16 @@
|
|
|
14067
14068
|
"react-native": "*"
|
|
14068
14069
|
}
|
|
14069
14070
|
},
|
|
14071
|
+
"node_modules/react-native-native-log": {
|
|
14072
|
+
"version": "0.1.3",
|
|
14073
|
+
"resolved": "https://registry.npmjs.org/react-native-native-log/-/react-native-native-log-0.1.3.tgz",
|
|
14074
|
+
"integrity": "sha512-8ZX1x4BkTViTKFSJfzd/AlWBHrF7GHCYQVl8VT/1wpsPsg6OL+yJ3ID6MmeLUkJj3VVeMWX7pJPQt28rZBE8oA==",
|
|
14075
|
+
"license": "MIT",
|
|
14076
|
+
"peerDependencies": {
|
|
14077
|
+
"react": "*",
|
|
14078
|
+
"react-native": "*"
|
|
14079
|
+
}
|
|
14080
|
+
},
|
|
14070
14081
|
"node_modules/react-native-safe-area-context": {
|
|
14071
14082
|
"version": "4.10.9",
|
|
14072
14083
|
"resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-4.10.9.tgz",
|
package/qa/package.json
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"react": "18.3.1",
|
|
19
19
|
"react-native": "0.75.1",
|
|
20
20
|
"react-native-gesture-handler": "^2.18.0",
|
|
21
|
+
"react-native-native-log": "^0.1.3",
|
|
21
22
|
"react-native-safe-area-context": "^4.10.8",
|
|
22
23
|
"react-native-screens": "^3.33.0",
|
|
23
24
|
"react-native-simple-toast": "^3.3.1",
|
package/qa/source/App.js
CHANGED
|
@@ -8,6 +8,7 @@ import StackNavigation from './navigations/Stack'
|
|
|
8
8
|
import { Airbridge } from 'airbridge-react-native-sdk'
|
|
9
9
|
|
|
10
10
|
import MessageDialog from './component/MessageDialog'
|
|
11
|
+
import { qaLog } from './common/QALog'
|
|
11
12
|
|
|
12
13
|
export default function App() {
|
|
13
14
|
|
|
@@ -37,7 +38,7 @@ export default function App() {
|
|
|
37
38
|
})
|
|
38
39
|
|
|
39
40
|
Airbridge.setOnDeeplinkReceived((result) => {
|
|
40
|
-
|
|
41
|
+
qaLog(`[DeepLink] ${result}`)
|
|
41
42
|
setDeeplink(result)
|
|
42
43
|
deeplinkRef.current?.show()
|
|
43
44
|
})
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Platform } from 'react-native'
|
|
2
|
+
import NativeLog from "react-native-native-log";
|
|
3
|
+
|
|
4
|
+
export const qaLog = (message) => {
|
|
5
|
+
if (Platform.OS === 'ios') {
|
|
6
|
+
NativeLog.logWithTag('AirbridgeQA', message)
|
|
7
|
+
} else if (Platform.OS === 'android') {
|
|
8
|
+
NativeLog.logWithTag('Airbridge', message)
|
|
9
|
+
} else {
|
|
10
|
+
console.log(message)
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -10,7 +10,9 @@ ROOT_DIRECTORY="$(readlink -f "$(dirname "$0")/..")"
|
|
|
10
10
|
|
|
11
11
|
# apply PRODUCTION_VERSION
|
|
12
12
|
if ! [[ -z $PRODUCTION_VERSION ]]; then
|
|
13
|
-
perl -i -pe "s/(\"version\").*[^,\\n](,?)/\$1: $PRODUCTION_VERSION\$2/g" "$ROOT_DIRECTORY/package.json"
|
|
13
|
+
perl -i -pe "s/(\"version\").*[^,\\n](,?)/\$1: \"$PRODUCTION_VERSION\"\$2/g" "$ROOT_DIRECTORY/package.json"
|
|
14
|
+
perl -i -pe "s/(?<=\"name\": \"airbridge-react-native-sdk\",\n\s*\"version\": \")([^\"]+)/$PRODUCTION_VERSION/" "$ROOT_DIRECTORY/package-lock.json"
|
|
15
|
+
|
|
14
16
|
cat changelog.md | grep '## Unreleased' && (
|
|
15
17
|
echo 'error: if Unreleased is exist on CHANGELOG.md change version is not working'
|
|
16
18
|
)
|