MapCache icon indicating copy to clipboard operation
MapCache copied to clipboard

Problem with region download

Open spyrosskordos opened this issue 4 years ago • 5 comments

I followed the example with the region downloader but the tiles are not persist when downloaded

spyrosskordos avatar May 03 '20 11:05 spyrosskordos

Thanks @spyrosskordos. Can you elaborate on that?

merlos avatar May 03 '20 15:05 merlos

I download the tiles successfully but when I kill the app the tiles are removed and the app storage is back to default

spyrosskordos avatar May 03 '20 16:05 spyrosskordos

Do you have any suggestion ? I downloaded and the example and still the same happens

spyrosskordos avatar May 05 '20 18:05 spyrosskordos

Simulator or device?

I just opened the instance of the example I used some days ago in my phone in Air Plane mode and it loaded the tiles.

Note that MapCache files are stored a type of folder that is intended for temporary files, files that can be wiped out by the OS if it considers necessary, one option is to modify that folder to a regular folder. (https://github.com/merlos/MapCache/blob/master/MapCache/Classes/DiskCache/DiskCache.swift)

Also you can inspect the folder where the cache is in the simulator to check if the files are still there.

Run this command in Xcode debugger console:

po NSHomeDirectory()

Inside that folder you have the Library/Cache subfolder.

I hope this helps.

merlos avatar May 06 '20 10:05 merlos

device...so I can replace disk cache for example with realm to be more persist ...or cache disk reliable?

spyrosskordos avatar May 07 '20 18:05 spyrosskordos