This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
[ios, macos] Convert various class methods to class properties - #11674
Merged
Merged
Conversation
1ec5
reviewed
Apr 13, 2018
|
|
||
| /// Returns the shared instance of the `MGLAccountManager` class. | ||
| + (instancetype)sharedManager; | ||
| @property (class, nonatomic, readonly) MGLAccountManager *sharedManager; |
Contributor
There was a problem hiding this comment.
The use of nonatomic for these class properties is consistent with previous behavior when these properties were class methods. atomic is a remnant of cargo-cult programming that resulted in excessive locking and dispatching early on.
| * Removed support for 32-bit simulators. ([#10962](https://github.com/mapbox/mapbox-gl-native/pull/10962)) | ||
| * Added Danish and Hebrew localizations. ([#10967](https://github.com/mapbox/mapbox-gl-native/pull/10967), [#11136](https://github.com/mapbox/mapbox-gl-native/pull/11134)) | ||
| * Removed methods, properties, and constants that had been deprecated as of v3.7.4. ([#11205](https://github.com/mapbox/mapbox-gl-native/pull/11205)) | ||
| * Refined certain Swift interfaces by converting them from class methods to class properties. ([#11674](https://github.com/mapbox/mapbox-gl-native/pull/11674)) |
Contributor
There was a problem hiding this comment.
Please add the same blurb to the macOS changelog. Thanks!
Contributor
|
Some auxiliary content to update: |
Contributor
Author
|
This is ready for review. 🙋♂️ |
This improves the Swift interface while having no effect on Obj-C usage.
friedbunny
force-pushed
the
fb-objc-class-properties
branch
from
April 16, 2018 22:44
24d13e1 to
d4e597e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6778. This improves our Swift interface in an unavoidably breaking way while mostly having no effect on Obj-C usage.
For example, before → after:
MGLStyle.streetsStyleURL()→MGLStyle.streetsStyleURLMGLOfflineStorage.shared()→MGLOfflineStorage.sharedMGLAccountManager.setAccessToken("foo")→MGLAccountManager.accessToken = "foo”This also updates a variety of internal/undocumented classes in a similar way — this doesn’t really matter while we’re using Obj-C, but future-proofs potential Swiftification.
To-do (suggestions welcome)
Improve changelog entry.nonatomic?/cc @mapbox/maps-ios