If you implement -[MGLOfflineStorageDelegate offlineStorage:URLForResourceOfKind:] to redirect a resource URL to a local file URL, such as the URL of a resource bundled with the application, the request fails because the URL response doesn’t come over HTTP:
To reproduce this issue, set MGLOfflineStorage.delegate to a class that implements -[MGLOfflineStorageDelegate offlineStorage:URLForResourceOfKind:] like so:
16428 fixes this particular error in a tightly scoped way, which I think is valid. However, I think it’s worth investigating whether local file URLs returned by the delegate should end up going through mbgl::LocalFileSource instead of mbgl::HTTPFileSource, just as they would when loading a style from a file URL.
If you implement
-[MGLOfflineStorageDelegate offlineStorage:URLForResourceOfKind:]
to redirect a resource URL to a local file URL, such as the URL of a resource bundled with the application, the request fails because the URL response doesn’t come over HTTP:https://github.com/mapbox/mapbox-gl-native/blob/9f8c9c61e87868510ee2951c93044c4995478641/platform/darwin/src/http_file_source.mm#L375-L377
To reproduce this issue, set
MGLOfflineStorage.delegate
to a class that implements-[MGLOfflineStorageDelegate offlineStorage:URLForResourceOfKind:]
like so:/cc @mapbox/maps-ios