From 33e0ceec0471f6f911cb1785585889b806a89e12 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Fri, 31 Mar 2023 23:47:29 +0200 Subject: [PATCH] Lock in background (#275) There are plenty of situations where the app kind of stays in the foreground, but goes to .inactive state. Lock screen could be annoying in those cases. --- CHANGELOG.md | 4 ++-- Passepartout.xcodeproj/project.pbxproj | 4 +++- .../xcshareddata/xcschemes/Passepartout.xcscheme | 2 +- .../xcshareddata/xcschemes/PassepartoutLauncher.xcscheme | 2 +- .../xcshareddata/xcschemes/PassepartoutMac.xcscheme | 2 +- .../xcshareddata/xcschemes/PassepartoutTests.xcscheme | 2 +- Passepartout/App/Reusable/LockableView.swift | 2 +- .../xcode/xcshareddata/xcschemes/OpenVPNAppExtension.xcscheme | 2 +- .../xcode/xcshareddata/xcschemes/PassepartoutLibrary.xcscheme | 2 +- .../xcschemes/PassepartoutProvidersTests.xcscheme | 2 +- .../xcshareddata/xcschemes/PassepartoutServicesTests.xcscheme | 2 +- .../xcshareddata/xcschemes/PassepartoutUtilsTests.xcscheme | 2 +- .../xcshareddata/xcschemes/WireGuardAppExtension.xcscheme | 2 +- 13 files changed, 16 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d470482d..28660f97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,11 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Option to lock app when entering background (iOS). [#270](https://github.com/passepartoutvpn/passepartout-apple/pull/270), [#271](https://github.com/passepartoutvpn/passepartout-apple/pull/271), [#273](https://github.com/passepartoutvpn/passepartout-apple/pull/273) +- Option to lock app when entering background (iOS). [#270](https://github.com/passepartoutvpn/passepartout-apple/pull/270), [#271](https://github.com/passepartoutvpn/passepartout-apple/pull/271), [#273](https://github.com/passepartoutvpn/passepartout-apple/pull/273), [#275](https://github.com/passepartoutvpn/passepartout-apple/pull/275) - 3D Touch items (iOS). [#267](https://github.com/passepartoutvpn/passepartout-apple/pull/267) - Ukranian translations (Dmitry Chirkin). [#243](https://github.com/passepartoutvpn/passepartout-apple/pull/243) - Restore DNS "Domain" setting. [#260](https://github.com/passepartoutvpn/passepartout-apple/pull/260) -- OpenVPN: Full implementation of Tunnelblick XOR patch (tmthecoder). [#245](https://github.com/passepartoutvpn/passepartout-apple/pull/245), [tunnelkit#255][https://github.com/passepartoutvpn/tunnelkit/pull/255] +- OpenVPN: Full implementation of Tunnelblick XOR patch (tmthecoder). [#245](https://github.com/passepartoutvpn/passepartout-apple/pull/245), [tunnelkit#255](https://github.com/passepartoutvpn/tunnelkit/pull/255) - WireGuard: DoH/DoT options. [#264](https://github.com/passepartoutvpn/passepartout-apple/pull/264) ### Changed diff --git a/Passepartout.xcodeproj/project.pbxproj b/Passepartout.xcodeproj/project.pbxproj index ec911e6a..c9b531d2 100644 --- a/Passepartout.xcodeproj/project.pbxproj +++ b/Passepartout.xcodeproj/project.pbxproj @@ -1167,7 +1167,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1400; - LastUpgradeCheck = 1400; + LastUpgradeCheck = 1420; ORGANIZATIONNAME = "Davide De Rosa"; TargetAttributes = { 0E41BD96286711C3006346B4 = { @@ -1905,6 +1905,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Manual; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; @@ -1939,6 +1940,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Manual; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; diff --git a/Passepartout.xcodeproj/xcshareddata/xcschemes/Passepartout.xcscheme b/Passepartout.xcodeproj/xcshareddata/xcschemes/Passepartout.xcscheme index f0fce4ce..f7fd0cda 100644 --- a/Passepartout.xcodeproj/xcshareddata/xcschemes/Passepartout.xcscheme +++ b/Passepartout.xcodeproj/xcshareddata/xcschemes/Passepartout.xcscheme @@ -1,6 +1,6 @@ : View { case .active: unlockIfNeeded() - case .inactive: + case .background: lockIfNeeded() default: diff --git a/PassepartoutLibrary/.swiftpm/xcode/xcshareddata/xcschemes/OpenVPNAppExtension.xcscheme b/PassepartoutLibrary/.swiftpm/xcode/xcshareddata/xcschemes/OpenVPNAppExtension.xcscheme index 84e5ef04..45d5b8e2 100644 --- a/PassepartoutLibrary/.swiftpm/xcode/xcshareddata/xcschemes/OpenVPNAppExtension.xcscheme +++ b/PassepartoutLibrary/.swiftpm/xcode/xcshareddata/xcschemes/OpenVPNAppExtension.xcscheme @@ -1,6 +1,6 @@