mbxmapkit icon indicating copy to clipboard operation
mbxmapkit copied to clipboard

Intermediate state between Available and Running on MBXOfflineMapDownloader

Open lightandshadow68 opened this issue 11 years ago • 2 comments

I'm running into an issue when submitting download requests to MBXOfflineMapDownloader in our app.

Specifically, I attempt to submit / resume downloads for pending map regions under multiple scenarios, including when the device comes online. This can result in what appears to be a race condition due to a delay in transitioning between MBXOfflineMapDownloaderStateAvailable and MBXOfflineMapDownloaderStateRunning. The result is an assertion failure on line 802.

Currently, my workaround is to create and set a _hasSubmittedDownload flag to YES in my calling class when submitting a download, checking this flag before future download requests, then setting it to NO when the delegate call indicates the downloader has actually transitioned to MBXOfflineMapDownloaderStateRunning.

Adding an additional state, such as MBXOfflineMapDownloaderStateInitializing would be a preferred solution.

lightandshadow68 avatar Jul 10 '14 19:07 lightandshadow68

I wonder if this might be related to #107

ghost avatar Jul 10 '14 19:07 ghost

@lightandshadow68 Still seeing this?

incanus avatar Aug 27 '14 01:08 incanus