Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Annotation classes don’t conform to NSCoding #6200

Closed
1ec5 opened this issue Aug 29, 2016 · 3 comments
Closed

Annotation classes don’t conform to NSCoding #6200

1ec5 opened this issue Aug 29, 2016 · 3 comments
Labels
annotations Annotations on iOS and macOS or markers on Android bug iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS
Milestone

Comments

@1ec5
Copy link
Contributor

1ec5 commented Aug 29, 2016

The following classes don’t conform to NSSecureCoding but probably should (and could without much fuss):

  • MGLAnnotationImage
  • MGLAnnotationView
  • MGLShape
  • MGLUserLocation
  • MGLUserLocationAnnotationView

The developer may want to archive an instance of one of these classes for state restoration or some other kind of persistence, but they’ll run into a missing implementation in doing so:

-[MGLUserLocation encodeWithCoder:]: unrecognized selector sent to instance 0x60800024b820

/cc @friedbunny

@1ec5 1ec5 added bug iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS annotations Annotations on iOS and macOS or markers on Android labels Aug 29, 2016
@1ec5 1ec5 added this to the ios-v3.4.0 milestone Sep 30, 2016
@1ec5
Copy link
Contributor Author

1ec5 commented Sep 30, 2016

We might be able to generalize #6524 to cover all the shape subclasses, making this task a lot easier.

MGLUserLocationAnnotation is tricker to code because of its use of a delegate pattern and a weak backpointer to MGLMapView. We should just omit those problematic properties from the coded representation.

@1ec5
Copy link
Contributor Author

1ec5 commented Dec 6, 2016

Work towards this issue is happening in #6559.

@1ec5
Copy link
Contributor Author

1ec5 commented Dec 22, 2016

Fixed by #6559 on release-ios-v3.4.0 branch.

@1ec5 1ec5 closed this as completed Dec 22, 2016
@1ec5 1ec5 modified the milestones: ios-v3.4.0, ios-3.4.1 Dec 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
annotations Annotations on iOS and macOS or markers on Android bug iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS
Projects
None yet
Development

No branches or pull requests

2 participants