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

Commit 4f50928

Browse files
committed
[iOS] Removed long-unavailable APIs
1 parent e3934df commit 4f50928

File tree

3 files changed

+0
-32
lines changed

3 files changed

+0
-32
lines changed

include/mbgl/ios/MGLAccountManager.h

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ NS_ASSUME_NONNULL_BEGIN
2121

2222
/** @name Providing User Metrics Opt-Out */
2323

24-
+ (void)setMapboxMetricsEnabledSettingShownInApp:(BOOL)showsOptOut __attribute__((unavailable("Set MGLMapboxMetricsEnabledSettingShownInApp in Info.plist.")));
25-
2624
/** Whether in-app user metrics opt-out is configured. If set to the default value of `NO`, a user opt-out preference is expected in a `Settings.bundle` that shows in the application's section within the system Settings app. */
2725
+ (BOOL)mapboxMetricsEnabledSettingShownInApp;
2826

include/mbgl/ios/MGLMapView.h

-12
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,12 @@ IB_DESIGNABLE
3333
* @param frame The frame for the view, measured in points.
3434
* @return An initialized map view. */
3535
- (instancetype)initWithFrame:(CGRect)frame;
36-
- (instancetype)initWithFrame:(CGRect)frame accessToken:(NSString *)accessToken __attribute__((unavailable("Use -initWithFrame:. Set MGLMapboxAccessToken in the Info.plist or call +[MGLAccountManager setAccessToken:].")));
3736

3837
/** Initializes and returns a newly allocated map view with the specified frame and style URL.
3938
* @param frame The frame for the view, measured in points.
4039
* @param styleURL The map style URL to use. Can be either an HTTP/HTTPS URL or a Mapbox map ID style URL (`mapbox://styles/<user>/<style>`). Specify `nil` for the default style.
4140
* @return An initialized map view. */
4241
- (instancetype)initWithFrame:(CGRect)frame styleURL:(nullable NSURL *)styleURL;
43-
- (instancetype)initWithFrame:(CGRect)frame accessToken:(NSString *)accessToken styleURL:(nullable NSURL *)styleURL __attribute__((unavailable("Use -initWithFrame:styleURL:. Set MGLMapboxAccessToken in the Info.plist or call +[MGLAccountManager setAccessToken:].")));
44-
45-
#pragma mark - Authorizing Access
46-
47-
/** @name Authorizing Access */
48-
49-
@property (nonatomic, nullable) NSString *accessToken __attribute__((unavailable("Use +[MGLAccountManager accessToken] and +[MGLAccountManager setAccessToken:].")));
50-
51-
#pragma mark - Managing Constraints
52-
53-
/** @name Managing Constraints */
5442

5543
#pragma mark - Accessing Map Properties
5644

platform/ios/MGLMapView.mm

-18
Original file line numberDiff line numberDiff line change
@@ -172,24 +172,6 @@ - (instancetype)initWithCoder:(nonnull NSCoder *)decoder
172172
return self;
173173
}
174174

175-
- (nullable NSString *)accessToken
176-
{
177-
[NSException raise:@"Method unavailable" format:
178-
@"%s has been removed. "
179-
@"Use +[MGLAccountManager accessToken] or get MGLMapboxAccessToken from the Info.plist.",
180-
__PRETTY_FUNCTION__];
181-
return nil;
182-
}
183-
184-
- (void)setAccessToken:(nullable NSString *)accessToken
185-
{
186-
[NSException raise:@"Method unavailable" format:
187-
@"%s has been replaced by +[MGLAccountManager setAccessToken:].\n\n"
188-
@"If you previously set this access token in a storyboard inspectable, select the MGLMapView in Interface Builder and delete the “accessToken” entry from the User Defined Runtime Attributes section of the Identity inspector. "
189-
@"Then go to the Info.plist file and set MGLMapboxAccessToken to “%@”.",
190-
__PRETTY_FUNCTION__, accessToken];
191-
}
192-
193175
+ (NS_SET_OF(NSString *) *)keyPathsForValuesAffectingStyleURL
194176
{
195177
return [NSSet setWithObjects:@"styleURL__", nil];

0 commit comments

Comments
 (0)