[iOS] Removed long-unavailable APIs
This commit is contained in:
committed by
Minh Nguyễn
parent
e3934df8d4
commit
4f509288b7
@@ -21,8 +21,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/** @name Providing User Metrics Opt-Out */
|
||||
|
||||
+ (void)setMapboxMetricsEnabledSettingShownInApp:(BOOL)showsOptOut __attribute__((unavailable("Set MGLMapboxMetricsEnabledSettingShownInApp in Info.plist.")));
|
||||
|
||||
/** 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. */
|
||||
+ (BOOL)mapboxMetricsEnabledSettingShownInApp;
|
||||
|
||||
|
||||
@@ -33,24 +33,12 @@ IB_DESIGNABLE
|
||||
* @param frame The frame for the view, measured in points.
|
||||
* @return An initialized map view. */
|
||||
- (instancetype)initWithFrame:(CGRect)frame;
|
||||
- (instancetype)initWithFrame:(CGRect)frame accessToken:(NSString *)accessToken __attribute__((unavailable("Use -initWithFrame:. Set MGLMapboxAccessToken in the Info.plist or call +[MGLAccountManager setAccessToken:].")));
|
||||
|
||||
/** Initializes and returns a newly allocated map view with the specified frame and style URL.
|
||||
* @param frame The frame for the view, measured in points.
|
||||
* @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.
|
||||
* @return An initialized map view. */
|
||||
- (instancetype)initWithFrame:(CGRect)frame styleURL:(nullable NSURL *)styleURL;
|
||||
- (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:].")));
|
||||
|
||||
#pragma mark - Authorizing Access
|
||||
|
||||
/** @name Authorizing Access */
|
||||
|
||||
@property (nonatomic, nullable) NSString *accessToken __attribute__((unavailable("Use +[MGLAccountManager accessToken] and +[MGLAccountManager setAccessToken:].")));
|
||||
|
||||
#pragma mark - Managing Constraints
|
||||
|
||||
/** @name Managing Constraints */
|
||||
|
||||
#pragma mark - Accessing Map Properties
|
||||
|
||||
|
||||
@@ -172,24 +172,6 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
|
||||
return self;
|
||||
}
|
||||
|
||||
- (nullable NSString *)accessToken
|
||||
{
|
||||
[NSException raise:@"Method unavailable" format:
|
||||
@"%s has been removed. "
|
||||
@"Use +[MGLAccountManager accessToken] or get MGLMapboxAccessToken from the Info.plist.",
|
||||
__PRETTY_FUNCTION__];
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)setAccessToken:(nullable NSString *)accessToken
|
||||
{
|
||||
[NSException raise:@"Method unavailable" format:
|
||||
@"%s has been replaced by +[MGLAccountManager setAccessToken:].\n\n"
|
||||
@"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. "
|
||||
@"Then go to the Info.plist file and set MGLMapboxAccessToken to “%@”.",
|
||||
__PRETTY_FUNCTION__, accessToken];
|
||||
}
|
||||
|
||||
+ (NS_SET_OF(NSString *) *)keyPathsForValuesAffectingStyleURL
|
||||
{
|
||||
return [NSSet setWithObjects:@"styleURL__", nil];
|
||||
|
||||
Reference in New Issue
Block a user