diff --git a/FlowCrypt.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/FlowCrypt.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 9494aa36d..81c5db5e7 100644 --- a/FlowCrypt.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/FlowCrypt.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -42,8 +42,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/google-api-objectivec-client-for-rest", "state" : { - "revision" : "3981beeb0ece282c6ed8e965cbb5b1bccfbe1543", - "version" : "5.0.0" + "revision" : "499087368ae106b7e00cd8cbb82fdd78257dfbc7", + "version" : "5.2.0" } }, { @@ -51,8 +51,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/GoogleSignIn-iOS", "state" : { - "revision" : "3996d908c7b3ce8a87d39c808f9a6b2a08fbe043", - "version" : "9.0.0" + "revision" : "913b4005ea26aebe1c97d54e35ad82a515924c71", + "version" : "9.1.0" } }, { @@ -141,8 +141,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/jpsim/SourceKitten.git", "state" : { - "revision" : "453f75b8a3bb2c3596c0d2dd422c289788233a22", - "version" : "0.37.1" + "revision" : "6529c17fe80dd94843a3df7ed3e6a239790d5c91", + "version" : "0.37.3" } }, { @@ -150,8 +150,17 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-argument-parser.git", "state" : { - "revision" : "309a47b2b1d9b5e991f36961c983ecec72275be3", - "version" : "1.6.1" + "revision" : "626b5b7b2f45e1b0b1c6f4a309296d1d21d7311b", + "version" : "1.7.1" + } + }, + { + "identity" : "swift-filename-matcher", + "kind" : "remoteSourceControl", + "location" : "https://github.com/ileitch/swift-filename-matcher", + "state" : { + "revision" : "eef5ac0b6b3cdc64b3039b037bed2def8a1edaeb", + "version" : "2.0.1" } }, { @@ -159,8 +168,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/swiftlang/swift-syntax.git", "state" : { - "revision" : "1103c45ece4f7fe160b8f75b4ea1ee2e5fac1841", - "version" : "601.0.0" + "revision" : "65b02a90ad2cc213e09309faeb7f6909e0a8577a", + "version" : "604.0.0-prerelease-2026-01-20" } }, { @@ -168,8 +177,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/realm/SwiftLint", "state" : { - "revision" : "625792423014cc49b0a1e5a1a5c0d6b8b3de10f9", - "version" : "0.59.1" + "revision" : "88952528a590ed366c6f76f6bfb980b5ebdcefc1", + "version" : "0.63.2" } }, { @@ -177,8 +186,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/scinfu/SwiftSoup.git", "state" : { - "revision" : "04a5da442816f764b2a8513c38420b4e6605145b", - "version" : "2.10.1" + "revision" : "6c7915e16f729857aec3e99068c361e58a00ed68", + "version" : "2.13.4" } }, { @@ -222,8 +231,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/jpsim/Yams.git", "state" : { - "revision" : "3d6871d5b4a5cd519adf233fbb576e0a2af71c17", - "version" : "5.4.0" + "revision" : "deaf82e867fa2cbd3cd865978b079bfcf384ac28", + "version" : "6.2.1" } } ], diff --git a/FlowCrypt/Controllers/Search/SearchViewController.swift b/FlowCrypt/Controllers/Search/SearchViewController.swift index 0817eeebd..e334f22b9 100644 --- a/FlowCrypt/Controllers/Search/SearchViewController.swift +++ b/FlowCrypt/Controllers/Search/SearchViewController.swift @@ -38,11 +38,17 @@ class SearchViewController: InboxViewController { override func setupNavigationBar() { title = "search_title".localized - navigationItem.titleView = searchController.searchBar navigationItem.rightBarButtonItems = nil navigationItem.leftBarButtonItem = .defaultBackButton { self.navigationController?.popViewController(animated: true) } + + if #available(iOS 26.0, *) { + navigationItem.searchController = searchController + navigationItem.hidesSearchBarWhenScrolling = false + } else { + navigationItem.titleView = searchController.searchBar + } } private func setupSearch() { @@ -50,25 +56,33 @@ class SearchViewController: InboxViewController { $0.delegate = self $0.searchResultsUpdater = self $0.hidesNavigationBarDuringPresentation = false - $0.searchBar.tintColor = .white - $0.searchBar.setImage(UIImage(systemName: "magnifyingglass")?.tinted(.white), for: .search, state: .normal) - $0.searchBar.setImage(UIImage(systemName: "xmark")?.tinted(.white), for: .clear, state: .normal) $0.searchBar.delegate = self - $0.searchBar.searchTextField.textColor = .white } + + if #unavailable(iOS 26.0) { + searchController.do { + $0.searchBar.tintColor = .white + $0.searchBar.setImage(UIImage(systemName: "magnifyingglass")?.tinted(.white), for: .search, state: .normal) + $0.searchBar.setImage(UIImage(systemName: "xmark")?.tinted(.white), for: .clear, state: .normal) + $0.searchBar.searchTextField.textColor = .white + } + } + update(searchController: searchController) definesPresentationContext = true } private func update(searchController: UISearchController) { - searchController.searchBar.searchTextField.attributedPlaceholder = "search_placeholder" - .localized - .attributed( - .regular(14), - color: UIColor.white.withAlphaComponent(0.7), - alignment: .left - ) - searchController.searchBar.searchTextField.textColor = .white + if #unavailable(iOS 26.0) { + searchController.searchBar.searchTextField.attributedPlaceholder = "search_placeholder" + .localized + .attributed( + .regular(14), + color: UIColor.white.withAlphaComponent(0.7), + alignment: .left + ) + searchController.searchBar.searchTextField.textColor = .white + } searchController.searchBar.searchTextField.accessibilityIdentifier = "aid-search-all-emails-field" } } diff --git a/FlowCrypt/Controllers/Setup/SetupManuallyEnterPassPhraseViewController.swift b/FlowCrypt/Controllers/Setup/SetupManuallyEnterPassPhraseViewController.swift index ff19bdce3..a93f48068 100644 --- a/FlowCrypt/Controllers/Setup/SetupManuallyEnterPassPhraseViewController.swift +++ b/FlowCrypt/Controllers/Setup/SetupManuallyEnterPassPhraseViewController.swift @@ -68,7 +68,6 @@ final class SetupManuallyEnterPassPhraseViewController: TableNodeViewController, override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) navigationController?.setNavigationBarHidden(false, animated: animated) - navigationController?.navigationBar.barStyle = .black } private func setupUI() { diff --git a/FlowCrypt/Controllers/Setup/SetupManuallyImportKeyViewController.swift b/FlowCrypt/Controllers/Setup/SetupManuallyImportKeyViewController.swift index 328a70592..cf1201471 100644 --- a/FlowCrypt/Controllers/Setup/SetupManuallyImportKeyViewController.swift +++ b/FlowCrypt/Controllers/Setup/SetupManuallyImportKeyViewController.swift @@ -60,7 +60,6 @@ final class SetupManuallyImportKeyViewController: TableNodeViewController { override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) navigationController?.setNavigationBarHidden(false, animated: animated) - navigationController?.navigationBar.barStyle = .black } override func viewDidAppear(_ animated: Bool) { diff --git a/FlowCrypt/Controllers/SideMenu/Main/SideMenuNavigationController.swift b/FlowCrypt/Controllers/SideMenu/Main/SideMenuNavigationController.swift index f5b84ad73..3d0e41798 100644 --- a/FlowCrypt/Controllers/SideMenu/Main/SideMenuNavigationController.swift +++ b/FlowCrypt/Controllers/SideMenu/Main/SideMenuNavigationController.swift @@ -24,7 +24,10 @@ final class SideMenuNavigationController: ENSideMenuNavigationController { } override var preferredStatusBarStyle: UIStatusBarStyle { - .lightContent + if #available(iOS 26.0, *) { + return .default + } + return .lightContent } override var preferredStatusBarUpdateAnimation: UIStatusBarAnimation { diff --git a/FlowCrypt/Controllers/SideMenu/NavigationController/MainNavigationController.swift b/FlowCrypt/Controllers/SideMenu/NavigationController/MainNavigationController.swift index 8ad3564c7..5c6ef36ba 100644 --- a/FlowCrypt/Controllers/SideMenu/NavigationController/MainNavigationController.swift +++ b/FlowCrypt/Controllers/SideMenu/NavigationController/MainNavigationController.swift @@ -61,18 +61,30 @@ extension UINavigationController { .then { $0.title = "" } navigationBar.backItem?.title = "" - let appearance = UINavigationBarAppearance() - appearance.configureWithOpaqueBackground() - appearance.backgroundColor = .main - appearance.titleTextAttributes = [.foregroundColor: UIColor.white] - navigationBar.standardAppearance = appearance - navigationBar.scrollEdgeAppearance = appearance - navigationBar.compactScrollEdgeAppearance = appearance + if #available(iOS 26.0, *) { + let appearance = UINavigationBarAppearance() + appearance.configureWithTransparentBackground() + navigationBar.standardAppearance = appearance + navigationBar.scrollEdgeAppearance = appearance + navigationBar.compactAppearance = appearance + navigationBar.compactScrollEdgeAppearance = appearance - navigationBar.do { - $0.barTintColor = .main - $0.tintColor = .white - $0.titleTextAttributes = [.foregroundColor: UIColor.white] + navigationBar.tintColor = .main + } else { + let appearance = UINavigationBarAppearance() + appearance.configureWithOpaqueBackground() + appearance.backgroundColor = .main + appearance.titleTextAttributes = [.foregroundColor: UIColor.white] + navigationBar.standardAppearance = appearance + navigationBar.scrollEdgeAppearance = appearance + navigationBar.compactAppearance = appearance + navigationBar.compactScrollEdgeAppearance = appearance + + navigationBar.do { + $0.barTintColor = .main + $0.tintColor = .white + $0.titleTextAttributes = [.foregroundColor: UIColor.white] + } } } } diff --git a/FlowCrypt/Info.plist b/FlowCrypt/Info.plist index fcb9898e2..8907b4276 100644 --- a/FlowCrypt/Info.plist +++ b/FlowCrypt/Info.plist @@ -2,8 +2,6 @@ - UIDesignRequiresCompatibility - CFBundleDevelopmentRegion en CFBundleDisplayName diff --git a/FlowCryptUI/Nodes/TableViewController.swift b/FlowCryptUI/Nodes/TableViewController.swift index d7b7cd8c0..226b6b958 100644 --- a/FlowCryptUI/Nodes/TableViewController.swift +++ b/FlowCryptUI/Nodes/TableViewController.swift @@ -52,10 +52,16 @@ open class TableNodeViewController: ASDKViewController { public extension UINavigationItem { func setAccessibility(id: String?) { + let titleColor: UIColor + if #available(iOS 26.0, *) { + titleColor = .main + } else { + titleColor = .white + } let titleLabel = UILabel() titleLabel.attributedText = id?.attributed( .medium(16), - color: .white, + color: titleColor, alignment: .center ) titleLabel.sizeToFit() diff --git a/FlowCryptUI/Views/NavigationBarActionButton.swift b/FlowCryptUI/Views/NavigationBarActionButton.swift index 4ad781e96..5c41e24a9 100644 --- a/FlowCryptUI/Views/NavigationBarActionButton.swift +++ b/FlowCryptUI/Views/NavigationBarActionButton.swift @@ -18,13 +18,22 @@ public final class NavigationBarActionButton: UIBarButtonItem { public convenience init(imageSystemName: String, action: (() -> Void)?, accessibilityIdentifier: String? = nil) { self.init() onAction = action - customView = UIButton(type: .system).with { - $0.contentHorizontalAlignment = .left - $0.setImage(UIImage(systemName: imageSystemName), for: .normal) - $0.frame.size = Constants.buttonSize - $0.addTarget(self, action: #selector(tap), for: .touchUpInside) - $0.accessibilityIdentifier = accessibilityIdentifier - $0.isAccessibilityElement = true + if #available(iOS 26.0, *) { + image = UIImage(systemName: imageSystemName) + tintColor = .main + target = self + self.action = #selector(tap) + self.accessibilityIdentifier = accessibilityIdentifier + isAccessibilityElement = true + } else { + customView = UIButton(type: .system).with { + $0.contentHorizontalAlignment = .left + $0.setImage(UIImage(systemName: imageSystemName), for: .normal) + $0.frame.size = Constants.buttonSize + $0.addTarget(self, action: #selector(tap), for: .touchUpInside) + $0.accessibilityIdentifier = accessibilityIdentifier + $0.isAccessibilityElement = true + } } }