Adding this code to the last line worked for me:
PlaygroundPage.current.liveView = MKMapView(frame: CGRect(x: 0, y: 0, width: 400, height: 800))
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: