expo-screen-orientation 6.0.0 → 6.0.1

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/CHANGELOG.md CHANGED
@@ -10,6 +10,12 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 6.0.1 — 2023-06-23
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - [iOS] Fix crash when reading `rootViewController` value. ([#23039](https://github.com/expo/expo/pull/23039) by [@gabrieldonadel](https://github.com/gabrieldonadel))
18
+
13
19
  ## 6.0.0 — 2023-06-21
14
20
 
15
21
  _This version does not introduce any user-facing changes._
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '6.0.0'
6
+ version = '6.0.1'
7
7
 
8
8
  buildscript {
9
9
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
@@ -67,7 +67,7 @@ android {
67
67
  minSdkVersion safeExtGet("minSdkVersion", 21)
68
68
  targetSdkVersion safeExtGet("targetSdkVersion", 33)
69
69
  versionCode 7
70
- versionName '6.0.0'
70
+ versionName '6.0.1'
71
71
  }
72
72
  lintOptions {
73
73
  abortOnError false
@@ -20,7 +20,13 @@ public class ScreenOrientationRegistry: NSObject, UIApplicationDelegate {
20
20
  weak var currentTraitCollection: UITraitCollection?
21
21
  var lastOrientationMask: UIInterfaceOrientationMask
22
22
  var rootViewController: UIViewController? {
23
- return UIApplication.shared.keyWindow?.rootViewController
23
+ let keyWindow = UIApplication
24
+ .shared
25
+ .connectedScenes
26
+ .flatMap { ($0 as? UIWindowScene)?.windows ?? [] }
27
+ .last { $0.isKeyWindow }
28
+
29
+ return keyWindow?.rootViewController
24
30
  }
25
31
 
26
32
  var currentOrientationMask: UIInterfaceOrientationMask {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-screen-orientation",
3
- "version": "6.0.0",
3
+ "version": "6.0.1",
4
4
  "description": "Expo universal module for managing device's screen orientation",
5
5
  "main": "build/ScreenOrientation.js",
6
6
  "types": "build/ScreenOrientation.d.ts",
@@ -41,5 +41,5 @@
41
41
  "peerDependencies": {
42
42
  "expo": "*"
43
43
  },
44
- "gitHead": "fa5ecca8251986b9f197cc14074eec0ab6dfb6db"
44
+ "gitHead": "a72ae33519fe54eaf195dc3e61a49db8345103db"
45
45
  }