diff --git a/Scribe.xcodeproj/project.pbxproj b/Scribe.xcodeproj/project.pbxproj index 53a184a4..3a86fa1f 100644 --- a/Scribe.xcodeproj/project.pbxproj +++ b/Scribe.xcodeproj/project.pbxproj @@ -2037,7 +2037,7 @@ attributes = { BuildIndependentTargetsInParallel = YES; LastSwiftUpdateCheck = 1540; - LastUpgradeCheck = 1530; + LastUpgradeCheck = 1610; ORGANIZATIONNAME = ""; TargetAttributes = { 38BD212F22D5907E00C6795D = { @@ -3360,7 +3360,6 @@ 38BD214622D5908100C6795D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = Scribe/Scribe.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; @@ -3389,7 +3388,6 @@ 38BD214722D5908100C6795D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = Scribe/Scribe.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; @@ -4258,8 +4256,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/groue/GRDB.swift.git"; requirement = { - branch = master; - kind = branch; + kind = upToNextMajorVersion; + minimumVersion = 7.0.0; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/Scribe.xcodeproj/xcshareddata/xcschemes/French.xcscheme b/Scribe.xcodeproj/xcshareddata/xcschemes/French.xcscheme index 112bba38..1d654261 100644 --- a/Scribe.xcodeproj/xcshareddata/xcschemes/French.xcscheme +++ b/Scribe.xcodeproj/xcshareddata/xcschemes/French.xcscheme @@ -1,6 +1,6 @@ diff --git a/Scribe.xcodeproj/xcshareddata/xcschemes/German.xcscheme b/Scribe.xcodeproj/xcshareddata/xcschemes/German.xcscheme index 52a6413e..2361590b 100644 --- a/Scribe.xcodeproj/xcshareddata/xcschemes/German.xcscheme +++ b/Scribe.xcodeproj/xcshareddata/xcschemes/German.xcscheme @@ -1,6 +1,6 @@ diff --git a/Scribe.xcodeproj/xcshareddata/xcschemes/Italian.xcscheme b/Scribe.xcodeproj/xcshareddata/xcschemes/Italian.xcscheme index 5582cf38..92101293 100644 --- a/Scribe.xcodeproj/xcshareddata/xcschemes/Italian.xcscheme +++ b/Scribe.xcodeproj/xcshareddata/xcschemes/Italian.xcscheme @@ -1,6 +1,6 @@ diff --git a/Scribe.xcodeproj/xcshareddata/xcschemes/Portuguese.xcscheme b/Scribe.xcodeproj/xcshareddata/xcschemes/Portuguese.xcscheme index e78d4e74..e3ee8041 100644 --- a/Scribe.xcodeproj/xcshareddata/xcschemes/Portuguese.xcscheme +++ b/Scribe.xcodeproj/xcshareddata/xcschemes/Portuguese.xcscheme @@ -1,6 +1,6 @@ diff --git a/Scribe.xcodeproj/xcshareddata/xcschemes/Russian.xcscheme b/Scribe.xcodeproj/xcshareddata/xcschemes/Russian.xcscheme index 19dd2c69..a1765ab5 100644 --- a/Scribe.xcodeproj/xcshareddata/xcschemes/Russian.xcscheme +++ b/Scribe.xcodeproj/xcshareddata/xcschemes/Russian.xcscheme @@ -1,6 +1,6 @@ diff --git a/Scribe.xcodeproj/xcshareddata/xcschemes/Scribe.xcscheme b/Scribe.xcodeproj/xcshareddata/xcschemes/Scribe.xcscheme index 7a617573..30904a80 100644 --- a/Scribe.xcodeproj/xcshareddata/xcschemes/Scribe.xcscheme +++ b/Scribe.xcodeproj/xcshareddata/xcschemes/Scribe.xcscheme @@ -1,6 +1,6 @@ diff --git a/Scribe.xcodeproj/xcshareddata/xcschemes/Swedish.xcscheme b/Scribe.xcodeproj/xcshareddata/xcschemes/Swedish.xcscheme index c3d200c8..3aecb9d4 100644 --- a/Scribe.xcodeproj/xcshareddata/xcschemes/Swedish.xcscheme +++ b/Scribe.xcodeproj/xcshareddata/xcschemes/Swedish.xcscheme @@ -1,6 +1,6 @@ diff --git a/Scribe/Extensions/UIDeviceExtensions.swift b/Scribe/Extensions/UIDeviceExtensions.swift index 593d7dfc..deadabbe 100644 --- a/Scribe/Extensions/UIDeviceExtensions.swift +++ b/Scribe/Extensions/UIDeviceExtensions.swift @@ -20,9 +20,19 @@ import UIKit extension UIDevice { - public static var hasNotch: Bool { - if UIApplication.shared.windows.count == 0 { return false } - let top = UIApplication.shared.windows[0].safeAreaInsets.top - return top > 24 - } + public static var hasNotch: Bool { + guard let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene else { + return false + } + if windowScene.windows.count == 0 { return false } + let top = scene.windows.first?.safeAreaInsets.top ?? 0 + return top > 24 + } + + private static var scene: UIWindowScene { + guard let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene else { + fatalError("No connected scenes.") + } + return windowScene + } }