Enable MKMapSnapshotter to work in the background

Originator:robotspacer
Number:rdar://25711519 Date Originated:13-Apr-2016 04:56 PM
Status:Open Resolved:
Product:iOS SDK Product Version:9.3.1
Classification:Enhancement Reproducible:N/A
 
Summary:
My particular use case is related to watchOS. MapKit on watchOS is very limited, and I need a small map display that mirrors what's shown in my iOS app. After moving to watchOS 2 this requires a lot of back and forth communication. Then I realized that I could greatly improve the maps in my watch app by just using MKMapSnapshotter to create a JPEG on the iPhone and transfer that to the watch. That even let me use MKOverlayPathRenderer which is extremely useful in my case. Because of the work involved, and because the iPhone may already have some of the location data I need, this actually seemed like the perfect solution.

But it turns out MKMapSnapshotter won't return a snapshot while the iPhone app is in the background. So I have to scrap it. It's a shame, because having those overlays really made the maps look great.

Steps to Reproduce:
1. Create an instance of MKMapSnapshotter
2. Call startWithCompletionHandler: or startWithQueue:completionHandler: while the app is in the background

Expected Results:
Well, if I read the documentation before trying it I would have expected exactly what happened :) It would be great if it returned a snapshot even when the app is in the background though.

Actual Results:
As described in the docs, the completion handler won't get called unless the app is brought to the foreground.

Version:
iOS 9.3.1

Notes:


Configuration:
iPhone 6s, 128GB, AT&T

Attachments:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!