Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Rename ambient cache prewarming method #13318

Merged
merged 1 commit into from
Nov 8, 2018
Merged

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented Nov 8, 2018

Renamed -[MGLOfflineStorage putResourceWithUrl:data:modified:expires:etag:mustRevalidate:] to -[MGLOfflineStorage preloadData:forURL:modificationDate:expirationDate:eTag:mustRevalidate:] to conform to Cocoa naming guidelines in Objective-C and Swift API design guidelines in Swift.

/ref #13119
/cc @fabian-guerra @ChrisLoer

@1ec5 1ec5 added iOS Mapbox Maps SDK for iOS refactor macOS Mapbox Maps SDK for macOS offline labels Nov 8, 2018
@1ec5 1ec5 added this to the release-i milestone Nov 8, 2018
@1ec5 1ec5 self-assigned this Nov 8, 2018
Renamed the method for prewarming the ambient cache to conform to Cocoa and Swift naming conventions.
@1ec5 1ec5 force-pushed the 1ec5-offline-put-rename branch from 8b9d3f6 to 6d9f13e Compare November 8, 2018 07:54
Copy link
Contributor

@ChrisLoer ChrisLoer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a great improvement to me, as you can see the names I exposed weren't pre-meditated, they were just reflecting the underlying mbgl-core methods.

cc @LukasPaczos -- although naming guidelines are a little different on Android, something like this change would probably be an improvement there (and keep the two platform SDKs closer together).

@1ec5
Copy link
Contributor Author

1ec5 commented Nov 8, 2018

as you can see the names I exposed weren't pre-meditated, they were just reflecting the underlying mbgl-core methods.

Yep, no worries. One thing to note that the new method name follows the “set [value] for [key]” pattern that’s peculiar to Objective-C and Swift. In most other languages, the idiom is “set [key] to [value]” instead.

@1ec5 1ec5 merged commit d13cd54 into master Nov 8, 2018
@1ec5 1ec5 deleted the 1ec5-offline-put-rename branch November 8, 2018 22:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS offline refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants