ably / ably-asset-tracking-swift

iOS client SDKs for the Ably Asset Tracking service.
Apache License 2.0
9 stars 6 forks source link

Consider replacing Apple maps with Mapbox maps in the publisher example app #392

Closed KacperKluka closed 2 years ago

KacperKluka commented 2 years ago

Since AAT SDK uses Mapbox Nav SDK which relies on Mapbox Maps SDK, we could benefit from using the Mapbox maps SDK to see how it works together. We did that on Android and it allowed us to detect issues before the SDK is released. Therefore, it might be a good idea to do the same on iOS example apps.

lawrence-forooghian commented 2 years ago

I think that if we do this, we should have an option to use the iOS maps too, since it's quite possible that some of our customers won't want to pay to use Mapbox's maps. Also, using the iOS maps revealed https://github.com/ably/ably-asset-tracking-swift/issues/398.

KacperKluka commented 2 years ago

The SDK is overall map agnostic so customers should be able to use whatever they like. The main reason behind using Mapbox maps in the publisher app is to make sure that AAT SDK works well with Mapbox Maps (previously we had some compatibility issues on Android between AAT and Mapbox Maps). But we can still be using Apple maps in the subscriber example app 👍

lawrence-forooghian commented 2 years ago

Yeah, I think that if we want to check compatibility with AAT publisher and Mapbox Maps, then it's good to have the option to use Mapbox maps in the publisher app. But I think we should keep the option to use Apple maps in the publisher apps too, perhaps with a toggle.

lawrence-forooghian commented 2 years ago

So, the work here would be roughly:

Here is Mapbox's guide on how to display maps using their SDK. Specifically, the above-mentioned features:

As they mention there, they don't have any native SwiftUI support, so we'd need to use UIViewRepresentable. I haven't used that before and am not sure how complicated it is, but since our SwiftUI view would only need to expose a couple of properties (camera position, annotation locations) it hopefully wouldn't be too bad.

And then we'd need to create further issues if it turns out there are some compatibility issues between the asset tracking SDK and Mapbox maps (as there were on Android).

lawrence-forooghian commented 2 years ago

We have a client who will be using Mapbox on their iOS publisher, so we'll want to implement this as a priority, to check compatibility with our SDK.