Documentation Archive Developer
Search

CoreLocation Changes for Objective-C

CoreLocation

CLCircularRegion.h

Declaration
From
- (instancetype)initWithCenter:(CLLocationCoordinate2D)center radius:(CLLocationDistance)radius identifier:(NSString *)identifier
To
- (instancetype _Nonnull)initWithCenter:(CLLocationCoordinate2D)center radius:(CLLocationDistance)radius identifier:(NSString * _Nonnull)identifier

CLGeocoder.h

Declaration
From
- (void)geocodeAddressDictionary:(NSDictionary *)addressDictionary completionHandler:(CLGeocodeCompletionHandler)completionHandler
To
- (void)geocodeAddressDictionary:(NSDictionary * _Nonnull)addressDictionary completionHandler:(CLGeocodeCompletionHandler _Nonnull)completionHandler

Declaration
From
- (void)geocodeAddressString:(NSString *)addressString completionHandler:(CLGeocodeCompletionHandler)completionHandler
To
- (void)geocodeAddressString:(NSString * _Nonnull)addressString completionHandler:(CLGeocodeCompletionHandler _Nonnull)completionHandler

Declaration
From
- (void)geocodeAddressString:(NSString *)addressString inRegion:(CLRegion *)region completionHandler:(CLGeocodeCompletionHandler)completionHandler
To
- (void)geocodeAddressString:(NSString * _Nonnull)addressString inRegion:(CLRegion * _Nullable)region completionHandler:(CLGeocodeCompletionHandler _Nonnull)completionHandler

Declaration
From
- (void)reverseGeocodeLocation:(CLLocation *)location completionHandler:(CLGeocodeCompletionHandler)completionHandler
To
- (void)reverseGeocodeLocation:(CLLocation * _Nonnull)location completionHandler:(CLGeocodeCompletionHandler _Nonnull)completionHandler

CLHeading.h

Modified CLHeading.description
Declaration
From
@property(nonatomic, readonly, copy) NSString *description
To
@property(nonatomic, readonly, copy, nonnull) NSString *description

Declaration
From
@property(readonly, nonatomic, copy) NSDate *timestamp
To
@property(readonly, nonatomic, copy, nonnull) NSDate *timestamp

CLLocation.h

Modified CLLocation.description
Declaration
From
@property(nonatomic, readonly, copy) NSString *description
To
@property(nonatomic, readonly, copy, nonnull) NSString *description

Declaration
From
- (CLLocationDistance)distanceFromLocation:(const CLLocation *)location
To
- (CLLocationDistance)distanceFromLocation:(const CLLocation * _Nonnull)location

Declaration
From
- (instancetype)initWithCoordinate:(CLLocationCoordinate2D)coordinate altitude:(CLLocationDistance)altitude horizontalAccuracy:(CLLocationAccuracy)hAccuracy verticalAccuracy:(CLLocationAccuracy)vAccuracy course:(CLLocationDirection)course speed:(CLLocationSpeed)speed timestamp:(NSDate *)timestamp
To
- (instancetype _Nonnull)initWithCoordinate:(CLLocationCoordinate2D)coordinate altitude:(CLLocationDistance)altitude horizontalAccuracy:(CLLocationAccuracy)hAccuracy verticalAccuracy:(CLLocationAccuracy)vAccuracy course:(CLLocationDirection)course speed:(CLLocationSpeed)speed timestamp:(NSDate * _Nonnull)timestamp

Declaration
From
- (instancetype)initWithCoordinate:(CLLocationCoordinate2D)coordinate altitude:(CLLocationDistance)altitude horizontalAccuracy:(CLLocationAccuracy)hAccuracy verticalAccuracy:(CLLocationAccuracy)vAccuracy timestamp:(NSDate *)timestamp
To
- (instancetype _Nonnull)initWithCoordinate:(CLLocationCoordinate2D)coordinate altitude:(CLLocationDistance)altitude horizontalAccuracy:(CLLocationAccuracy)hAccuracy verticalAccuracy:(CLLocationAccuracy)vAccuracy timestamp:(NSDate * _Nonnull)timestamp

Declaration
From
- (instancetype)initWithLatitude:(CLLocationDegrees)latitude longitude:(CLLocationDegrees)longitude
To
- (instancetype _Nonnull)initWithLatitude:(CLLocationDegrees)latitude longitude:(CLLocationDegrees)longitude

Declaration
From
@property(readonly, nonatomic, copy) NSDate *timestamp
To
@property(readonly, nonatomic, copy, nonnull) NSDate *timestamp

CLLocationManager.h

Declaration
From
@property(assign, nonatomic) id<CLLocationManagerDelegate> delegate
To
@property(assign, nonatomic, nullable) id<CLLocationManagerDelegate> delegate

Declaration
From
+ (BOOL)isMonitoringAvailableForClass:(Class)regionClass
To
+ (BOOL)isMonitoringAvailableForClass:(Class _Nonnull)regionClass

Declaration
From
@property(readonly, nonatomic, copy) CLLocation *location
To
@property(readonly, nonatomic, copy, nullable) CLLocation *location

Declaration
From
@property(readonly, nonatomic, copy) NSSet *monitoredRegions
To
@property(readonly, nonatomic, copy, nonnull) NSSet<__kindof CLRegion *> *monitoredRegions

Declaration
From
@property(copy, nonatomic) NSString *purpose
To
@property(copy, nonatomic, nullable) NSString *purpose

Declaration
From
- (void)requestStateForRegion:(CLRegion *)region
To
- (void)requestStateForRegion:(CLRegion * _Nonnull)region

Declaration
From
- (void)startMonitoringForRegion:(CLRegion *)region
To
- (void)startMonitoringForRegion:(CLRegion * _Nonnull)region

