-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[ios] black screen with offline maps #4643
Comments
Where are you checking the number of packs? That array is populated asynchronously and may be nil for an undefined period of time after launch. You should register for KVO change notifications on that key path and only start the download when the change kind is NSChangeKindSetting. The SDK doesn't handle displaying the network activity indicator – your application can manage that. /cc @friedbunny |
@1ec5 in |
I wonder if that's too soon. Can you check whether packs is in fact nil rather than empty? (The code you posted above doesn't distinguish.) If it's nil, you should try KVO to detect when the packs are discovered. See MBXOfflinePacksTableViewController for inspiration. |
@1ec5 not nil...(
Well i think i found problem. [[YMapDownloader downloader] startOfflinePackDownload]; +(YMapDownloader *)downloader {
return [[YMapDownloader alloc] init];
} YMapDownloader instance dying very fast, so i didn't get notifications, but as i understand pack was loading. And the last question, is it possible to check for packs on application start? |
It isn't possible to check synchronously at application launch, unfortunately. |
@1ec5 Two more question please :)
|
I have same questions:
|
See the offline storage documentation for more information about notifications and progress. |
iOS
MapBox 3.2.0
Hello, i have problems with downloading offline package.
Firstly I hope i check right if offline pack available, because if i had offline pack i don't need to download it again.
YMapDownloader
is myNSObject
, where i put code from official example, here is full code of my classhow i create region
so when i call
startOfflinePackDownload
i start downloadingBut i don't get any notification about progress, even no
NetworkActivityIndicator
in status bar.After i don't see any activity i try to open map and it was black, i mean black screen, no map. When i commented pack downloading, recompile app and open map i start get warnings:
so as i understand it's connected #4411
Steps to trigger behavior
Use code from example but with this region:
Expected behavior
Downloaded offline pack.
Actual behavior
No pack downloaded.
The text was updated successfully, but these errors were encountered: