diff --git a/OTP.xcodeproj/project.pbxproj b/OTP.xcodeproj/project.pbxproj index c2a181a..fd0473b 100644 --- a/OTP.xcodeproj/project.pbxproj +++ b/OTP.xcodeproj/project.pbxproj @@ -337,7 +337,7 @@ attributes = { BuildIndependentTargetsInParallel = 1; LastSwiftUpdateCheck = 1300; - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1530; TargetAttributes = { D61479D226D0AF1C00710B79 = { CreatedOnToolsVersion = 13.0; @@ -522,6 +522,7 @@ 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; @@ -583,6 +584,7 @@ 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; @@ -617,7 +619,7 @@ INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -648,7 +650,7 @@ INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -666,6 +668,7 @@ D6147A0926D141F800710B79 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; @@ -673,6 +676,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -682,6 +686,7 @@ "@loader_path/Frameworks", ); MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++17"; PRODUCT_BUNDLE_IDENTIFIER = net.shadowfacts.OTPKit; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -696,6 +701,7 @@ D6147A0A26D141F800710B79 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; @@ -703,6 +709,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -712,6 +719,7 @@ "@loader_path/Frameworks", ); MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++17"; PRODUCT_BUNDLE_IDENTIFIER = net.shadowfacts.OTPKit; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; diff --git a/OTP/Views/AddQRView.swift b/OTP/Views/AddQRView.swift index 89cd091..57c2a4a 100644 --- a/OTP/Views/AddQRView.swift +++ b/OTP/Views/AddQRView.swift @@ -18,7 +18,7 @@ struct AddQRView: View { @State private var isShowingConfirmView = false var body: some View { - NavigationView { + NavigationStack { CodeScannerView(codeTypes: [.qr], scanMode: .once) { (result) in switch result { case .success(let code): @@ -44,15 +44,9 @@ struct AddQRView: View { } } } - .overlay { - NavigationLink(isActive: $isShowingConfirmView) { - EditKeyForm(editingKey: scannedKey, showCancelButton: false, dismiss: dismiss) - .navigationTitle("Add Key") - } label: { - // EmptyView because this is only used to trigger programatic navigation - EmptyView() - } - + .navigationDestination(isPresented: $isShowingConfirmView) { + EditKeyForm(editingKey: scannedKey, showCancelButton: false, dismiss: dismiss) + .navigationTitle("Add Key") } } .alert("Unable to get OTP key from QR code", isPresented: $isPresentingScanFailedAlert) { diff --git a/OTP/Views/AddURLForm.swift b/OTP/Views/AddURLForm.swift index b8a836d..ac093e8 100644 --- a/OTP/Views/AddURLForm.swift +++ b/OTP/Views/AddURLForm.swift @@ -67,10 +67,12 @@ struct AddURLForm: View { .disabled(!isValid) } } - .onChange(of: inputURL, perform: self.updateExtractedKey(inputURL:)) + .onChange(of: inputURL) { + self.updateExtractedKey() + } } - private func updateExtractedKey(inputURL: String) { + private func updateExtractedKey() { let text = inputURL.trimmingCharacters(in: .whitespacesAndNewlines) if !text.isEmpty, let components = URLComponents(string: inputURL), diff --git a/OTP/Views/AppView.swift b/OTP/Views/AppView.swift index adfa9bf..0b91dd3 100644 --- a/OTP/Views/AppView.swift +++ b/OTP/Views/AppView.swift @@ -23,7 +23,7 @@ struct AppView: View { } var body: some View { - NavigationView { + NavigationSplitView { List { if searchQuery.isEmpty { KeysSection(codeHolder: entryHolder) @@ -39,7 +39,7 @@ struct AppView: View { KeysSection(codeHolder: allEntriesHolder, searchQuery: searchQuery) } } - .listStyle(.insetGrouped) + .listStyle(.sidebar) .navigationTitle("OTP") .toolbar { ToolbarItem(placement: .navigationBarLeading) { @@ -54,6 +54,8 @@ struct AppView: View { AddKeyButton(folderID: nil, canAddFolder: true) } } + } detail: { + ContentUnavailableView("No Folder", systemImage: "folder.fill") } .searchable(text: $searchQuery) .sheet(isPresented: $isPresentingPreferences, content: self.preferencesSheet) diff --git a/OTP/Views/KeyView.swift b/OTP/Views/KeyView.swift index a28d7b4..03ee9dd 100644 --- a/OTP/Views/KeyView.swift +++ b/OTP/Views/KeyView.swift @@ -79,6 +79,9 @@ struct KeyView: View { } } .tint(Color(UIColor.label)) + #if targetEnvironment(macCatalyst) + .padding(.vertical, 8) + #endif } private func progress(at date: Date) -> Double {