Skip to content

Commit a895382

Browse files
committed
👽️ Update chapter 10 for iOS 16
1 parent 0a40ac9 commit a895382

File tree

9 files changed

+84
-47
lines changed

9 files changed

+84
-47
lines changed

Chapter 10 - Error Handling in Combine/final/SignUpForm/SignUpForm.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,15 +325,15 @@
325325
CODE_SIGN_STYLE = Automatic;
326326
CURRENT_PROJECT_VERSION = 1;
327327
DEVELOPMENT_ASSET_PATHS = "\"SignUpForm/Preview Content\"";
328-
DEVELOPMENT_TEAM = YGAZHQXHH4;
328+
DEVELOPMENT_TEAM = "";
329329
ENABLE_PREVIEWS = YES;
330330
GENERATE_INFOPLIST_FILE = YES;
331331
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
332332
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
333333
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
334334
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
335335
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
336-
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
336+
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
337337
LD_RUNPATH_SEARCH_PATHS = (
338338
"$(inherited)",
339339
"@executable_path/Frameworks",
@@ -355,15 +355,15 @@
355355
CODE_SIGN_STYLE = Automatic;
356356
CURRENT_PROJECT_VERSION = 1;
357357
DEVELOPMENT_ASSET_PATHS = "\"SignUpForm/Preview Content\"";
358-
DEVELOPMENT_TEAM = YGAZHQXHH4;
358+
DEVELOPMENT_TEAM = "";
359359
ENABLE_PREVIEWS = YES;
360360
GENERATE_INFOPLIST_FILE = YES;
361361
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
362362
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
363363
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
364364
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
365365
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
366-
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
366+
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
367367
LD_RUNPATH_SEARCH_PATHS = (
368368
"$(inherited)",
369369
"@executable_path/Frameworks",

Chapter 10 - Error Handling in Combine/final/SignUpForm/SignUpForm/Features/Authentication/Screens/SignUpFormScreen.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ struct SignUpScreen: View {
4949

5050
struct SignUpScreen_Previews: PreviewProvider {
5151
static var previews: some View {
52-
SignUpScreen()
52+
NavigationStack {
53+
SignUpScreen()
54+
}
5355
}
5456
}

Chapter 10 - Error Handling in Combine/final/SignUpForm/SignUpForm/SignUpFormApp.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import SwiftUI
1111
struct SignUpFormApp: App {
1212
var body: some Scene {
1313
WindowGroup {
14-
NavigationView {
14+
NavigationStack {
1515
SignUpScreen()
1616
.navigationTitle("Sign up")
1717
}

Chapter 10 - Error Handling in Combine/server/Package.resolved

Lines changed: 68 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Chapter 10 - Error Handling in Combine/starter/SignUpForm/SignUpForm.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,15 +325,15 @@
325325
CODE_SIGN_STYLE = Automatic;
326326
CURRENT_PROJECT_VERSION = 1;
327327
DEVELOPMENT_ASSET_PATHS = "\"SignUpForm/Preview Content\"";
328-
DEVELOPMENT_TEAM = YGAZHQXHH4;
328+
DEVELOPMENT_TEAM = "";
329329
ENABLE_PREVIEWS = YES;
330330
GENERATE_INFOPLIST_FILE = YES;
331331
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
332332
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
333333
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
334334
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
335335
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
336-
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
336+
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
337337
LD_RUNPATH_SEARCH_PATHS = (
338338
"$(inherited)",
339339
"@executable_path/Frameworks",
@@ -355,15 +355,15 @@
355355
CODE_SIGN_STYLE = Automatic;
356356
CURRENT_PROJECT_VERSION = 1;
357357
DEVELOPMENT_ASSET_PATHS = "\"SignUpForm/Preview Content\"";
358-
DEVELOPMENT_TEAM = YGAZHQXHH4;
358+
DEVELOPMENT_TEAM = "";
359359
ENABLE_PREVIEWS = YES;
360360
GENERATE_INFOPLIST_FILE = YES;
361361
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
362362
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
363363
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
364364
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
365365
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
366-
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
366+
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
367367
LD_RUNPATH_SEARCH_PATHS = (
368368
"$(inherited)",
369369
"@executable_path/Frameworks",

Chapter 10 - Error Handling in Combine/starter/SignUpForm/SignUpForm/Features/Authentication/Screens/SignUpFormScreen.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ struct SignUpFormScreen: View {
3535
} footer: {
3636
VStack(alignment: .leading) {
3737
ProgressView(value: viewModel.passwordStrengthValue, total: 1)
38-
// .foregroundColor(viewModel.passwordStrengthColor)
3938
.tint(viewModel.passwordStrengthColor)
4039
.progressViewStyle(.linear)
4140
Text(viewModel.passwordMessage)
@@ -57,7 +56,7 @@ struct SignUpFormScreen: View {
5756
// MARK: - Preview
5857
struct SignUpForm_Previews: PreviewProvider {
5958
static var previews: some View {
60-
NavigationView {
59+
NavigationStack {
6160
SignUpFormScreen()
6261
.navigationTitle("Sign up")
6362
}

Chapter 10 - Error Handling in Combine/starter/SignUpForm/SignUpForm/Features/Authentication/Services/AuthenticationService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ enum NetworkError: Error {
2525
struct AuthenticationService {
2626

2727
/// 1: Fetching data using URLSession *without* using Combine
28-
func checkUserNameAvailableOldSchool(userName: String, completion: @escaping (Result<Bool, NetworkError>) -> Void) {
28+
func checkUserNameAvailableWithCLosure(userName: String, completion: @escaping (Result<Bool, NetworkError>) -> Void) {
2929
let url = URL(string: "http://127.0.0.1:8080/isUserNameAvailable?userName=\(userName)")!
3030

3131
let task = URLSession.shared.dataTask(with: url) { data, response, error in

Chapter 10 - Error Handling in Combine/starter/SignUpForm/SignUpForm/Features/Authentication/ViewModels/SignUpFormViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class SignUpFormViewModel: ObservableObject {
126126

127127
// remove this later?
128128
func isUsernameAvailable(username: String) {
129-
authenticationService.checkUserNameAvailableOldSchool(userName: username) { result in
129+
authenticationService.checkUserNameAvailableWithCLosure(userName: username) { result in
130130
if case let .success(isAvailable) = result {
131131
print("Available: \(isAvailable)")
132132
}

Chapter 10 - Error Handling in Combine/starter/SignUpForm/SignUpForm/SignUpFormApp.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import SwiftUI
1111
struct SignUpFormApp: App {
1212
var body: some Scene {
1313
WindowGroup {
14-
NavigationView {
14+
NavigationStack {
1515
SignUpFormScreen()
1616
.navigationTitle("Sign up")
1717
}

0 commit comments

Comments
 (0)