Skip to content

Commit

Permalink
Update for MacOS Sonoma
Browse files Browse the repository at this point in the history
  • Loading branch information
jdamcd committed Dec 3, 2023
1 parent 1107428 commit 1eea05c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 22 deletions.
13 changes: 12 additions & 1 deletion macOS/Arrivals.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1420;
LastUpgradeCheck = 1420;
LastUpgradeCheck = 1500;
TargetAttributes = {
49386255297F4BE700C61AE3 = {
CreatedOnToolsVersion = 14.2;
Expand Down Expand Up @@ -350,9 +350,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;
Expand Down Expand Up @@ -410,9 +412,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;
Expand Down Expand Up @@ -440,6 +444,7 @@
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Arrivals/Preview Content\"";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=macosx*]" = "";
Expand Down Expand Up @@ -481,9 +486,11 @@
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Arrivals/Preview Content\"";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=macosx*]" = "";
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)";
GENERATE_INFOPLIST_FILE = YES;
Expand Down Expand Up @@ -517,6 +524,7 @@
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.0;
Expand All @@ -535,6 +543,7 @@
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.0;
Expand All @@ -552,6 +561,7 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.jdamcd.ArrivalsUITests;
Expand All @@ -568,6 +578,7 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.jdamcd.ArrivalsUITests;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1420"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
1 change: 0 additions & 1 deletion macOS/Arrivals/ArrivalsApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ extension NSApplication {
}

static func accessoryMode() {
NSApp.hide(self)
NSApp.setActivationPolicy(.accessory)
}
}
16 changes: 2 additions & 14 deletions macOS/Arrivals/ArrivalsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,6 @@ private struct Refresh {
var onRefresh: () -> Void
}

private func openSettings() {
NSApplication.foregroundMode()
if #available(macOS 13, *) {
NSApp.sendAction(Selector(("showSettingsWindow:")), to: nil, from: nil)
} else {
NSApp.sendAction(Selector(("showPreferencesWindow:")), to: nil, from: nil)
}
}

struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ArrivalsView(popoverState: PopoverState())
ControlFooter(text: "Station Name", refresh: Refresh(isLoading: false, onRefresh: {}))
}
#Preview {
ArrivalsView(popoverState: PopoverState())
}
7 changes: 2 additions & 5 deletions macOS/Arrivals/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import SwiftUI
import TflArrivals

struct SettingsView: View {
@Environment(\.controlActiveState) private var controlActiveState
@ObservedObject var viewModel = SettingsViewModel()

@State private var searchQuery: String = ""
Expand Down Expand Up @@ -121,8 +120,6 @@ private struct DebouncingTextField: View {
}
}

struct Settings_Previews: PreviewProvider {
static var previews: some View {
SettingsView()
}
#Preview {
SettingsView()
}

0 comments on commit 1eea05c

Please sign in to comment.