Post

A while ago I shared some of my findings with #MapKit when developing #WaterMapper. Gather I shared them on Twitter, so I want to port them to here.

I came to the conclusion that #SwiftUI’s MapKit is not yet ready. When building out my app with the Clustering of annotations the limitations became clear. I switched to #UIKit’s MKMapView using a UIViewRepresentable and clustering is working amazing.

The next step is the optimization of the interoperability between #UIKit and #SwiftUI’s state.

It still feels strange. First I build the Map using #SwiftUI’s #MapKit starting from iOS 16, then migrate to the new Map for iOS 17 users and up. This migration already opened up a lot of neat features and modifiers.

But, if you need clustering, like I did, you’ll find out that you need to migrate (again). Even ‘back to’ #UIKit - it feels off.

Conclusion of the story, know what you are working with, and know what went before you. #SwiftUI is great, but not the best always.

0 reposts0 likes

No replies yet.