Skip to content

Commit 08b95c1

Browse files
committed
👽️ Update chapter 12 for iOS 16
1 parent 5145372 commit 08b95c1

File tree

6 files changed

+71
-60
lines changed

6 files changed

+71
-60
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,4 @@ iOSInjectionProject/
134134

135135
# End of https://www.toptal.com/developers/gitignore/api/swift,xcode,macos
136136
**/WordsAPI-Info.plist
137+
GoogleService-Info.plist

Chapter 12 - Wrapping existing APIs in Combine/WrappingExistingAPIsInCombine/WrappingExistingAPIsInCombine.xcodeproj/project.pbxproj

Lines changed: 43 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212
88161C4F2805932F0074084A /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 88161C4E2805932F0074084A /* Preview Assets.xcassets */; };
1313
88161C59280593A10074084A /* MenuScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88161C58280593A10074084A /* MenuScreen.swift */; };
1414
88161C5C280593DF0074084A /* SampleScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88161C5B280593DF0074084A /* SampleScreen.swift */; };
15-
88161C5F280594B40074084A /* FirebaseAuth in Frameworks */ = {isa = PBXBuildFile; productRef = 88161C5E280594B40074084A /* FirebaseAuth */; };
16-
88161C61280594B40074084A /* FirebaseFirestore in Frameworks */ = {isa = PBXBuildFile; productRef = 88161C60280594B40074084A /* FirebaseFirestore */; };
17-
88161C63280594B40074084A /* FirebaseFirestoreCombine-Community in Frameworks */ = {isa = PBXBuildFile; productRef = 88161C62280594B40074084A /* FirebaseFirestoreCombine-Community */; };
18-
88161C65280594B40074084A /* FirebaseFirestoreSwift-Beta in Frameworks */ = {isa = PBXBuildFile; productRef = 88161C64280594B40074084A /* FirebaseFirestoreSwift-Beta */; };
1915
88161C68280595B30074084A /* Book.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88161C67280595B30074084A /* Book.swift */; };
2016
88161C702805A8E00074084A /* OnDemandBookListViewWithClosures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88161C6F2805A8E00074084A /* OnDemandBookListViewWithClosures.swift */; };
21-
88161C722805AF4F0074084A /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 88161C712805AF4F0074084A /* GoogleService-Info.plist */; };
2217
88161C752805B2AE0074084A /* LiveBooksListViewWithCombine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88161C742805B2AE0074084A /* LiveBooksListViewWithCombine.swift */; };
2318
88161C772805E8940074084A /* LiveBooksListViewWithClosures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88161C762805E8940074084A /* LiveBooksListViewWithClosures.swift */; };
2419
88161C792805E9CB0074084A /* OnDemandBookListViewWithCombine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88161C782805E9CB0074084A /* OnDemandBookListViewWithCombine.swift */; };
2520
88161C7B2806D9490074084A /* OnDemandBookDetailsViewWithCombine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88161C7A2806D9490074084A /* OnDemandBookDetailsViewWithCombine.swift */; };
2621
88161C7D280821120074084A /* OnDemandBookDetailsViewWithClosures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88161C7C280821110074084A /* OnDemandBookDetailsViewWithClosures.swift */; };
22+
884CEC8728E84BD500C36882 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 884CEC8628E84BD500C36882 /* GoogleService-Info.plist */; };
23+
884CEC8D28E854C800C36882 /* FirebaseFirestore in Frameworks */ = {isa = PBXBuildFile; productRef = 884CEC8C28E854C800C36882 /* FirebaseFirestore */; };
24+
884CEC8F28E854C800C36882 /* FirebaseFirestoreCombine-Community in Frameworks */ = {isa = PBXBuildFile; productRef = 884CEC8E28E854C800C36882 /* FirebaseFirestoreCombine-Community */; };
25+
884CEC9128E854C800C36882 /* FirebaseFirestoreSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 884CEC9028E854C800C36882 /* FirebaseFirestoreSwift */; };
26+
884CEC9328E8555400C36882 /* FirebaseAuth in Frameworks */ = {isa = PBXBuildFile; productRef = 884CEC9228E8555400C36882 /* FirebaseAuth */; };
2727
/* End PBXBuildFile section */
2828

