airbridge-react-native-sdk-restricted 4.1.0 → 4.1.3

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.
@@ -24,9 +24,10 @@ env:
24
24
 
25
25
  jobs:
26
26
  documentation:
27
- if: |
28
- ${{ github.event.workflow_run.conclusion == 'success' }} ||
29
- ${{ github.event.inputs.latest != null }}
27
+ if: ${{
28
+ github.event.workflow_run.conclusion == 'success'
29
+ || github.event.inputs.latest != null
30
+ }}
30
31
 
31
32
  runs-on: ubuntu-latest
32
33
 
@@ -38,6 +39,9 @@ jobs:
38
39
  - name: clone repository
39
40
  uses: actions/checkout@v3
40
41
 
42
+ - name: Install dependencies
43
+ run: npm ci
44
+
41
45
  - name: documentation
42
46
  run: |
43
47
  sh script/BuildDocument.sh
@@ -1,4 +1,4 @@
1
1
  {
2
- "ios_version": "4.1.0",
2
+ "ios_version": "4.1.2",
3
3
  "android_version": "4.1.0"
4
4
  }
@@ -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(
@@ -23,9 +23,9 @@ internal fun JSONArray.toList(): List<Any> {
23
23
  for (index in 0..<length()) {
24
24
  opt(index)?.also {
25
25
  when (it) {
26
- is JSONObject -> { list[index] = it.toMap() }
27
- is JSONArray -> { list[index] = it.toList() }
28
- else -> { list[index] = it }
26
+ is JSONObject -> { list.add(it.toMap()) }
27
+ is JSONArray -> { list.add(it.toList()) }
28
+ else -> { list.add(it) }
29
29
  }
30
30
  }
31
31
  }
package/changelog.md CHANGED
@@ -1,3 +1,20 @@
1
+ ## 4.1.3
2
+
3
+ **FIXED**
4
+ * Fix occur error when calling certain methods from Meta.
5
+
6
+ **CHANGED**
7
+ * Update `Airbridge iOS SDK` to 4.1.2
8
+
9
+ ## 4.1.2
10
+
11
+ **ADDED**
12
+
13
+ Add isHandleAirbridgeDeeplinkOnly option
14
+
15
+ **CHANGED**
16
+ * Update `Airbridge iOS SDK` to 4.1.1
17
+
1
18
  ## 4.1.0
2
19
 
3
20
  **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.0",
3
+ "version": "4.1.3",
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",
@@ -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 CHANGED
@@ -25,6 +25,7 @@ target 'AirbridgeQA' do
25
25
  config = use_native_modules!
26
26
 
27
27
  pod 'FirebaseCore', :modular_headers => true
28
+ pod 'FBSDKCoreKit'
28
29
  pod 'GoogleUtilities', :modular_headers => true
29
30
  if airbridge_qa['intenral_library']['ios_version'].nil?
30
31
  pod 'airbridge-ios-sdk-qa-library', :podspec => 'Library/airbridge-ios-sdk-qa-library.podspec'
@@ -1,12 +1,18 @@
1
1
  PODS:
2
- - airbridge-ios-sdk (4.1.0)
3
- - airbridge-ios-sdk-qa-library (4.1.0)
4
- - airbridge-react-native-sdk (4.1.0):
5
- - airbridge-ios-sdk (= 4.1.0)
2
+ - airbridge-ios-sdk (4.1.2)
3
+ - airbridge-ios-sdk-qa-library (4.1.2)
4
+ - airbridge-react-native-sdk (4.1.3):
5
+ - airbridge-ios-sdk (= 4.1.2)
6
6
  - React
7
7
  - boost (1.84.0)
8
8
  - DoubleConversion (1.1.6)
9
+ - FBAEMKit (17.4.0):
10
+ - FBSDKCoreKit_Basics (= 17.4.0)
9
11
  - FBLazyVector (0.75.1)
12
+ - FBSDKCoreKit (17.4.0):
13
+ - FBAEMKit (= 17.4.0)
14
+ - FBSDKCoreKit_Basics (= 17.4.0)
15
+ - FBSDKCoreKit_Basics (17.4.0)
10
16
  - Firebase/CoreOnly (10.29.0):
11
17
  - FirebaseCore (= 10.29.0)
12
18
  - Firebase/Messaging (10.29.0):
@@ -1323,6 +1329,8 @@ PODS:
1323
1329
  - ReactCommon/turbomodule/bridging
1324
1330
  - ReactCommon/turbomodule/core
1325
1331
  - Yoga
1332
+ - react-native-native-log (0.1.3):
1333
+ - React
1326
1334
  - react-native-safe-area-context (4.10.9):
1327
1335
  - React-Core
1328
1336
  - react-native-simple-toast (3.3.1):
@@ -1672,6 +1680,7 @@ DEPENDENCIES:
1672
1680
  - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
1673
1681
  - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
1674
1682
  - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
1683
+ - FBSDKCoreKit
1675
1684
  - FirebaseCore
1676
1685
  - fmt (from `../node_modules/react-native/third-party-podspecs/fmt.podspec`)
1677
1686
  - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
@@ -1708,6 +1717,7 @@ DEPENDENCIES:
1708
1717
  - React-logger (from `../node_modules/react-native/ReactCommon/logger`)
1709
1718
  - React-Mapbuffer (from `../node_modules/react-native/ReactCommon`)
1710
1719
  - React-microtasksnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/microtasks`)
1720
+ - react-native-native-log (from `../node_modules/react-native-native-log`)
1711
1721
  - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
1712
1722
  - react-native-simple-toast (from `../node_modules/react-native-simple-toast`)
1713
1723
  - react-native-webview (from `../node_modules/react-native-webview`)
@@ -1747,6 +1757,9 @@ DEPENDENCIES:
1747
1757
  SPEC REPOS:
1748
1758
  trunk:
1749
1759
  - airbridge-ios-sdk
1760
+ - FBAEMKit
1761
+ - FBSDKCoreKit
1762
+ - FBSDKCoreKit_Basics
1750
1763
  - Firebase
1751
1764
  - FirebaseCore
1752
1765
  - FirebaseCoreExtension
@@ -1836,6 +1849,8 @@ EXTERNAL SOURCES:
1836
1849
  :path: "../node_modules/react-native/ReactCommon"
1837
1850
  React-microtasksnativemodule:
1838
1851
  :path: "../node_modules/react-native/ReactCommon/react/nativemodule/microtasks"
1852
+ react-native-native-log:
1853
+ :path: "../node_modules/react-native-native-log"
1839
1854
  react-native-safe-area-context:
1840
1855
  :path: "../node_modules/react-native-safe-area-context"
1841
1856
  react-native-simple-toast:
@@ -1908,12 +1923,15 @@ EXTERNAL SOURCES:
1908
1923
  :path: "../node_modules/react-native/ReactCommon/yoga"
1909
1924
 
1910
1925
  SPEC CHECKSUMS:
1911
- airbridge-ios-sdk: 627fb7cfde3aae4a1893e29fc871bcbb06fab78d
1912
- airbridge-ios-sdk-qa-library: 71f1e3439b8e401de5bf6ff9ef0ec32cce0df22c
1913
- airbridge-react-native-sdk: 0275ffc67f2268e8356d39db6733907d60d1bf43
1926
+ airbridge-ios-sdk: 1ada55013e9d4aceb621d1fb794d79839afee057
1927
+ airbridge-ios-sdk-qa-library: 79b3285875970be44c4302b9f48bf5ed62acccad
1928
+ airbridge-react-native-sdk: 1320523576e5ec60590c56939f5fb421d03e1100
1914
1929
  boost: 4cb898d0bf20404aab1850c656dcea009429d6c1
1915
1930
  DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5
1931
+ FBAEMKit: 58cb5f302cdd715a56d4c1d0dfdd2e423ac1421a
1916
1932
  FBLazyVector: a3071c12f1650bfa84f2815e9982426256a0aae1
1933
+ FBSDKCoreKit: 94d7461d0cecf441b1ba7c41acfff41daa8ccd41
1934
+ FBSDKCoreKit_Basics: 151b43db8b834d3f0e02f95d36a44ffd36265e45
1917
1935
  Firebase: cec914dab6fd7b1bd8ab56ea07ce4e03dd251c2d
1918
1936
  FirebaseCore: 30e9c1cbe3d38f5f5e75f48bfcea87d7c358ec16
1919
1937
  FirebaseCoreExtension: 705ca5b14bf71d2564a0ddc677df1fc86ffa600f
@@ -1956,6 +1974,7 @@ SPEC CHECKSUMS:
1956
1974
  React-logger: 0a81d1a40650bbdafb255fe4616edb83feed0ee9
1957
1975
  React-Mapbuffer: b758bec0d9994c10a2841dfd5ec70673665fd3e2
1958
1976
  React-microtasksnativemodule: f25dba9c8c3f8be0b3368d52b99abd6e381dee1d
1977
+ react-native-native-log: bd883a7b018c0cdd9d23bc806a074bc067cfb7a9
1959
1978
  react-native-safe-area-context: ab8f4a3d8180913bd78ae75dd599c94cce3d5e9a
1960
1979
  react-native-simple-toast: 1f1cc551d419bc0ab05dcb0136554006c274789d
1961
1980
  react-native-webview: 8d898b88c0bc3f90f232882d0aef9ef29c1b9160
@@ -1994,6 +2013,6 @@ SPEC CHECKSUMS:
1994
2013
  Toast: 1f5ea13423a1e6674c4abdac5be53587ae481c4e
1995
2014
  Yoga: 06fc4b2c3664ae0e278964b8fbcb0ee9d21f0a5a
1996
2015
 
1997
- PODFILE CHECKSUM: 2b544c256d0818052e2175afac7b026f5c3e9567
2016
+ PODFILE CHECKSUM: 247fa8db03e9eac8ee3efea1584d696a222f405f
1998
2017
 
1999
- COCOAPODS: 1.15.2
2018
+ COCOAPODS: 1.16.2
@@ -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.0",
46
+ "version": "4.1.3",
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.5",
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
- console.log(`[DeepLink] ${result}`)
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
  )