-
Notifications
You must be signed in to change notification settings - Fork 31
Add more logging for CSGN lifecycle #476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
38265b8
5d30ff9
f638ef5
18b6b45
38f97a8
e6f0922
8f65ce3
953796b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| Pod::Spec.new do |s| | ||
| s.name = 'RadarSDK' | ||
| s.version = '3.23.2' | ||
| s.version = '3.23.3-beta.2' | ||
| s.summary = 'iOS SDK for Radar, the leading geofencing and location tracking platform' | ||
| s.homepage = 'https://radar.com' | ||
| s.author = { 'Radar Labs, Inc.' => '[email protected]' } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -580,11 +580,8 @@ - (void)replaceSyncedGeofences:(NSArray<RadarGeofence *> *)geofences { | |
| } | ||
| if (center) { | ||
| CLRegion *region = [[CLCircularRegion alloc] initWithCenter:center.coordinate radius:radius identifier:identifier]; | ||
| [self.locationManager startMonitoringForRegion:region]; | ||
|
|
||
| [[RadarLogger sharedInstance] logWithLevel:RadarLogLevelDebug | ||
| message:[NSString stringWithFormat:@"Synced geofence | latitude = %f; longitude = %f; radius = %f; identifier = %@", | ||
| center.coordinate.latitude, center.coordinate.longitude, radius, identifier]]; | ||
|
|
||
|
|
||
|
|
||
| NSDictionary *metadata = geofence.metadata; | ||
| if (metadata) { | ||
|
|
@@ -610,7 +607,16 @@ - (void)replaceSyncedGeofences:(NSArray<RadarGeofence *> *)geofences { | |
| [requests addObject:request]; | ||
| } else { | ||
| [[RadarLogger sharedInstance] logWithLevel:RadarLogLevelDebug message:[NSString stringWithFormat:@"No notification text for geofence | geofenceId = %@", geofenceId]]; | ||
| [self.locationManager startMonitoringForRegion:region]; | ||
| [[RadarLogger sharedInstance] logWithLevel:RadarLogLevelDebug | ||
| message:[NSString stringWithFormat:@"Synced geofence | latitude = %f; longitude = %f; radius = %f; identifier = %@", | ||
| center.coordinate.latitude, center.coordinate.longitude, radius, identifier]]; | ||
| } | ||
| } else { | ||
| [self.locationManager startMonitoringForRegion:region]; | ||
| [[RadarLogger sharedInstance] logWithLevel:RadarLogLevelDebug | ||
| message:[NSString stringWithFormat:@"Synced geofence | latitude = %f; longitude = %f; radius = %f; identifier = %@", | ||
| center.coordinate.latitude, center.coordinate.longitude, radius, identifier]]; | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah this is fine for costco, but in general I think even if a geofence has notification, it still should be tracked by regions unless specifically marked not to be track. The super simple example is if I have a store and a geofence around it, I make a notification campaign attached to my store geofence. I'd want the notification to get pushed, but still want the region to create a user location on the dashboard. |
||
| } | ||
| } | ||
|
|
@@ -620,6 +626,7 @@ - (void)replaceSyncedGeofences:(NSArray<RadarGeofence *> *)geofences { | |
|
|
||
| - (void)removeSyncedGeofences { | ||
| for (CLRegion *region in self.locationManager.monitoredRegions) { | ||
| [[RadarLogger sharedInstance] logWithLevel:RadarLogLevelDebug message:[NSString stringWithFormat:@"Encountering monitored geofence | identifier = %@", region.identifier]]; | ||
|
||
| if ([region.identifier hasPrefix:kSyncGeofenceIdentifierPrefix]) { | ||
| [self.locationManager stopMonitoringForRegion:region]; | ||
| } | ||
|
|
@@ -1212,6 +1219,11 @@ - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError * | |
| [self callCompletionHandlersWithStatus:RadarStatusErrorLocation location:nil]; | ||
| } | ||
|
|
||
| - (void) locationManager:(CLLocationManager *) manager monitoringDidFailForRegion:(CLRegion *) region withError:(NSError *) error { | ||
KennyHuRadar marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| [[RadarLogger sharedInstance] logWithLevel:RadarLogLevelDebug message:[NSString stringWithFormat:@"CLLocation manager region monitoring error | error = %@", error]]; | ||
| [[RadarDelegateHolder sharedInstance] didFailWithStatus:RadarStatusErrorLocation]; | ||
| } | ||
|
|
||
| - (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading { | ||
| [RadarState setLastHeadingData:@{ | ||
| @"magneticHeading" : @(newHeading.magneticHeading), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| Pod::Spec.new do |s| | ||
| s.name = 'RadarSDKIndoors' | ||
| s.version = '3.23.2' | ||
| s.version = '3.23.3-beta.2' | ||
| s.summary = 'Indoor positioning plugin for RadarSDK, the leading geofencing and location tracking platform' | ||
| s.homepage = 'https://radar.com' | ||
| s.author = { 'Radar Labs, Inc.' => '[email protected]' } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| Pod::Spec.new do |s| | ||
| s.name = 'RadarSDKMotion' | ||
| s.version = '3.23.2' | ||
| s.version = '3.23.3-beta.2' | ||
| s.summary = 'Motion detection plugin for RadarSDK, the leading geofencing and location tracking platform' | ||
| s.homepage = 'https://radar.com' | ||
| s.author = { 'Radar Labs, Inc.' => '[email protected]' } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.