Declaration
From
- (void)stopMonitoringForRegion:(CLRegion *)region
To
- (void)stopMonitoringForRegion:(CLRegion * _Nonnull)region

CLLocationManagerDelegate.h

Declaration
From
- (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status
To
- (void)locationManager:(CLLocationManager * _Nonnull)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status

Declaration
From
- (void)locationManager:(CLLocationManager *)manager didDetermineState:(CLRegionState)state forRegion:(CLRegion *)region
To
- (void)locationManager:(CLLocationManager * _Nonnull)manager didDetermineState:(CLRegionState)state forRegion:(CLRegion * _Nonnull)region

Declaration
From
- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region
To
- (void)locationManager:(CLLocationManager * _Nonnull)manager didEnterRegion:(CLRegion * _Nonnull)region

Declaration
From
- (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region
To
- (void)locationManager:(CLLocationManager * _Nonnull)manager didExitRegion:(CLRegion * _Nonnull)region

Declaration
From
- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
To
- (void)locationManager:(CLLocationManager * _Nonnull)manager didFailWithError:(NSError * _Nonnull)error

Declaration
From
- (void)locationManager:(CLLocationManager *)manager didFinishDeferredUpdatesWithError:(NSError *)error
To
- (void)locationManager:(CLLocationManager * _Nonnull)manager didFinishDeferredUpdatesWithError:(NSError * _Nullable)error

Declaration
From
- (void)locationManager:(CLLocationManager *)manager didStartMonitoringForRegion:(CLRegion *)region
To
- (void)locationManager:(CLLocationManager * _Nonnull)manager didStartMonitoringForRegion:(CLRegion * _Nonnull)region

Declaration
From
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
To
- (void)locationManager:(CLLocationManager * _Nonnull)manager didUpdateLocations:(NSArray * _Nonnull)locations

Declaration
From
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
To
- (void)locationManager:(CLLocationManager * _Nonnull)manager didUpdateToLocation:(CLLocation * _Nonnull)newLocation fromLocation:(CLLocation * _Nonnull)oldLocation

Declaration
From
- (void)locationManager:(CLLocationManager *)manager monitoringDidFailForRegion:(CLRegion *)region withError:(NSError *)error
To
- (void)locationManager:(CLLocationManager * _Nonnull)manager monitoringDidFailForRegion:(CLRegion * _Nullable)region withError:(NSError * _Nonnull)error

CLPlacemark.h

Declaration
From
@property(nonatomic, readonly, copy) NSDictionary *addressDictionary
To
@property(nonatomic, readonly, copy, nullable) NSDictionary *addressDictionary

Declaration
From
@property(nonatomic, readonly, copy) NSString *administrativeArea
To
@property(nonatomic, readonly, copy, nullable) NSString *administrativeArea

Declaration
From
@property(nonatomic, readonly, copy) NSArray *areasOfInterest
To
@property(nonatomic, readonly, copy, nullable) NSArray<NSString *> *areasOfInterest

Declaration
From
@property(nonatomic, readonly, copy) NSString *country
To
@property(nonatomic, readonly, copy, nullable) NSString *country

Declaration
From
- (instancetype)initWithPlacemark:(CLPlacemark *)placemark
To
- (instancetype _Nonnull)initWithPlacemark:(CLPlacemark * _Nonnull)placemark

Declaration
From
@property(nonatomic, readonly, copy) NSString *inlandWater
To
@property(nonatomic, readonly, copy, nullable) NSString *inlandWater

Declaration
From
@property(nonatomic, readonly, copy) NSString *ISOcountryCode
To
@property(nonatomic, readonly, copy, nullable) NSString *ISOcountryCode

Declaration
From
@property(nonatomic, readonly, copy) NSString *locality
To
@property(nonatomic, readonly, copy, nullable) NSString *locality

Declaration
From
@property(nonatomic, readonly, copy) CLLocation *location
To
@property(nonatomic, readonly, copy, nullable) CLLocation *location

Declaration
From
@property(nonatomic, readonly, copy) NSString *name
To
@property(nonatomic, readonly, copy, nullable) NSString *name

Declaration
From
@property(nonatomic, readonly, copy) NSString *ocean
To
@property(nonatomic, readonly, copy, nullable) NSString *ocean

Declaration
From
@property(nonatomic, readonly, copy) NSString *postalCode
To
@property(nonatomic, readonly, copy, nullable) NSString *postalCode

Declaration
From
@property(nonatomic, readonly, copy) CLRegion *region
To
@property(nonatomic, readonly, copy, nullable) CLRegion *region

Declaration
From
@property(nonatomic, readonly, copy) NSString *subAdministrativeArea
To
@property(nonatomic, readonly, copy, nullable) NSString *subAdministrativeArea

Declaration
From
@property(nonatomic, readonly, copy) NSString *subLocality
To
@property(nonatomic, readonly, copy, nullable) NSString *subLocality

Declaration
From
@property(nonatomic, readonly, copy) NSString *subThoroughfare
To
@property(nonatomic, readonly, copy, nullable) NSString *subThoroughfare

Declaration
From
@property(nonatomic, readonly, copy) NSString *thoroughfare
To
@property(nonatomic, readonly, copy, nullable) NSString *thoroughfare

CLRegion.h

Declaration
From
@property(readonly, nonatomic, copy) NSString *identifier
To
@property(readonly, nonatomic, copy, nonnull) NSString *identifier

Declaration
From
- (instancetype)initCircularRegionWithCenter:(CLLocationCoordinate2D)center radius:(CLLocationDistance)radius identifier:(NSString *)identifier
To
- (instancetype _Nonnull)initCircularRegionWithCenter:(CLLocationCoordinate2D)center radius:(CLLocationDistance)radius identifier:(NSString * _Nonnull)identifier