Trying to add a map to a watchOS 5 app

I'm trying to add a map to a watchOS 5 app. Currently, I'm running only on the Simulator.


I can see my pin annotation, but not the map itself. Any help would be appreciated.


Code:


@IBOutlet weak var stationMap: WKInterfaceMap!
   
    var locationManager: CLLocationManager!
    var location = CLLocationCoordinate2D()
    var region = MKCoordinateRegion()
  
    var lat: Double!
    var lon: Double!


override func willActivate() {
        // This method is called when watch view controller is about to be visible to user
        super.willActivate()
        
        location.latitude = (CLLocationDegrees(lat))
        location.longitude = (CLLocationDegrees(lon))
        
        //NSLog(@"Map: mapDetailArray: %@", self.mapDetailArray);
        
        locationManager = CLLocationManager()
        let spanX: Float = 0.005
        let spanY: Float = 0.005
        
        
        region.center = location
        region.span.latitudeDelta = CLLocationDegrees(spanX)
        region.span.longitudeDelta = CLLocationDegrees(spanY)
        stationMap.setRegion(region)
        
        
        stationMap.addAnnotation(location, with: .red)
    }

Replies

I looked at the 5.3 beta release notes. There seemed to be a workaround to using my physical watch instead of the simulator. The command is:


defaults write com.apple.dt.Xcode Enable43515398 -bool YES


That also does not work for me.