Skip to content

Commit

Permalink
Update package versions and recommended settings
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtavis committed Nov 14, 2024
1 parent 8325a3f commit 6acbb80
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 18 deletions.
8 changes: 3 additions & 5 deletions Scribe.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2037,7 +2037,7 @@
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1540;
LastUpgradeCheck = 1530;
LastUpgradeCheck = 1610;
ORGANIZATIONNAME = "";
TargetAttributes = {
38BD212F22D5907E00C6795D = {
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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 */
Expand Down
3 changes: 2 additions & 1 deletion Scribe.xcodeproj/xcshareddata/xcschemes/French.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
LastUpgradeVersion = "1610"
version = "2.0">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -73,6 +73,7 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
askForAppToLaunch = "Yes"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
3 changes: 2 additions & 1 deletion Scribe.xcodeproj/xcshareddata/xcschemes/German.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
LastUpgradeVersion = "1610"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction
Expand Down Expand Up @@ -73,6 +73,7 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
askForAppToLaunch = "Yes"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
3 changes: 2 additions & 1 deletion Scribe.xcodeproj/xcshareddata/xcschemes/Italian.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
LastUpgradeVersion = "1610"
version = "2.0">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -73,6 +73,7 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
askForAppToLaunch = "Yes"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
3 changes: 2 additions & 1 deletion Scribe.xcodeproj/xcshareddata/xcschemes/Portuguese.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
LastUpgradeVersion = "1610"
version = "2.0">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -73,6 +73,7 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
askForAppToLaunch = "Yes"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
3 changes: 2 additions & 1 deletion Scribe.xcodeproj/xcshareddata/xcschemes/Russian.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
LastUpgradeVersion = "1610"
version = "2.0">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -73,6 +73,7 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
askForAppToLaunch = "Yes"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
2 changes: 1 addition & 1 deletion Scribe.xcodeproj/xcshareddata/xcschemes/Scribe.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
LastUpgradeVersion = "1610"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
3 changes: 2 additions & 1 deletion Scribe.xcodeproj/xcshareddata/xcschemes/Spanish.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
LastUpgradeVersion = "1610"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction
Expand Down Expand Up @@ -74,6 +74,7 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
askForAppToLaunch = "Yes"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
3 changes: 2 additions & 1 deletion Scribe.xcodeproj/xcshareddata/xcschemes/Swedish.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
LastUpgradeVersion = "1610"
version = "2.0">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -73,6 +73,7 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
askForAppToLaunch = "Yes"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
20 changes: 15 additions & 5 deletions Scribe/Extensions/UIDeviceExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

0 comments on commit 6acbb80

Please sign in to comment.