@Rosa @f You're going to need to inject a mock CLLocationManager into your view model for previews. You're going to want to watch @pointfreeco videos 110-114. They answer all of these questions. They actually use a weather app as the example that also uses CLLocationManager. The episodes are behind a paywall, but I absolutely recommend buying at least a months subscription.
https://www.pointfree.co/episodes/ep110-designing-dependencies-the-problem