diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2015-10-15 14:16:27 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2015-10-22 14:27:58 -0700 |
commit | 4f509288b7c671db96555a24a4f490311adfc13a (patch) | |
tree | fb5daacf2f38c29dbf688f59a87ad92918868220 | |
parent | e3934df8d479153dee5694d7cab2776e9cfa1708 (diff) | |
download | qtlocation-mapboxgl-4f509288b7c671db96555a24a4f490311adfc13a.tar.gz |
[iOS] Removed long-unavailable APIs
-rw-r--r-- | include/mbgl/ios/MGLAccountManager.h | 2 | ||||
-rw-r--r-- | include/mbgl/ios/MGLMapView.h | 12 | ||||
-rw-r--r-- | platform/ios/MGLMapView.mm | 18 |
3 files changed, 0 insertions, 32 deletions
diff --git a/include/mbgl/ios/MGLAccountManager.h b/include/mbgl/ios/MGLAccountManager.h index 9bfb3b497e..9d6ba3d063 100644 --- a/include/mbgl/ios/MGLAccountManager.h +++ b/include/mbgl/ios/MGLAccountManager.h @@ -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; diff --git a/include/mbgl/ios/MGLMapView.h b/include/mbgl/ios/MGLMapView.h index 4506d30fb6..dd8a120e14 100644 --- a/include/mbgl/ios/MGLMapView.h +++ b/include/mbgl/ios/MGLMapView.h @@ -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 diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index 6977b1de24..0e7547ef1b 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -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]; |