I have a problem when I try to load an offline mapbox map in my iOS app. In the documentation below, they don't explain how to load the map after downloading. https://www.mapbox.com/ios-sdk/maps/examples/offline-pack/
Now, in order to load the offline map I added this code that copy the cache.db file from the temporary cache to the valid path as described in this link https://github.com/mapbox/mapbox-gl-native/wiki/Sideloading-offline-maps
let sourceURL = NSURL(fileURLWithPath:"\(NSHomeDirectory())/Library/Application Support/*****************/.mapbox/cache.db")
let TemporaryPathURL = NSURL(fileURLWithPath: "\(NSHomeDirectory())/Documents/***********")
let databaseURL = TemporaryPathURL.appendingPathComponent("cache.db")
if !(FileManager.default.fileExists(atPath: (databaseURL?.absoluteString)!)) {
do {
try? FileManager.default.copyItem(at: sourceURL as URL, to: databaseURL!)
} catch {
print ("ERROR: Fichier existant !!!!")
}
}
but I didn't get the map region offline!!!! any help please
Best regards.