File tree Expand file tree Collapse file tree
Sources/MapboxMaps/Offline Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ Mapbox welcomes participation and contributions from everyone.
55## main
66
77## 11.23.0-rc.1 - 20 April, 2026
8+ * Use TileStore::setRootPath(path) and TileStore::create() instead of deprecated TileStore::create(path).
9+ * Add setRootPath method to TileStore swift wrapper.
810
911## 11.20.3 - 14 April, 2026
1012## 11.22.0 - 16 April, 2026
Original file line number Diff line number Diff line change @@ -30,7 +30,25 @@ extension TileStore: TileStoreProtocol {
3030 guard filePathURL. isFileURL else {
3131 fatalError ( " You must provide a file URL " )
3232 }
33- return TileStore . __create ( forPath: filePathURL. path)
33+ // If setRootPathForPath fails because we already have TileStore initialized with the different path,
34+ // we already log error in the native code.
35+ TileStore . __setRootPathForPath ( filePathURL. path)
36+ return TileStore . __create ( )
37+ }
38+
39+ /// Configure the path on disk where tiles and metadata will be stored. This path will be used by create() method as a default location.
40+ /// Method should be invoked before TileStore instance creation. In case TileStore already created with another path method will have no
41+ /// effect and error will be logged.
42+ ///
43+ /// If root path was set before to another value, the data from the previous location is not copied.
44+ /// Setting is not persistent.
45+ ///
46+ /// - Parameter filePathURL: The path on disk where tiles and metadata will be stored
47+ public static func setRootPath( _ filePathURL: URL ) {
48+ guard filePathURL. isFileURL else {
49+ fatalError ( " You must provide a file URL " )
50+ }
51+ TileStore . __setRootPathForPath ( filePathURL. path)
3452 }
3553
3654 /// Loads a new tile region or updates the existing one.
You can’t perform that action at this time.
0 commit comments