I am attempting to open the Maps app upon tapping on an annotation callout accessory, which works fine, except when I pass a dictionary containing a MKMapCamera*
as value for MKLaunchOptionsCameraKey
. (This is to open Maps with a 3D scene loaded)
This is how it should work according to the docs; is this a bug or am I missing something? Do I need to serialize the camera object into an NSData
object?
NSLog tells me :
Property List invalid for format: 200 (property lists cannot contain objects of type 'CFType')
MKMapCamera* camera = [MKCamera cameraLookingAtCenterCoordinate: [view.annotation coordinate]
fromEyeCoordinate:CLLocationCoordinate2DMake ([view.annotation coordinate].latitude + .01 , [view.annotation coordinate].longitude + .01 )
eyeAltitude:10];
NSDictionary* options = @{MKLaunchOptionsCameraKey : camera};
[mapItem openInMapsWithLaunchOptions:options];
Like I said, it works fine if the dictionary is say:
NSDictionary* options = @{MKLaunchOptionsDirectionsModeKey : MKLaunchDirectionsModeDriving };
[mapItem openInMapsWithLaunchOptions:options];
I thought Objective-C objects were valid property-list (and Dictionary) entries, so what gives? Any insight would be appreciated.