2929
/* Begin PBXFileReference section */
@@ -35,23 +35,23 @@
3535
88161C5B280593DF0074084A /* SampleScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleScreen.swift; sourceTree = "<group>"; };
3636
88161C67280595B30074084A /* Book.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Book.swift; sourceTree = "<group>"; };
3737
88161C6F2805A8E00074084A /* OnDemandBookListViewWithClosures.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnDemandBookListViewWithClosures.swift; sourceTree = "<group>"; };
38-
88161C712805AF4F0074084A /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
3938
88161C742805B2AE0074084A /* LiveBooksListViewWithCombine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LiveBooksListViewWithCombine.swift; sourceTree = "<group>"; };
4039
88161C762805E8940074084A /* LiveBooksListViewWithClosures.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LiveBooksListViewWithClosures.swift; sourceTree = "<group>"; };
4140
88161C782805E9CB0074084A /* OnDemandBookListViewWithCombine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnDemandBookListViewWithCombine.swift; sourceTree = "<group>"; };
4241
88161C7A2806D9490074084A /* OnDemandBookDetailsViewWithCombine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnDemandBookDetailsViewWithCombine.swift; sourceTree = "<group>"; };
4342
88161C7C280821110074084A /* OnDemandBookDetailsViewWithClosures.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnDemandBookDetailsViewWithClosures.swift; sourceTree = "<group>"; };
43+
884CEC8628E84BD500C36882 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
4444
/* End PBXFileReference section */
4545

4646
/* Begin PBXFrameworksBuildPhase section */
4747
88161C412805932D0074084A /* Frameworks */ = {
4848
isa = PBXFrameworksBuildPhase;
4949
buildActionMask = 2147483647;
5050
files = (
51-
88161C63280594B40074084A /* FirebaseFirestoreCombine-Community in Frameworks */,
52-
88161C65280594B40074084A /* FirebaseFirestoreSwift-Beta in Frameworks */,
53-
88161C5F280594B40074084A /* FirebaseAuth in Frameworks */,
54-
88161C61280594B40074084A /* FirebaseFirestore in Frameworks */,
51+
884CEC8D28E854C800C36882 /* FirebaseFirestore in Frameworks */,
52+
884CEC8F28E854C800C36882 /* FirebaseFirestoreCombine-Community in Frameworks */,
53+
884CEC9128E854C800C36882 /* FirebaseFirestoreSwift in Frameworks */,
54+
884CEC9328E8555400C36882 /* FirebaseAuth in Frameworks */,
5555
);
5656
runOnlyForDeploymentPostprocessing = 0;
5757
};
@@ -63,6 +63,7 @@
6363
children = (
6464
88161C462805932D0074084A /* WrappingExistingAPIsInCombine */,
6565
88161C452805932D0074084A /* Products */,
66+
884CEC8828E8532300C36882 /* Frameworks */,
6667
);
6768
sourceTree = "<group>";
6869
};
@@ -82,7 +83,7 @@
8283
88161C66280595A40074084A /* Models */,
8384
88161C692805A85C0074084A /* Features */,
8485
88161C4B2805932F0074084A /* Assets.xcassets */,
85-
88161C712805AF4F0074084A /* GoogleService-Info.plist */,
86+
884CEC8628E84BD500C36882 /* GoogleService-Info.plist */,
8687
88161C4D2805932F0074084A /* Preview Content */,
8788
);
8889
path = WrappingExistingAPIsInCombine;
@@ -182,6 +183,13 @@
182183
path = Views;
183184
sourceTree = "<group>";
184185
};
186+
884CEC8828E8532300C36882 /* Frameworks */ = {
187+
isa = PBXGroup;
188+
children = (
189+
);
190+
name = Frameworks;
191+
sourceTree = "<group>";
192+
};
185193
/* End PBXGroup section */
186194

