Skip to content

Commit

Permalink
Merge branch 'master' into kenny/campaigns-analytics-v1
Browse files Browse the repository at this point in the history
  • Loading branch information
KennyHuRadar authored Dec 9, 2024
2 parents 643c351 + 1e2a594 commit aebd4fd
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion RadarSDK.podspec
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.19.2'
s.version = '3.19.3'
s.summary = 'iOS SDK for Radar, the leading geofencing and location tracking platform'
s.homepage = 'https://radar.com'
s.author = { 'Radar Labs, Inc.' => 'support@radar.com' }
Expand Down
4 changes: 2 additions & 2 deletions RadarSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 3.19.2;
MARKETING_VERSION = 3.19.3;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -1122,7 +1122,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 3.19.2;
MARKETING_VERSION = 3.19.3;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
OTHER_CFLAGS = "-fembed-bitcode";
Expand Down
2 changes: 1 addition & 1 deletion RadarSDK/RadarDelegateHolder.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ - (void)didReceiveEvents:(NSArray<RadarEvent *> *)events user:(RadarUser *)user

for (RadarEvent *event in events) {
[[RadarLogger sharedInstance] logWithLevel:RadarLogLevelInfo
message:[NSString stringWithFormat:@"📍 Radar event received | type = %@; replayed= %d; link = https://radar.com/dashboard/events/%@",
message:[NSString stringWithFormat:@"📍 Radar event received | type = %@; replayed = %d; link = https://radar.com/dashboard/events/%@",
[RadarEvent stringForType:event.type], event.replayed, event._id]];
}
}
Expand Down
2 changes: 1 addition & 1 deletion RadarSDK/RadarUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ + (NSNumber *)timeZoneOffset {
}

+ (NSString *)sdkVersion {
return @"3.19.2";
return @"3.19.3";
}

+ (NSString *)deviceId {
Expand Down
13 changes: 9 additions & 4 deletions RadarSDK/RadarVerificationManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ - (void)trackVerifiedWithBeacons:(BOOL)beacons completionHandler:(RadarTrackVeri
}

[[RadarLocationManager sharedInstance]
getLocationWithDesiredAccuracy:RadarTrackingOptionsDesiredAccuracyMedium
getLocationWithDesiredAccuracy:RadarTrackingOptionsDesiredAccuracyHigh
completionHandler:^(RadarStatus status, CLLocation *_Nullable location, BOOL stopped) {
if (status != RadarStatusSuccess) {
[RadarUtils runOnMainThread:^{
Expand Down Expand Up @@ -297,15 +297,20 @@ - (void)getVerifiedLocationTokenWithCompletionHandler:(RadarTrackVerifiedComplet
NSTimeInterval lastTokenElapsed = [NSProcessInfo processInfo].systemUptime - self.lastTokenSystemUptime;

if (self.lastToken) {
if (lastTokenElapsed < self.lastToken.expiresIn && self.lastToken.passed) {
[[RadarLogger sharedInstance] logWithLevel:RadarLogLevelDebug message:[NSString stringWithFormat:@"Last token valid | lastToken.expiresIn = %f; lastTokenElapsed = %f; lastToken.passed = %d", self.lastToken.expiresIn, lastTokenElapsed, self.lastToken.passed]];
double lastDistanceToStateBorder = -1;
if (self.lastToken.user && self.lastToken.user.state) {
lastDistanceToStateBorder = self.lastToken.user.state.distanceToBorder;
}

if (lastTokenElapsed < self.lastToken.expiresIn && self.lastToken.passed && lastDistanceToStateBorder > 1609) {
[[RadarLogger sharedInstance] logWithLevel:RadarLogLevelDebug message:[NSString stringWithFormat:@"Last token valid | lastToken.expiresIn = %f; lastTokenElapsed = %f; lastToken.passed = %d; lastDistanceToStateBorder = %f", self.lastToken.expiresIn, lastTokenElapsed, self.lastToken.passed, lastDistanceToStateBorder]];

[Radar flushLogs];

return completionHandler(RadarStatusSuccess, self.lastToken);
}

[[RadarLogger sharedInstance] logWithLevel:RadarLogLevelDebug message:[NSString stringWithFormat:@"Last token invalid | lastToken.expiresIn = %f; lastTokenElapsed = %f; lastToken.passed = %d", self.lastToken.expiresIn, lastTokenElapsed, self.lastToken.passed]];
[[RadarLogger sharedInstance] logWithLevel:RadarLogLevelDebug message:[NSString stringWithFormat:@"Last token invalid | lastToken.expiresIn = %f; lastTokenElapsed = %f; lastToken.passed = %d; lastDistanceToStateBorder = %f", self.lastToken.expiresIn, lastTokenElapsed, self.lastToken.passed, lastDistanceToStateBorder]];
} else {
[[RadarLogger sharedInstance] logWithLevel:RadarLogLevelDebug message:@"No last token"];
}
Expand Down
2 changes: 1 addition & 1 deletion RadarSDKMotion.podspec
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.19.1'
s.version = '3.19.3'
s.summary = 'Motion detection plugin for RadarSDK, the leading geofencing and location tracking platform'
s.homepage = 'https://radar.com'
s.author = { 'Radar Labs, Inc.' => 'support@radar.com' }
Expand Down
4 changes: 2 additions & 2 deletions RadarSDKMotion/RadarSDKMotion.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 3.18.4;
MARKETING_VERSION = 3.19.3;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -348,7 +348,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 3.18.4;
MARKETING_VERSION = 3.19.3;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
Expand Down

0 comments on commit aebd4fd

Please sign in to comment.