A bug in Apple tutorial? Or what I'm doing wrong?

Hello everyone,

I'm an aspiring iOS developer and I've just started following official SwiftUI tutorial which I've found very nice.

However, on the second chapter I've encountered this error "Cannot find type 'xxxx' in scope" and I couldn't resolve it no matter what I tried.

Would you please help? Thank you very much!

Here xcode says it cannot find "Image" (line 12) and "CLLocationCoordinate2D" (on line 17) in scope.

Code Block
import Foundation
struct Landmark: Hashable, Codable {
  var id: Int
  var name: String
  var park: String
  var state: String
  var description: String
   
  private var imageName: String
  var image: Image {
    Image(imageName)
  }
   
  private var coordinates: Coordinates
   
  var locationCoordinate: CLLocationCoordinate2D {
    CLLocationCoordinate2D(
      latitude: coordinates.latitude,
      longitude: coordinates.longitude)
  }
    struct Coordinates: Hashable, Codable {
      var latitude: Double
      var longitude: Double
    }
   
}



Answered by workingdogintokyo in 672959022
you are missing these frameworks:

Code Block
import SwiftUI
import CoreLocation

Accepted Answer
you are missing these frameworks:

Code Block
import SwiftUI
import CoreLocation

Thank you! Resolved.
A bug in Apple tutorial? Or what I'm doing wrong?
 
 
Q