Skip to content

Commit 5e5c3c2

Browse files
committed
iOS 26 Improvements - 2.2.6
1 parent 9d57adf commit 5e5c3c2

9 files changed

Lines changed: 549 additions & 276 deletions

File tree

StikDebug.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@
725725
"$(PROJECT_DIR)/StikJIT/idevice",
726726
);
727727
MACOSX_DEPLOYMENT_TARGET = 15.1;
728-
MARKETING_VERSION = 2.2.5;
728+
MARKETING_VERSION = 2.2.6;
729729
PRODUCT_BUNDLE_IDENTIFIER = com.stik.sj;
730730
PRODUCT_NAME = "$(TARGET_NAME)";
731731
SDKROOT = auto;
@@ -778,7 +778,7 @@
778778
"$(PROJECT_DIR)/StikJIT/idevice",
779779
);
780780
MACOSX_DEPLOYMENT_TARGET = 15.1;
781-
MARKETING_VERSION = 2.2.5;
781+
MARKETING_VERSION = 2.2.6;
782782
PRODUCT_BUNDLE_IDENTIFIER = com.stik.sj;
783783
PRODUCT_NAME = "$(TARGET_NAME)";
784784
SDKROOT = auto;

StikJIT/StikJITApp.swift

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ private func registerAdvancedOptionsDefault() {
1717
let enabled = os.majorVersion >= 19
1818
UserDefaults.standard.register(defaults: ["enableAdvancedOptions": enabled])
1919
UserDefaults.standard.register(defaults: ["enablePiP": enabled])
20+
// New default: VPN auto start enabled
21+
UserDefaults.standard.register(defaults: ["vpnAutoStart": true])
2022
}
2123

2224
// MARK: - Welcome Sheet
@@ -487,6 +489,7 @@ struct HeartbeatApp: App {
487489
@AppStorage("hasLaunchedBefore") var hasLaunchedBefore: Bool = false
488490
@AppStorage("customAccentColor") private var customAccentColorHex: String = ""
489491
@AppStorage("appTheme") private var appThemeRaw: String = AppTheme.system.rawValue
492+
@AppStorage("vpnAutoStart") private var vpnAutoStart: Bool = true
490493
@State private var showWelcomeSheet: Bool = false
491494
@State private var isLoading2 = true
492495
@State private var isPairing = false
@@ -717,10 +720,10 @@ struct HeartbeatApp: App {
717720
.tint(globalAccent)
718721
.onAppear {
719722
// On first launch, present the welcome sheet.
720-
// Otherwise, start the VPN automatically.
723+
// Otherwise, start the VPN automatically (if enabled).
721724
if !hasLaunchedBefore {
722725
showWelcomeSheet = true
723-
} else {
726+
} else if vpnAutoStart {
724727
TunnelManager.shared.startVPN()
725728
}
726729
// Update UIKit tint now and subscribe to changes without capturing self
@@ -735,10 +738,12 @@ struct HeartbeatApp: App {
735738
}
736739
.sheet(isPresented: $showWelcomeSheet) {
737740
WelcomeSheetView {
738-
// When the user taps "Continue", mark the app as launched and start the VPN.
741+
// When the user taps "Continue", mark the app as launched and start the VPN (if enabled).
739742
hasLaunchedBefore = true
740743
showWelcomeSheet = false
741-
TunnelManager.shared.startVPN()
744+
if vpnAutoStart {
745+
TunnelManager.shared.startVPN()
746+
}
742747
}
743748
}
744749
}

StikJIT/Views/HomeView.swift

Lines changed: 120 additions & 135 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)