187195
/* Begin PBXNativeTarget section */
@@ -199,10 +207,10 @@
199207
);
200208
name = WrappingExistingAPIsInCombine;
201209
packageProductDependencies = (
202-
88161C5E280594B40074084A /* FirebaseAuth */,
203-
88161C60280594B40074084A /* FirebaseFirestore */,
204-
88161C62280594B40074084A /* FirebaseFirestoreCombine-Community */,
205-
88161C64280594B40074084A /* FirebaseFirestoreSwift-Beta */,
210+
884CEC8C28E854C800C36882 /* FirebaseFirestore */,
211+
884CEC8E28E854C800C36882 /* FirebaseFirestoreCombine-Community */,
212+
884CEC9028E854C800C36882 /* FirebaseFirestoreSwift */,
213+
884CEC9228E8555400C36882 /* FirebaseAuth */,
206214
);
207215
productName = WrappingExistingAPIsInCombine;
208216
productReference = 88161C442805932D0074084A /* WrappingExistingAPIsInCombine.app */;
@@ -233,7 +241,7 @@
233241
);
234242
mainGroup = 88161C3B2805932D0074084A;
235243
packageReferences = (
236-
88161C5D280594B40074084A /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */,
244+
884CEC8B28E854C800C36882 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */,
237245
);
238246
productRefGroup = 88161C452805932D0074084A /* Products */;
239247
projectDirPath = "";
@@ -249,9 +257,9 @@
249257
isa = PBXResourcesBuildPhase;
250258
buildActionMask = 2147483647;
251259
files = (
252-
88161C722805AF4F0074084A /* GoogleService-Info.plist in Resources */,
253260
88161C4F2805932F0074084A /* Preview Assets.xcassets in Resources */,
254261
88161C4C2805932F0074084A /* Assets.xcassets in Resources */,
262+
884CEC8728E84BD500C36882 /* GoogleService-Info.plist in Resources */,
255263
);
256264
runOnlyForDeploymentPostprocessing = 0;
257265
};
@@ -400,14 +408,15 @@
400408
CODE_SIGN_STYLE = Automatic;
401409
CURRENT_PROJECT_VERSION = 1;
402410
DEVELOPMENT_ASSET_PATHS = "\"WrappingExistingAPIsInCombine/Preview Content\"";
403-
DEVELOPMENT_TEAM = YGAZHQXHH4;
411+
DEVELOPMENT_TEAM = "";
404412
ENABLE_PREVIEWS = YES;
405413
GENERATE_INFOPLIST_FILE = YES;
406414
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
407415
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
408416
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
409417
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
410418
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
419+
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
411420
LD_RUNPATH_SEARCH_PATHS = (
412421
"$(inherited)",
413422
"@executable_path/Frameworks",
@@ -429,14 +438,15 @@
429438
CODE_SIGN_STYLE = Automatic;
430439
CURRENT_PROJECT_VERSION = 1;
431440
DEVELOPMENT_ASSET_PATHS = "\"WrappingExistingAPIsInCombine/Preview Content\"";
432-
DEVELOPMENT_TEAM = YGAZHQXHH4;
441+
DEVELOPMENT_TEAM = "";
433442
ENABLE_PREVIEWS = YES;
434443
GENERATE_INFOPLIST_FILE = YES;
435444
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
436445
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
437446
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
438447
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
439448
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
449+
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
440450
LD_RUNPATH_SEARCH_PATHS = (
441451
"$(inherited)",
442452
"@executable_path/Frameworks",
@@ -474,36 +484,36 @@
474484
/* End XCConfigurationList section */
475485

476486
/* Begin XCRemoteSwiftPackageReference section */
477-
88161C5D280594B40074084A /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = {
487+
884CEC8B28E854C800C36882 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = {
478488
isa = XCRemoteSwiftPackageReference;
479489
repositoryURL = "https://github.com/firebase/firebase-ios-sdk";
480490
requirement = {
481491
kind = upToNextMajorVersion;
482-
minimumVersion = 8.0.0;
492+
minimumVersion = 9.0.0;
483493
};
484494
};
485495
/* End XCRemoteSwiftPackageReference section */
486496

487497
/* Begin XCSwiftPackageProductDependency section */
488-
88161C5E280594B40074084A /* FirebaseAuth */ = {
498+
884CEC8C28E854C800C36882 /* FirebaseFirestore */ = {
489499
isa = XCSwiftPackageProductDependency;
490-
package = 88161C5D280594B40074084A /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
491-
productName = FirebaseAuth;
492-
};
493-
88161C60280594B40074084A /* FirebaseFirestore */ = {
494-
isa = XCSwiftPackageProductDependency;
495-
package = 88161C5D280594B40074084A /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
500+
package = 884CEC8B28E854C800C36882 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
496501
productName = FirebaseFirestore;
497502
};
498-
88161C62280594B40074084A /* FirebaseFirestoreCombine-Community */ = {
503+
884CEC8E28E854C800C36882 /* FirebaseFirestoreCombine-Community */ = {
499504
isa = XCSwiftPackageProductDependency;
500-
package = 88161C5D280594B40074084A /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
505+
package = 884CEC8B28E854C800C36882 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
501506
productName = "FirebaseFirestoreCombine-Community";
502507
};
503-
88161C64280594B40074084A /* FirebaseFirestoreSwift-Beta */ = {
508+
884CEC9028E854C800C36882 /* FirebaseFirestoreSwift */ = {
504509
isa = XCSwiftPackageProductDependency;
505-
package = 88161C5D280594B40074084A /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
506-
productName = "FirebaseFirestoreSwift-Beta";
510+
package = 884CEC8B28E854C800C36882 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
511+
productName = FirebaseFirestoreSwift;
512+
};
513+
884CEC9228E8555400C36882 /* FirebaseAuth */ = {
514+
isa = XCSwiftPackageProductDependency;
515+
package = 884CEC8B28E854C800C36882 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
516+
productName = FirebaseAuth;
507517
};
508518
/* End XCSwiftPackageProductDependency section */
509519
};

Chapter 12 - Wrapping existing APIs in Combine/WrappingExistingAPIsInCombine/WrappingExistingAPIsInCombine.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

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

Chapter 12 - Wrapping existing APIs in Combine/WrappingExistingAPIsInCombine/WrappingExistingAPIsInCombine/App/WrappingExistingAPIsInCombineApp.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ struct WrappingExistingAPIsInCombineApp: App {
2727

2828
var body: some Scene {
2929
WindowGroup {
30-
NavigationView {
30+
NavigationStack {
3131
MenuScreen()
3232
}
3333
}

Chapter 12 - Wrapping existing APIs in Combine/WrappingExistingAPIsInCombine/WrappingExistingAPIsInCombine/Features/Combine/Views/LiveBooksListViewWithCombine.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ private class BookListViewModel: ObservableObject {
1818

1919
private var db = Firestore.firestore()
2020
private var cancellable: AnyCancellable?
21-
21+
2222
func subscribe() {
2323
cancellable = db.collection("books").snapshotPublisher()
2424
.tryMap { querySnapshot in

Chapter 12 - Wrapping existing APIs in Combine/WrappingExistingAPIsInCombine/WrappingExistingAPIsInCombine/Features/Menu/Views/MenuScreen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ struct MenuScreen: View {
4343

4444
struct MenuScreen_Previews: PreviewProvider {
4545
static var previews: some View {
46-
NavigationView {
46+
NavigationStack {
4747
MenuScreen()
4848
}
4949
}

0 commit comments

Comments
 (0)