Skip to content

Commit a246a23

Browse files
committed
Update deprecated CLLocationManagerDelegate method
1 parent ab9392b commit a246a23

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

KeenClient.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,7 @@
907907
isa = XCBuildConfiguration;
908908
buildSettings = {
909909
ALWAYS_SEARCH_USER_PATHS = NO;
910+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
910911
CLANG_WARN_STRICT_PROTOTYPES = YES;
911912
COPY_PHASE_STRIP = NO;
912913
ENABLE_TESTABILITY = YES;
@@ -932,6 +933,7 @@
932933
isa = XCBuildConfiguration;
933934
buildSettings = {
934935
ALWAYS_SEARCH_USER_PATHS = NO;
936+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
935937
CLANG_WARN_STRICT_PROTOTYPES = YES;
936938
COPY_PHASE_STRIP = YES;
937939
GCC_C_LANGUAGE_STANDARD = gnu99;

KeenClient/KeenClient.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,8 @@ + (BOOL)isLocationAuthorized:(CLAuthorizationStatus)status {
378378

379379
// Delegate method from the CLLocationManagerDelegate protocol.
380380
- (void)locationManager:(CLLocationManager *)manager
381-
didUpdateToLocation:(CLLocation *)newLocation
382-
fromLocation:(CLLocation *)oldLocation {
381+
didUpdateLocations:(NSArray<CLLocation *> *)locations {
382+
CLLocation *newLocation = locations.lastObject;
383383
// If it's a relatively recent event, turn off updates to save power
384384
NSDate *eventDate = newLocation.timestamp;
385385
NSTimeInterval howRecent = [eventDate timeIntervalSinceNow];

0 commit comments

Comments
 (0)