@applicaster/quick-brick-native-apple 5.22.2 → 5.22.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "QuickBrickApple",
3
- "version": "5.22.2",
3
+ "version": "5.22.3",
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/5.22.2"
19
+ "tag": "@@applicaster/quick-brick-native-apple/5.22.3"
20
20
  },
21
21
  "requires_arc": true,
22
22
  "source_files": "universal/**/*.{m,swift}",
@@ -153,16 +153,6 @@ class QuickBrickViewController: UIViewController, UILayerViewControllerProtocol
153
153
  }
154
154
 
155
155
  private func forceOrientationWithMaskIfNeeded(_ orientationMask: UIInterfaceOrientationMask) {
156
- if #available(iOS 16.0, *) {
157
- logger?.debugLog(message: "\(QuickBrickViewControllerLogs.forceOrientation.message) UI orientation to: \(orientationMask.toString())",
158
- category: QuickBrickViewControllerLogs.forceOrientation.category)
159
-
160
- let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene
161
- windowScene?.requestGeometryUpdate(.iOS(interfaceOrientations: orientationMask))
162
- UIViewController.attemptRotationToDeviceOrientation()
163
- return
164
- }
165
-
166
156
  if isSupportOrientation(mask: orientationMask,
167
157
  interfaceOrientation: currentInterfaceOrientation) {
168
158
  return
@@ -171,6 +161,19 @@ class QuickBrickViewController: UIViewController, UILayerViewControllerProtocol
171
161
  logger?.debugLog(message: "\(QuickBrickViewControllerLogs.forceOrientation.message) UI orientation to: \(orientationMask.toString())",
172
162
  category: QuickBrickViewControllerLogs.forceOrientation.category)
173
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
175
+ }
176
+
174
177
  changeOrienation(orientationMask: orientationMask)
175
178
  }
176
179
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/quick-brick-native-apple",
3
- "version": "5.22.2",
3
+ "version": "5.22.3",
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"