Release Notes for SwiftUI Tutorials

When browsing the new SwiftUI Tutorials in Xcode, please take note of the following items mentioned in the Xcode 11 Beta Release notes:


1. After following Section 7, Step 7 in the Building Lists and Navigation tutorial, you might encounter an error in your project’s

SceneDelegate.swift
file.

Workaround: Update line 14 of

SceneDelegate.swift
to use
LandmarkList
instead of
LandmarkDetail
:
window.rootViewController = UIHostingController(rootView: LandmarkList())


2. After following Section 5, Step 3 in the Handling User Input tutorial, you might encounter an error in the preview provider.

Workaround: Undo the change to the

LandmarkDetail
initializer, so that you only add the
environmentObject(_:)
modifier:
struct LandmarkDetail_Preview: PreviewProvider {
  static var previews: some View {
  LandmarkDetail(landmark: landmarkData[0])
  .environmentObject(UserData())
  }
}


The web version of the SwiftUI Tutorials has the correct steps.

Just a small note: On section 7 step 2, I'm running into a problem. The tutorial says to write

Image(name: "turtlerock")

but Xcode tells me it should be

Image(systemName: "turtlerock")

I think I found a mistake in the project files for Handling User Input. The "Starting Point" files have the first step already completed. The tutorial says "add a star image inside an if statement..." but the star image in the if statement already exists in the file LandmarkRow.swift

While I'm providing feedback, I'd like to mention that if you have the tutorial open in a narrow browser window (where the layout changes to a single column) its very difficult to tell if the code sample has more changes than are visible in the first 5 lines. If changes happen throughout the file, its necessary to click the name of the file to see a full view of it. I found myself wondering where I went wrong before realizing I had to expand the code. This is noticable in "Responding to User Input" section 3 step 1.

There's a typo in "Handling User Input", "Create a Favorite Button for Each Landmark" step 3. It says "In LandmarList.swift, and turn on the live preview". I believe "and" wasn't meant to be there.


The video for this step isn't visible when the browser is narrow and the page goes into single column view.

The animating views and transitions tutorial “animate the effects of state changes” step 2 code has a missing { after “extension AnyTransition”

Release Notes for SwiftUI Tutorials
 
 
Q