summaryrefslogtreecommitdiff
path: root/platform/ios
diff options
context:
space:
mode:
Diffstat (limited to 'platform/ios')
-rw-r--r--platform/ios/CHANGELOG.md1
-rw-r--r--platform/ios/Mapbox.playground/Contents.swift2
-rw-r--r--platform/ios/docs/guides/Info.plist Keys.md2
-rw-r--r--platform/ios/scripts/script_resources/MapboxDemo/MapboxDemo/ViewController.swift2
-rw-r--r--platform/ios/src/MGLTelemetryConfig.h2
5 files changed, 5 insertions, 4 deletions
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md
index 0d01d9a828..217c6b4b71 100644
--- a/platform/ios/CHANGELOG.md
+++ b/platform/ios/CHANGELOG.md
@@ -11,6 +11,7 @@ The 4.0._x_ series of releases will be the last to support iOS 8. The minimum iO
* 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.6. ([#11205](https://github.com/mapbox/mapbox-gl-native/pull/11205), [#11681](https://github.com/mapbox/mapbox-gl-native/pull/11681))
+* Refined certain Swift interfaces by converting them from class methods to class properties. ([#11674](https://github.com/mapbox/mapbox-gl-native/pull/11674))
### Styles
diff --git a/platform/ios/Mapbox.playground/Contents.swift b/platform/ios/Mapbox.playground/Contents.swift
index 04618d796e..f31c9b6171 100644
--- a/platform/ios/Mapbox.playground/Contents.swift
+++ b/platform/ios/Mapbox.playground/Contents.swift
@@ -51,7 +51,7 @@ panel.addSubview(pitchSwitch)
Put your access token into a plain text file called `token`. Then select the “token” placeholder below, go to Editor ‣ Insert File Literal, and select the `token` file.
*/
var accessToken = try String(contentsOfURL: <#token#>)
-MGLAccountManager.setAccessToken(accessToken)
+MGLAccountManager.accessToken = accessToken
class PlaygroundAnnotationView: MGLAnnotationView {
diff --git a/platform/ios/docs/guides/Info.plist Keys.md b/platform/ios/docs/guides/Info.plist Keys.md
index bc2f3f5786..cf00ec5499 100644
--- a/platform/ios/docs/guides/Info.plist Keys.md
+++ b/platform/ios/docs/guides/Info.plist Keys.md
@@ -8,7 +8,7 @@ Set the [Mapbox access token](https://www.mapbox.com/help/define-access-token/)
Mapbox-hosted vector tiles and styles require an API access token, which you can obtain from the [Mapbox account page](https://www.mapbox.com/studio/account/tokens/). Access tokens associate requests to Mapbox’s vector tile and style APIs with your Mapbox account. They also deter other developers from using your styles without your permission.
-As an alternative, you can use `+[MGLAccountManager setAccessToken:]` to set a token in code. See [our guide](https://www.mapbox.com/help/ios-private-access-token/) for some tips on keeping access tokens in open source code private.
+As an alternative, you can use `MGLAccountManager.accessToken` to set a token in code. See [our guide](https://www.mapbox.com/help/ios-private-access-token/) for some tips on keeping access tokens in open source code private.
## MGLMapboxAPIBaseURL
diff --git a/platform/ios/scripts/script_resources/MapboxDemo/MapboxDemo/ViewController.swift b/platform/ios/scripts/script_resources/MapboxDemo/MapboxDemo/ViewController.swift
index 34bbcb7666..d28b4e7d73 100644
--- a/platform/ios/scripts/script_resources/MapboxDemo/MapboxDemo/ViewController.swift
+++ b/platform/ios/scripts/script_resources/MapboxDemo/MapboxDemo/ViewController.swift
@@ -110,7 +110,7 @@ class ViewController: UIViewController {
// You can obtain your own access token from the
// [Mapbox account page](https://www.mapbox.com/studio/account/tokens/)
// and add it to this application's Info.plist as the value for MGLMapboxAccessToken
- if MGLAccountManager.accessToken() == "pk.eyJ1IjoibWFwYm94IiwiYSI6ImNqYThuNnZ3NTA5MGMyd3F1cmF1eW1xaGEifQ.TdBTSHHPeT1pfLZ_6x_1vA" {
+ if MGLAccountManager.accessToken == "pk.eyJ1IjoibWFwYm94IiwiYSI6ImNqYThuNnZ3NTA5MGMyd3F1cmF1eW1xaGEifQ.TdBTSHHPeT1pfLZ_6x_1vA" {
accessTokenWarningView.isHidden = false
}
diff --git a/platform/ios/src/MGLTelemetryConfig.h b/platform/ios/src/MGLTelemetryConfig.h
index 527d344291..96e525c969 100644
--- a/platform/ios/src/MGLTelemetryConfig.h
+++ b/platform/ios/src/MGLTelemetryConfig.h
@@ -9,7 +9,7 @@ NS_ASSUME_NONNULL_BEGIN
extern NSString *const MGLMapboxMetricsProfile;
-+ (nullable instancetype)sharedConfig;
+@property (class, nullable, nonatomic, readonly) MGLTelemetryConfig *sharedConfig;
- (void)configurationFromKey:(NSString *)key;