@applicaster/quick-brick-native-apple 6.9.8 → 6.9.9-alpha.0

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "QuickBrickApple",
3
- "version": "6.9.8",
3
+ "version": "6.9.9-alpha.0",
4
4
  "platforms": {
5
5
  "ios": "14.0",
6
6
  "tvos": "14.0"
@@ -16,7 +16,7 @@
16
16
  "authors": "Applicaster LTD.",
17
17
  "source": {
18
18
  "git": "https://github.com/applicaster/Zapp-Frameworks.git",
19
- "tag": "@@applicaster/quick-brick-native-apple/6.9.8"
19
+ "tag": "@@applicaster/quick-brick-native-apple/6.9.9-alpha.0"
20
20
  },
21
21
  "requires_arc": true,
22
22
  "source_files": "universal/**/*.{m,swift}",
@@ -161,20 +161,14 @@ class QuickBrickViewController: UIViewController, UILayerViewControllerProtocol
161
161
  logger?.debugLog(message: "\(QuickBrickViewControllerLogs.forceOrientation.message) UI orientation to: \(orientationMask.toString())",
162
162
  category: QuickBrickViewControllerLogs.forceOrientation.category)
163
163
 
164
- if #available(iOS 16.0, *) {
165
- let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene
166
- // We need update first setNeedsUpdateOfSupportedInterfaceOrientations,
167
- // otherwise requestGeometryUpdate returns errors
168
- self.setNeedsUpdateOfSupportedInterfaceOrientations()
169
- windowScene?.requestGeometryUpdate(.iOS(interfaceOrientations: orientationMask)) { [weak self] error in
170
- self?.logger?.errorLog(message: "\(QuickBrickViewControllerLogs.forceOrientation.message), error: \(error.localizedDescription) UI orientation to: \(orientationMask.toString())",
171
- category: QuickBrickViewControllerLogs.forceOrientation.category)
172
- }
173
-
174
- return
164
+ let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene
165
+ // We need update first setNeedsUpdateOfSupportedInterfaceOrientations,
166
+ // otherwise requestGeometryUpdate returns errors
167
+ setNeedsUpdateOfSupportedInterfaceOrientations()
168
+ windowScene?.requestGeometryUpdate(.iOS(interfaceOrientations: orientationMask)) { [weak self] error in
169
+ self?.logger?.errorLog(message: "\(QuickBrickViewControllerLogs.forceOrientation.message), error: \(error.localizedDescription) UI orientation to: \(orientationMask.toString())",
170
+ category: QuickBrickViewControllerLogs.forceOrientation.category)
175
171
  }
176
-
177
- changeOrienation(orientationMask: orientationMask)
178
172
  }
179
173
 
180
174
  func changeOrienation(orientationMask: UIInterfaceOrientationMask) {
@@ -68,15 +68,17 @@ class PluginsManagerBridge: NSObject, RCTBridgeModule {
68
68
  nil)
69
69
  return
70
70
  }
71
- FacadeConnector.connector?.pluginManager?.disablePlugin(identifier: identifier, completion: { success in
72
- if success {
71
+
72
+ Task {
73
+ let result: Bool = await FacadeConnector.connector?.pluginManager?.disablePlugin(identifier: identifier) ?? false
74
+ if result {
73
75
  resolver(true)
74
76
  } else {
75
77
  rejecter(Errors.disablePluginCode,
76
78
  Errors.disablePluginBody + identifier,
77
79
  nil)
78
80
  }
79
- })
81
+ }
80
82
  }
81
83
 
82
84
  @objc public func disableAllPlugins(_ pluginType: String?,
@@ -88,16 +90,17 @@ class PluginsManagerBridge: NSObject, RCTBridgeModule {
88
90
  nil)
89
91
  return
90
92
  }
91
- FacadeConnector.connector?.pluginManager?.disableAllPlugins(pluginType: pluginType, completion: { success in
92
- if success {
93
+
94
+ Task {
95
+ let result: Bool = await FacadeConnector.connector?.pluginManager?.disableAllPlugins(pluginType: pluginType) ?? false
96
+ if result {
93
97
  resolver(true)
94
98
  } else {
95
99
  rejecter(Errors.disablePluginsCode,
96
100
  Errors.disablePluginsBody + pluginType,
97
101
  nil)
98
102
  }
99
-
100
- })
103
+ }
101
104
  }
102
105
 
103
106
  @objc public func enablePlugin(_ identifier: String?,
@@ -109,17 +112,16 @@ class PluginsManagerBridge: NSObject, RCTBridgeModule {
109
112
  nil)
110
113
  return
111
114
  }
112
- FacadeConnector.connector?.pluginManager?.enablePlugin(identifier: identifier,
113
- completion: { success in
114
- if success {
115
- resolver(true)
116
- } else {
117
- rejecter(Errors.enablePluginCode,
118
- Errors.enablePluginBody + identifier,
119
- nil)
120
- }
121
-
122
- })
115
+ Task {
116
+ let result: Bool = await FacadeConnector.connector?.pluginManager?.enablePlugin(identifier: identifier) ?? false
117
+ if result {
118
+ resolver(true)
119
+ } else {
120
+ rejecter(Errors.enablePluginCode,
121
+ Errors.enablePluginBody + identifier,
122
+ nil)
123
+ }
124
+ }
123
125
  }
124
126
 
125
127
  @objc public func enableAllPlugins(_ pluginType: String?,
@@ -131,16 +133,16 @@ class PluginsManagerBridge: NSObject, RCTBridgeModule {
131
133
  nil)
132
134
  return
133
135
  }
134
- FacadeConnector.connector?.pluginManager?.enableAllPlugins(pluginType: pluginType,
135
- completion: { success in
136
- if success {
137
- resolver(true)
138
- } else {
139
- rejecter(Errors.enablePluginsCode,
140
- Errors.enablePluginsBody + pluginType,
141
- nil)
142
- }
143
136
 
144
- })
137
+ Task {
138
+ let result: Bool = await FacadeConnector.connector?.pluginManager?.enableAllPlugins(pluginType: pluginType) ?? false
139
+ if result {
140
+ resolver(true)
141
+ } else {
142
+ rejecter(Errors.enablePluginsCode,
143
+ Errors.enablePluginsBody + pluginType,
144
+ nil)
145
+ }
146
+ }
145
147
  }
146
148
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/quick-brick-native-apple",
3
- "version": "6.9.8",
3
+ "version": "6.9.9-alpha.0",
4
4
  "description": "iOS and tvOS native code for QuickBrick applications. This package is used to provide native logic for QuickBrick",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"