diff --git a/.gitignore b/.gitignore index 7a1ea48..cac3a2a 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ ClashX/clash/ .vscode ClashX/goClash/goClash.h ClashX/goClash/goClash.a +fastlane/report.xml diff --git a/ClashX/Extensions/AppDelegate+..swift b/ClashX/Extensions/AppDelegate+..swift index 167f2d5..6476f71 100644 --- a/ClashX/Extensions/AppDelegate+..swift +++ b/ClashX/Extensions/AppDelegate+..swift @@ -18,4 +18,11 @@ extension AppDelegate { } return false } + + static var isAboveMacOS152: Bool { + if #available(macOS 10.15.3, *) { + return true + } + return false + } } diff --git a/ClashX/General/Managers/MenuItemFactory.swift b/ClashX/General/Managers/MenuItemFactory.swift index 809769b..ab5511c 100644 --- a/ClashX/General/Managers/MenuItemFactory.swift +++ b/ClashX/General/Managers/MenuItemFactory.swift @@ -20,7 +20,7 @@ class MenuItemFactory { } } - static var useViewToRenderProxy: Bool = UserDefaults.standard.object(forKey: "useViewToRenderProxy") as? Bool ?? false { + static var useViewToRenderProxy: Bool = UserDefaults.standard.object(forKey: "useViewToRenderProxy") as? Bool ?? AppDelegate.isAboveMacOS152 { didSet { UserDefaults.standard.set(useViewToRenderProxy, forKey: "useViewToRenderProxy") } diff --git a/fastlane/README.md b/fastlane/README.md index fd2fe00..9950fcf 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -25,6 +25,11 @@ fastlane build fastlane beta ``` +### addKeyChain +``` +fastlane addKeyChain +``` + ----