From 7e4ac86c74335ac6d0f0064ddac32be2418b3813 Mon Sep 17 00:00:00 2001 From: Jason Morley Date: Wed, 11 Oct 2023 13:43:23 -1000 Subject: [PATCH] fix: Update the minimum supported OS to macOS Sonoma (#68) --- macos/Overview.xcodeproj/project.pbxproj | 23 +++++++++++++++++---- macos/Overview/Model/ApplicationModel.swift | 2 +- macos/Overview/OverviewRelease.entitlements | 12 +++++++++++ 3 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 macos/Overview/OverviewRelease.entitlements diff --git a/macos/Overview.xcodeproj/project.pbxproj b/macos/Overview.xcodeproj/project.pbxproj index e163a03..40d5535 100644 --- a/macos/Overview.xcodeproj/project.pbxproj +++ b/macos/Overview.xcodeproj/project.pbxproj @@ -82,6 +82,7 @@ D8DCDDF825F664460083DF48 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; D8DCDE0725F6F9410083DF48 /* MonthView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MonthView.swift; sourceTree = ""; }; D8DCDE1125F6FD060083DF48 /* YearView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YearView.swift; sourceTree = ""; }; + D8FA1F412AD7691100E18E26 /* OverviewRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = OverviewRelease.entitlements; sourceTree = ""; }; D8FE3AD229116FE900C6F7FE /* interact */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = interact; path = ../interact; sourceTree = ""; }; D8FE3AD52911738E00C6F7FE /* interact-license */ = {isa = PBXFileReference; lastKnownFileType = text; path = "interact-license"; sourceTree = ""; }; D8FE3AD82911789500C6F7FE /* Summary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Summary.swift; sourceTree = ""; }; @@ -188,6 +189,7 @@ D8DCDDD725F664440083DF48 /* Overview */ = { isa = PBXGroup; children = ( + D8FA1F412AD7691100E18E26 /* OverviewRelease.entitlements */, D8DCDDE225F664450083DF48 /* Overview.entitlements */, D8DCDDE125F664450083DF48 /* Info.plist */, D8DCDDD825F664440083DF48 /* OverviewApp.swift */, @@ -319,8 +321,9 @@ D8DCDDCD25F664440083DF48 /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; LastSwiftUpdateCheck = 1240; - LastUpgradeCheck = 1240; + LastUpgradeCheck = 1500; TargetAttributes = { D8DCDDD425F664440083DF48 = { CreatedOnToolsVersion = 12.4; @@ -446,6 +449,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -476,9 +480,11 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -493,7 +499,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 13.0; + MACOSX_DEPLOYMENT_TARGET = 14.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -507,6 +513,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -537,9 +544,11 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -548,7 +557,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 13.0; + MACOSX_DEPLOYMENT_TARGET = 14.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = macosx; @@ -566,6 +575,7 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_ASSET_PATHS = "\"Overview/Preview Content\""; DEVELOPMENT_TEAM = QS82QFHKWB; ENABLE_HARDENED_RUNTIME = YES; @@ -589,12 +599,13 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_ENTITLEMENTS = Overview/Overview.entitlements; + CODE_SIGN_ENTITLEMENTS = Overview/OverviewRelease.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "3rd Party Mac Developer Application"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_ASSET_PATHS = "\"Overview/Preview Content\""; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=macosx*]" = QS82QFHKWB; @@ -623,6 +634,7 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = S4WXAUZQEV; INFOPLIST_FILE = OverviewTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -644,6 +656,7 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = S4WXAUZQEV; INFOPLIST_FILE = OverviewTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -664,6 +677,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = S4WXAUZQEV; INFOPLIST_FILE = OverviewUITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -684,6 +698,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = S4WXAUZQEV; INFOPLIST_FILE = OverviewUITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( diff --git a/macos/Overview/Model/ApplicationModel.swift b/macos/Overview/Model/ApplicationModel.swift index 9908996..c0dc836 100644 --- a/macos/Overview/Model/ApplicationModel.swift +++ b/macos/Overview/Model/ApplicationModel.swift @@ -40,7 +40,7 @@ class ApplicationModel: ObservableObject { .prepend(Notification(name: .EKEventStoreChanged, object: nil, userInfo: nil)) .eraseToAnyPublisher() - store.requestAccess(to: .event) { granted, error in + store.requestFullAccessToEvents { granted, error in // TODO: Handle the error. DispatchQueue.main.async { print("granted = \(granted), error = \(String(describing: error))") diff --git a/macos/Overview/OverviewRelease.entitlements b/macos/Overview/OverviewRelease.entitlements new file mode 100644 index 0000000..59f1bdb --- /dev/null +++ b/macos/Overview/OverviewRelease.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + com.apple.security.personal-information.calendars + + +