# MGLOfflineStorageDelegate

    @protocol MGLOfflineStorageDelegate <NSObject>

The `MGLOfflineStorageDelegate` protocol defines methods that a delegate of an `MGLOfflineStorage` object can optionally implement to transform various types of URLs before downloading them via the internet.

- `-offlineStorage:URLForResourceOfKind:withURL:`

  Sent whenever a URL needs to be transformed.

  #### Declaration

  Objective-C

      - (nonnull NSURL *)offlineStorage:(nonnull MGLOfflineStorage *)storage
                   URLForResourceOfKind:(MGLResourceKind)kind
                                withURL:(nonnull NSURL *)url;

  Swift

      func offlineStorage(_ storage: MGLOfflineStorage, urlForResourceOf kind: MGLResourceKind, with url: URL) -> URL

  #### Parameters

  `storage` | The storage object processing the download.
  `kind` | The kind of URL to be transformed.
  `url` | The original URL to be transformed.

  #### Return Value

  A URL that will now be downloaded.

  View Source on GitHub