From c664aebd0efc2929850582213f60d2aa658703c6 Mon Sep 17 00:00:00 2001 From: Benedikt Wagner Date: Mon, 8 Jul 2024 08:45:01 +0200 Subject: [PATCH 1/4] remove placehold parameter to support iOS 16 --- CloudMaster/Features/Intro/Views/IntroView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CloudMaster/Features/Intro/Views/IntroView.swift b/CloudMaster/Features/Intro/Views/IntroView.swift index b42a930..69f733c 100644 --- a/CloudMaster/Features/Intro/Views/IntroView.swift +++ b/CloudMaster/Features/Intro/Views/IntroView.swift @@ -34,7 +34,7 @@ struct IntroView: View { viewModel.downloadCourses(favorites) } } - .onChange(of: viewModel.downloadCompleted) { completed, _ in + .onChange(of: viewModel.downloadCompleted) { completed in if completed { isAppConfigured = true } From e4d7a11293790bc23838d9b0986a52d69fff4ea3 Mon Sep 17 00:00:00 2001 From: Benedikt Wagner Date: Mon, 8 Jul 2024 08:45:21 +0200 Subject: [PATCH 2/4] Replace NavigationStack with NavigationView to support iOS 15 --- CloudMaster/Features/Exam/Views/ExamView.swift | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/CloudMaster/Features/Exam/Views/ExamView.swift b/CloudMaster/Features/Exam/Views/ExamView.swift index 4e3830d..3cfdde7 100644 --- a/CloudMaster/Features/Exam/Views/ExamView.swift +++ b/CloudMaster/Features/Exam/Views/ExamView.swift @@ -26,7 +26,7 @@ struct ExamView: View { } var body: some View { - NavigationStack { + NavigationView { VStack { if !questionLoader.questions.isEmpty { let questions = Array(questionLoader.questions.prefix(questionCount)) @@ -78,6 +78,12 @@ struct ExamView: View { .foregroundColor(.white) .cornerRadius(10) } + + if let examData = lastExamData { + NavigationLink(destination: ExamSummaryView(exam: examData, afterExam: true), isActive: $navigateToSummary) { + EmptyView() + } + } } Spacer() @@ -92,11 +98,6 @@ struct ExamView: View { Text("No Questions available! Please download course") } } - .navigationDestination(isPresented: $navigateToSummary) { - if let examData = lastExamData { - ExamSummaryView(exam: examData, afterExam: true) - } - } } .onAppear(perform: startTimer) .onDisappear { From 602f774ae2a12f74eddda12431e6c2f7cb5a7e23 Mon Sep 17 00:00:00 2001 From: Benedikt Wagner Date: Mon, 8 Jul 2024 08:45:59 +0200 Subject: [PATCH 3/4] render toolbar item without condition to support iOS15 --- CloudMaster.xcodeproj/project.pbxproj | 2 ++ CloudMaster/Features/Exam/Views/ExamSummaryView.swift | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CloudMaster.xcodeproj/project.pbxproj b/CloudMaster.xcodeproj/project.pbxproj index f7b59bd..b8f9953 100644 --- a/CloudMaster.xcodeproj/project.pbxproj +++ b/CloudMaster.xcodeproj/project.pbxproj @@ -786,6 +786,7 @@ INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -821,6 +822,7 @@ INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/CloudMaster/Features/Exam/Views/ExamSummaryView.swift b/CloudMaster/Features/Exam/Views/ExamSummaryView.swift index d1eff3b..d6cd63c 100644 --- a/CloudMaster/Features/Exam/Views/ExamSummaryView.swift +++ b/CloudMaster/Features/Exam/Views/ExamSummaryView.swift @@ -12,7 +12,7 @@ struct ExamSummaryView: View { // Helper variable to hide backbutton after Exam let afterExam: Bool - @Environment(\.presentationMode) var presentationMode + @Environment(\.presentationMode) var presentationMode var body: some View { VStack { @@ -87,10 +87,10 @@ struct ExamSummaryView: View { .navigationBarTitleDisplayMode(.inline) .navigationBarBackButtonHidden(afterExam) // Hide back button based on the flag .toolbar { - if (!afterExam){ - ToolbarItem(placement: .principal) { - HStack { - Spacer() + ToolbarItem(placement: .principal) { + HStack { + Spacer() + if !afterExam { Button(action: { showDeleteConfirmation = true }) { From 22a9177c8283c6f3136e15f586d4cfef2cd455b6 Mon Sep 17 00:00:00 2001 From: Benedikt Wagner Date: Mon, 8 Jul 2024 08:48:20 +0200 Subject: [PATCH 4/4] Bump version to 1.0.5 --- CloudMaster.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CloudMaster.xcodeproj/project.pbxproj b/CloudMaster.xcodeproj/project.pbxproj index b8f9953..24bda7b 100644 --- a/CloudMaster.xcodeproj/project.pbxproj +++ b/CloudMaster.xcodeproj/project.pbxproj @@ -791,7 +791,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.4; + MARKETING_VERSION = 1.0.5; PRODUCT_BUNDLE_IDENTIFIER = com.ditectrev.cloudmasterswift; PRODUCT_NAME = "CloudMaster Swift"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -827,7 +827,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.4; + MARKETING_VERSION = 1.0.5; PRODUCT_BUNDLE_IDENTIFIER = com.ditectrev.cloudmasterswift; PRODUCT_NAME = "CloudMaster Swift"; PROVISIONING_PROFILE_SPECIFIER = "";