diff --git a/Pomelo.xcodeproj/project.pbxproj b/Pomelo.xcodeproj/project.pbxproj index 86267db..d58613d 100644 --- a/Pomelo.xcodeproj/project.pbxproj +++ b/Pomelo.xcodeproj/project.pbxproj @@ -89,6 +89,9 @@ 4EE462C42CB576F400BF268E /* BottomMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EE462C32CB576F400BF268E /* BottomMenuView.swift */; }; 4EE462C62CB5770700BF268E /* TopBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EE462C52CB5770700BF268E /* TopBarView.swift */; }; 4EE462C92CB5774900BF268E /* GameGridView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EE462C82CB5774900BF268E /* GameGridView.swift */; }; + 4EE473492CDEC743000A010C /* MetalHUDEnabler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EE473482CDEC73F000A010C /* MetalHUDEnabler.swift */; }; + 4EE4734D2CDECABC000A010C /* iOSNav.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EE4734C2CDECAB9000A010C /* iOSNav.swift */; }; + 4EE473502CDEE7B8000A010C /* SignInWithAppleButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EE4734F2CDEE7B8000A010C /* SignInWithAppleButton.swift */; }; 4EE593FF2C5FA1D1000939C4 /* AppIconProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EE593FE2C5FA1D1000939C4 /* AppIconProvider.swift */; }; 4EE9B1EC2CC47025008FA07B /* LaunchGameIntentDef.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EE9B1EB2CC47025008FA07B /* LaunchGameIntentDef.swift */; }; 4EEA0CFA2CA376AB0029A55D /* Zip in Frameworks */ = {isa = PBXBuildFile; productRef = 4EEA0CF92CA376AB0029A55D /* Zip */; }; @@ -204,6 +207,10 @@ 4EE462C32CB576F400BF268E /* BottomMenuView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BottomMenuView.swift; sourceTree = ""; }; 4EE462C52CB5770700BF268E /* TopBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TopBarView.swift; sourceTree = ""; }; 4EE462C82CB5774900BF268E /* GameGridView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameGridView.swift; sourceTree = ""; }; + 4EE473452CDEC597000A010C /* libMTLHud.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libMTLHud.tbd; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.2.sdk/usr/lib/libMTLHud.tbd; sourceTree = DEVELOPER_DIR; }; + 4EE473482CDEC73F000A010C /* MetalHUDEnabler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MetalHUDEnabler.swift; sourceTree = ""; }; + 4EE4734C2CDECAB9000A010C /* iOSNav.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSNav.swift; sourceTree = ""; }; + 4EE4734F2CDEE7B8000A010C /* SignInWithAppleButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignInWithAppleButton.swift; sourceTree = ""; }; 4EE593FE2C5FA1D1000939C4 /* AppIconProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppIconProvider.swift; sourceTree = ""; }; 4EE9B1EB2CC47025008FA07B /* LaunchGameIntentDef.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchGameIntentDef.swift; sourceTree = ""; }; /* End PBXFileReference section */ @@ -378,6 +385,7 @@ 384F188C2C1DCB4F0073375C /* Pomelo */ = { isa = PBXGroup; children = ( + 4EE4734A2CDECAA3000A010C /* Navigation */, 4EE9B1EA2CC4700F008FA07B /* Intents */, 4EE462B62CB54F0400BF268E /* ScreenshotManager */, 4EE462B32CB548D800BF268E /* Extentions */, @@ -447,6 +455,7 @@ 386F6F2E2C42E62200C62EBE /* SettingsViews */ = { isa = PBXGroup; children = ( + 4EE4734E2CDEE7AB000A010C /* Apple ID Login */, 4EE593FD2C5FA1C4000939C4 /* AppIcon */, 38020F572C43AFD400029E9A /* CoreSettings */, 386F6F2F2C42E63A00C62EBE /* SettingsView.swift */, @@ -485,6 +494,7 @@ 38C50D132C1DD4570007A953 /* Frameworks */ = { isa = PBXGroup; children = ( + 4EE473452CDEC597000A010C /* libMTLHud.tbd */, 4E7E03662C9667D200C10AFD /* OpenGLES.framework */, 38C50D162C1DD45F0007A953 /* CoreBluetooth.framework */, 38C50D142C1DD4570007A953 /* GameController.framework */, @@ -540,6 +550,7 @@ 4E1687CB2CC7A24000485EDB /* MetalViewHandler */ = { isa = PBXGroup; children = ( + 4EE473472CDEC737000A010C /* MetalHUDEnabler */, 4E1687CD2CC7A27000485EDB /* SudachiMetalView.swift */, ); path = MetalViewHandler; @@ -626,6 +637,38 @@ path = GameGrid; sourceTree = ""; }; + 4EE473472CDEC737000A010C /* MetalHUDEnabler */ = { + isa = PBXGroup; + children = ( + 4EE473482CDEC73F000A010C /* MetalHUDEnabler.swift */, + ); + path = MetalHUDEnabler; + sourceTree = ""; + }; + 4EE4734A2CDECAA3000A010C /* Navigation */ = { + isa = PBXGroup; + children = ( + 4EE4734B2CDECAAE000A010C /* iOSNavigation */, + ); + path = Navigation; + sourceTree = ""; + }; + 4EE4734B2CDECAAE000A010C /* iOSNavigation */ = { + isa = PBXGroup; + children = ( + 4EE4734C2CDECAB9000A010C /* iOSNav.swift */, + ); + path = iOSNavigation; + sourceTree = ""; + }; + 4EE4734E2CDEE7AB000A010C /* Apple ID Login */ = { + isa = PBXGroup; + children = ( + 4EE4734F2CDEE7B8000A010C /* SignInWithAppleButton.swift */, + ); + path = "Apple ID Login"; + sourceTree = ""; + }; 4EE593FD2C5FA1C4000939C4 /* AppIcon */ = { isa = PBXGroup; children = ( @@ -776,10 +819,13 @@ 38020F432C43754700029E9A /* EnableJIT.swift in Sources */, 38020F442C43754700029E9A /* DetectServer.swift in Sources */, 4E4AF12D2C926BBD00BBF2DE /* FolderMonitor.swift in Sources */, + 4EE473502CDEE7B8000A010C /* SignInWithAppleButton.swift in Sources */, 38B7FDFF2C760DE400D274FB /* Air.swift in Sources */, 4EE462B92CB54F2100BF268E /* ScreenShotListView.swift in Sources */, 38020F5A2C43AFFA00029E9A /* CoreSettingsView.swift in Sources */, + 4EE473492CDEC743000A010C /* MetalHUDEnabler.swift in Sources */, 4EE462BC2CB5552900BF268E /* MotionManager.swift in Sources */, + 4EE4734D2CDECABC000A010C /* iOSNav.swift in Sources */, 4EA0AA602CB6845700B51C64 /* JITEnabler.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -929,6 +975,7 @@ INFOPLIST_KEY_CFBundleDisplayName = Pomelo; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.games"; INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace = YES; + INFOPLIST_KEY_NSAppleMusicUsageDescription = "We need access to use Sign in with Apple."; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INFOPLIST_KEY_NSLocalNetworkUsageDescription = "Pomelo needs local network access for P2P Multiplayer "; INFOPLIST_KEY_NSMicrophoneUsageDescription = "Pomelo needs Microphone so the games can access it."; @@ -995,6 +1042,7 @@ INFOPLIST_KEY_CFBundleDisplayName = Pomelo; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.games"; INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace = YES; + INFOPLIST_KEY_NSAppleMusicUsageDescription = "We need access to use Sign in with Apple."; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INFOPLIST_KEY_NSLocalNetworkUsageDescription = "Pomelo needs local network access for P2P Multiplayer "; INFOPLIST_KEY_NSMicrophoneUsageDescription = "Pomelo needs Microphone so the games can access it."; diff --git a/Pomelo/ContentView.swift b/Pomelo/ContentView.swift index 047f975..c6f8a9e 100644 --- a/Pomelo/ContentView.swift +++ b/Pomelo/ContentView.swift @@ -9,12 +9,15 @@ import SwiftUI import Sudachi import Foundation import UIKit +import AuthenticationServices struct ContentView: View { @State var urlgame: PomeloGame? = nil @AppStorage("icloudsaves") var icloudsaves: Bool = false @AppStorage("useTrollStore") var useTrollStore: Bool = false + @AppStorage("showMetalHUD") var showMetalHUD: Bool = false + @AppStorage("canShowMetalHUD") var canShowMetalHUD: Bool = false @State var core = Core(games: [], root: FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0]) var body: some View { //NavView(core: $core) // pain and suffering @@ -43,6 +46,24 @@ struct ContentView: View { askForJIT() } + print("Show MetalHUD? \(showMetalHUD)") + + canShowMetalHUD = openMetalDylib() + + if showMetalHUD { + enableMetalHUD() + } else { + disableMetalHUD() + } + + ASAuthorizationAppleIDProvider().getCredentialState(forUserID: UserDefaults.standard.string(forKey: "deviceOwnerID") ?? "0") { state, error in + if state != .authorized { + UserDefaults.standard.set(nil, forKey: "deviceOwnerName") + UserDefaults.standard.set(nil, forKey: "deviceOwnerLastName") + UserDefaults.standard.set(nil, forKey: "deviceOwnerID") + } + } + // checkFoldersInICloud() do { diff --git a/Pomelo/Emulation/MetalViewHandler/MetalHUDEnabler/MetalHUDEnabler.swift b/Pomelo/Emulation/MetalViewHandler/MetalHUDEnabler/MetalHUDEnabler.swift new file mode 100644 index 0000000..f6151a3 --- /dev/null +++ b/Pomelo/Emulation/MetalViewHandler/MetalHUDEnabler/MetalHUDEnabler.swift @@ -0,0 +1,36 @@ +// +// MetalHUDEnabler.swift +// Pomelo +// +// Created by Stossy11 on 9/11/2024. +// Copyright © 2024 Stossy11. All rights reserved. +// + +import Foundation + +func enableMetalHUD() { + // Set the environment variable + setenv("MTL_HUD_ENABLED", "1", 1) + +} + +func openMetalDylib() -> Bool { + var path = "/usr/lib/libMTLHud.dylib" + + // Load the dynamic library + if dlopen(path, RTLD_NOW) != nil { + // Library loaded successfully + print("Library loaded from \(path)") + return true + } else { + // Handle error + if let error = String(validatingUTF8: dlerror()) { + print("Error loading library: \(error)") + } + return false + } +} + +func disableMetalHUD() { + setenv("MTL_HUD_ENABLED", "0", 1) +} diff --git a/Pomelo/Info.plist b/Pomelo/Info.plist index 469dbc6..e831f6d 100644 --- a/Pomelo/Info.plist +++ b/Pomelo/Info.plist @@ -2,6 +2,34 @@ + CFBundleIcons + + CFBundlePrimaryIcon + + CFBundleIconFiles + + AppIcon + secondary + old + original + + CFBundleIconName + AppIcon + UIPrerenderedIcon + + + UINewsstandIcon + + CFBundleIconFiles + + + + UINewsstandBindingEdge + UINewsstandBindingEdgeLeft + UINewsstandBindingType + UINewsstandBindingTypeMagazine + + CFBundleURLTypes @@ -17,36 +45,10 @@ LaunchGameIntent + Privacy - Apple ID Authentication Usage Description + We need access to use Sign in with Apple. UIFileSharingEnabled - CFBundleIcons - - CFBundlePrimaryIcon - - CFBundleIconName - AppIcon - CFBundleIconFiles - - AppIcon - secondary - old - original - - UIPrerenderedIcon - - - UINewsstandIcon - - CFBundleIconFiles - - - - UINewsstandBindingType - UINewsstandBindingTypeMagazine - UINewsstandBindingEdge - UINewsstandBindingEdgeLeft - - UIRequiresPersistentWiFi UTExportedTypeDeclarations diff --git a/Pomelo/LibraryViews/LibraryView.swift b/Pomelo/LibraryViews/LibraryView.swift index 4a04b4f..0f25f2e 100644 --- a/Pomelo/LibraryViews/LibraryView.swift +++ b/Pomelo/LibraryViews/LibraryView.swift @@ -31,8 +31,7 @@ struct LibraryView: View { } var body: some View { - NavigationView { - + iOSNav { GeometryReader { geometry in VStack { TopBarView() @@ -59,8 +58,6 @@ struct LibraryView: View { } } - .navigationViewStyle(StackNavigationViewStyle()) - .navigationViewStyle(.stack) .background(Color.gray.opacity(0.1)) .edgesIgnoringSafeArea(.all) .onAppear { diff --git a/Pomelo/LibraryViews/Menu/TopBarView.swift b/Pomelo/LibraryViews/Menu/TopBarView.swift index 30c198e..1c66e0a 100644 --- a/Pomelo/LibraryViews/Menu/TopBarView.swift +++ b/Pomelo/LibraryViews/Menu/TopBarView.swift @@ -16,6 +16,9 @@ struct TopBarView: View { @State private var batteryState: UIDevice.BatteryState = UIDevice.current.batteryState @State private var creatinguser: Bool = false @State private var username: String = "" + @AppStorage("deviceOwnerName") var deviceOwnerName: String? + @AppStorage("deviceOwnerLastName") var deviceOwnerLastName: String? + @AppStorage("hideLastNameTop") var hideLastName: Bool = false private var timer: Publishers.Autoconnect { Timer.publish(every: 60, on: .main, in: .common).autoconnect() // Update every minute @@ -56,10 +59,22 @@ struct TopBarView: View { } */ Spacer() - - Text("\(hour % 12 == 0 ? 12 : hour % 12):\(String(format: "%02d", minutes)) \(hour >= 12 ? "PM" : "AM")") - // .foregroundColor(.black) - .font(.system(size: 22)) + if let user = deviceOwnerName { + if hideLastName { + Text("Welcome \(user)!") + .font(.system(size: 22)) + } else if let deviceOwnerLastName { + Text("Welcome \(user) \(deviceOwnerLastName)!") + .font(.system(size: 22)) + } else { + Text("Welcome \(user)!") + .font(.system(size: 22)) + } // deviceOwnerLastName + } else { + Text("\(hour % 12 == 0 ? 12 : hour % 12):\(String(format: "%02d", minutes)) \(hour >= 12 ? "PM" : "AM")") + // .foregroundColor(.black) + .font(.system(size: 22)) + } Spacer() @@ -75,29 +90,9 @@ struct TopBarView: View { } .onAppear { UIDevice.current.isBatteryMonitoringEnabled = true + batteryLevel = UIDevice.current.batteryLevel batteryState = UIDevice.current.batteryState - - - - // Add observers for battery level and state changes - NotificationCenter.default.addObserver( - forName: UIDevice.batteryLevelDidChangeNotification, - object: nil, - queue: .main) { _ in - self.batteryLevel = UIDevice.current.batteryLevel - } - - NotificationCenter.default.addObserver( - forName: UIDevice.batteryStateDidChangeNotification, - object: nil, - queue: .main) { _ in - self.batteryState = UIDevice.current.batteryState - } - } - .onDisappear { - // Remove observers when the view disappears - NotificationCenter.default.removeObserver(self) } } diff --git a/Pomelo/Navigation/iOSNavigation/iOSNav.swift b/Pomelo/Navigation/iOSNavigation/iOSNav.swift new file mode 100644 index 0000000..122fd34 --- /dev/null +++ b/Pomelo/Navigation/iOSNavigation/iOSNav.swift @@ -0,0 +1,23 @@ +// +// iOSNav.swift +// Pomelo +// +// Created by Stossy11 on 9/11/2024. +// Copyright © 2024 Stossy11. All rights reserved. +// + +import SwiftUI + +struct iOSNav: View { + @ViewBuilder var content: () -> Content + + var body: some View { + if #available(iOS 16, *) { + NavigationStack(root: content) + } else { + NavigationView(content: content) + .navigationViewStyle(StackNavigationViewStyle()) + .navigationViewStyle(.stack) + } + } +} diff --git a/Pomelo/Pomelo.entitlements b/Pomelo/Pomelo.entitlements index c2e4a4a..1525dcf 100644 --- a/Pomelo/Pomelo.entitlements +++ b/Pomelo/Pomelo.entitlements @@ -2,6 +2,10 @@ + com.apple.developer.applesignin + + Default + com.apple.developer.kernel.extended-virtual-addressing com.apple.developer.kernel.increased-debugging-memory-limit diff --git a/Pomelo/PomeloDebug.entitlements b/Pomelo/PomeloDebug.entitlements index c2e4a4a..1525dcf 100644 --- a/Pomelo/PomeloDebug.entitlements +++ b/Pomelo/PomeloDebug.entitlements @@ -2,6 +2,10 @@ + com.apple.developer.applesignin + + Default + com.apple.developer.kernel.extended-virtual-addressing com.apple.developer.kernel.increased-debugging-memory-limit diff --git a/Pomelo/SettingsViews/AdvancedSettings/AdvancedSettingsView.swift b/Pomelo/SettingsViews/AdvancedSettings/AdvancedSettingsView.swift index e0a221c..4f02686 100644 --- a/Pomelo/SettingsViews/AdvancedSettings/AdvancedSettingsView.swift +++ b/Pomelo/SettingsViews/AdvancedSettings/AdvancedSettingsView.swift @@ -19,6 +19,12 @@ struct AdvancedSettingsView: View { @AppStorage("cangetfullpath") var canGetFullPath: Bool = false @AppStorage("onscreenhandheld") var onscreenjoy: Bool = false + @AppStorage("showMetalHUD") var showMetalHUD: Bool = false + + @AppStorage("canShowMetalHUD") var canShowMetalHUD: Bool = false + + @AppStorage("hideLastNameTop") var hideLastName: Bool = false + @AppStorage("deviceOwnerLastName") var deviceOwnerLastName: String? @State var isshowing = false var body: some View { @@ -52,6 +58,63 @@ struct AdvancedSettingsView: View { .padding(.bottom) .font(.footnote) .foregroundColor(.gray) + if canShowMetalHUD {// (Int(UIDevice.current.systemVersion) ?? 0 >= 16) || canShowMetalHUD { + Rectangle() + .fill(Color(uiColor: UIColor.secondarySystemBackground)) + .cornerRadius(10) + .frame(width: .infinity, height: 50) + .overlay() { + HStack { + Toggle("Show Metal HUD", isOn: $showMetalHUD) + .padding() + } + } + .onChange(of: showMetalHUD) { new in + print("Show MetalHUD? \(new)") + if new { + enableMetalHUD() + } else { + disableMetalHUD() + } + } + Text("This shows the current FPS (framerate), Memory Usage, and other information when running the emulation.") + .padding(.bottom) + .font(.footnote) + .foregroundColor(.gray) + } else { + Rectangle() + .fill(Color(uiColor: UIColor.secondarySystemBackground)) + .cornerRadius(10) + .frame(width: .infinity, height: 50) + .overlay() { + HStack { + Text("Metal HUD is not avalible on \(UIDevice.current.systemName) \(UIDevice.current.systemVersion)") + .padding(.horizontal) + Spacer() + } + } + .padding(.bottom) + .onAppear() { + showMetalHUD = false + } + } + + if deviceOwnerLastName != nil { + Rectangle() + .fill(Color(uiColor: UIColor.secondarySystemBackground)) + .cornerRadius(10) + .frame(width: .infinity, height: 50) + .overlay() { + HStack { + Toggle("Hide Last Name", isOn: $hideLastName) + .padding() + } + } + Text("Hide your last name at the top of the Game Selector Screen.") + .padding(.bottom) + .font(.footnote) + .foregroundColor(.gray) + } /* Rectangle() @@ -136,8 +199,6 @@ struct AdvancedSettingsView: View { .font(.footnote) .foregroundColor(.gray) } - .navigationViewStyle(StackNavigationViewStyle()) - .navigationViewStyle(.stack) .onAppear() { // isshowing = true } diff --git a/Pomelo/SettingsViews/Apple ID Login/SignInWithAppleButton.swift b/Pomelo/SettingsViews/Apple ID Login/SignInWithAppleButton.swift new file mode 100644 index 0000000..9921f20 --- /dev/null +++ b/Pomelo/SettingsViews/Apple ID Login/SignInWithAppleButton.swift @@ -0,0 +1,42 @@ +// +// SignInWithAppleButton.swift +// Pomelo +// +// Created by Stossy11 on 9/11/2024. +// Copyright © 2024 Stossy11. All rights reserved. +// + + +import AuthenticationServices +import SwiftUI + +struct SignInApple: View { + var body: some View { + + SignInWithAppleButton( + onRequest: { request in + request.requestedScopes = [.fullName] + }, + onCompletion: { result in + switch result { + case .success(let authResults): + if let appleIDCredential = authResults.credential as? ASAuthorizationAppleIDCredential { + let firstName = appleIDCredential.fullName?.givenName + let lastName = appleIDCredential.fullName?.familyName + + + UserDefaults.standard.set(appleIDCredential.user, forKey: "deviceOwnerID") + + UserDefaults.standard.set(firstName, forKey: "deviceOwnerName") + UserDefaults.standard.set(lastName, forKey: "deviceOwnerLastName") + UserDefaults.standard.synchronize() + } + case .failure(let error): + print(error.localizedDescription) + } + } + ) + .frame(height: 44) + .padding() + } +} diff --git a/Pomelo/SettingsViews/SettingsView.swift b/Pomelo/SettingsViews/SettingsView.swift index 80a2475..fb58bca 100644 --- a/Pomelo/SettingsViews/SettingsView.swift +++ b/Pomelo/SettingsViews/SettingsView.swift @@ -6,6 +6,7 @@ // import SwiftUI +import AuthenticationServices struct SettingsView: View { @State var core: Core @@ -14,8 +15,12 @@ struct SettingsView: View { @AppStorage("cantouchapplepen") var applepen: Bool = false @AppStorage("useTrollStore") var useTrollStore: Bool = false + @AppStorage("deviceOwnerID") var deviceOwnerID: String? + + @State var isshown: Bool = true + var body: some View { - NavigationView { + iOSNav { ScrollView { VStack(alignment: .center) { if iconused == 1 { @@ -123,6 +128,32 @@ struct SettingsView: View { } .padding() + if isshown { + Rectangle() + .fill(Color(uiColor: UIColor.secondarySystemBackground)) // Set the fill color (optional) + .cornerRadius(10) // Apply rounded corners + .frame(width: .infinity, height: 50) // Set the desired dimensions + .overlay() { + HStack(alignment: .center) { + SignInApple() + .frame(width: 200, height: 50) + .foregroundColor(Color(uiColor: UIColor.secondarySystemBackground)) + } + .onAppear { + ASAuthorizationAppleIDProvider().getCredentialState(forUserID: deviceOwnerID ?? "0") { state, error in + if state != .authorized { + isshown = true + UserDefaults.standard.set(nil, forKey: "deviceOwnerName") + UserDefaults.standard.set(nil, forKey: "deviceOwnerID") + } else { + isshown = false + } + } + } + } + .padding() + } + NavigationLink(destination: AppIconSwitcherView()) { Rectangle() @@ -148,11 +179,7 @@ struct SettingsView: View { Spacer() } } - .navigationViewStyle(StackNavigationViewStyle()) - .navigationViewStyle(.stack) } - .navigationViewStyle(StackNavigationViewStyle()) - .navigationViewStyle(.stack) .onAppear() { do { core = try LibraryManager.shared.library()