[TIMOB-28500] iOS: Update "ti.map" module for iOS 15
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2021-09-07T15:28:24.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 10.1.0 |
Components | iOS |
Labels | ios, map, module |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2021-07-01T02:11:17.000+0000 |
Updated | 2021-09-07T15:28:24.000+0000 |
Description
*Summary:*
We need to update this module to address iOS 15's breaking-changes with map markers/annotations.
https://developer.apple.com/documentation/mapkit/mkpinannotationview
*To-Do:*
Replace usage of the [MKPinAnnotationView ](https://developer.apple.com/documentation/mapkit/mkpinannotationview) class with [MKMarkerAnnotationView ](https://developer.apple.com/documentation/mapkit/mkmarkerannotationview).
https://github.com/appcelerator-modules/ti.map/blob/master/ios/Classes/TiMapPinAnnotationView.h
https://github.com/appcelerator-modules/ti.map/blob/master/ios/Classes/TiMapAnnotationProxy.m
https://github.com/appcelerator-modules/ti.map/blob/master/ios/Classes/TiMapView.m
*Note:*
This will change the appearance from the old pin style to Apple's new circular marker style, which matches the behavior in Apple's "Maps" app.
||Old Marker Style||New Marker Style||
| !MapMarkerOld.png|thumbnail! | !MapMarkerNew.png|thumbnail! |
Attachments
File | Date | Size |
---|---|---|
MapMarkerNew.png | 2021-07-20T00:15:47.000+0000 | 1273608 |
MapMarkerOld.png | 2021-07-20T00:15:47.000+0000 | 1282868 |
Hey Josh, you sure that this is a breaking change? Looking at the docs, it's just deprecated, not removed, yet. In any case, I am happy to take this over! Super easy change. And since Titanium is iOS 11+ anyways, the MKMarkerAnnotationView can be used without complex guards.
PR: https://github.com/appcelerator-modules/ti.map/pull/459
Thanks [~hknoechel]! Right, we don't "need" to do it. I just wanted to do the right thing and address the deprecation warnings. I probably shouldn't have referred to it as breaking-changes since it isn't breaking... yet. (The Titanium SDK has several deprecation warnings on iOS too which I think I should address to extend the SDK's life.)
PR (titanium_mobile): https://github.com/appcelerator/titanium_mobile/pull/12967