Skip to content
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

Start tracking verified ios only #263

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ android {
minSdkVersion 16
targetSdkVersion 31
versionCode 1
versionName '3.8.12'
versionName '3.8.12-beta.1'
}
lintOptions {
abortOnError false
Expand Down
5 changes: 5 additions & 0 deletions android/src/main/java/io/radar/react/RNRadarModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,11 @@ public void startTrackingContinuous() {
Radar.startTracking(RadarTrackingOptions.CONTINUOUS);
}

@ReactMethod
public void startTrackingVerified(boolean token) {
//not implemented
}

@ReactMethod
public void startTrackingCustom(ReadableMap optionsMap) {
try {
Expand Down
2 changes: 1 addition & 1 deletion ios/Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "radarlabs/radar-sdk-ios" "3.8.9"
github "radarlabs/radar-sdk-ios" "3.8.10-beta.1"
12 changes: 11 additions & 1 deletion ios/RNRadar.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ - (dispatch_queue_t)methodQueue {
}

- (NSArray<NSString *> *)supportedEvents {
return @[@"events", @"location", @"clientLocation", @"error", @"log"];
return @[@"events", @"location", @"clientLocation", @"error", @"log", @"token"];
}

- (void)startObserving {
Expand Down Expand Up @@ -91,6 +91,12 @@ - (void)didLogMessage:(NSString *)message {
}
}

- (void)didUpdateToken:(NSString *)token {
if(hasListeners){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spacing

[self sendEventWithName:@"token" body:token];
}
}

RCT_EXPORT_METHOD(initialize:(NSString *)publishableKey fraud:(BOOL)fraud) {
[Radar initializeWithPublishableKey:publishableKey];
}
Expand Down Expand Up @@ -357,6 +363,10 @@ - (void)didLogMessage:(NSString *)message {
[Radar startTrackingWithOptions:RadarTrackingOptions.presetContinuous];
}

RCT_EXPORT_METHOD(startTrackingVerified:(BOOL)token) {
[Radar startTrackingVerified:token];
}

RCT_EXPORT_METHOD(startTrackingCustom:(NSDictionary *)optionsDict) {
RadarTrackingOptions *options = [RadarTrackingOptions trackingOptionsFromDictionary:optionsDict];
[Radar startTrackingWithOptions:options];
Expand Down
5 changes: 5 additions & 0 deletions js/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ const startTrackingCustom = options => (
NativeModules.RNRadar.startTrackingCustom(options)
);

const startTrackingVerified = token => (
NativeModules.RNRadar.startTrackingVerified(token)
);

const mockTracking = options => (
NativeModules.RNRadar.mockTracking(options)
);
Expand Down Expand Up @@ -222,6 +226,7 @@ const Radar = {
trackOnce,
trackVerified,
trackVerifiedToken,
startTrackingVerified,
startTrackingEfficient,
startTrackingResponsive,
startTrackingContinuous,
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "React Native module for Radar, the leading geofencing and location tracking platform",
"homepage": "https://radar.com",
"license": "Apache-2.0",
"version": "3.8.12",
"version": "3.8.12-beta.1",
"main": "js/index.js",
"files": [
"android",
Expand Down
2 changes: 1 addition & 1 deletion react-native-radar.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ Pod::Spec.new do |s|
s.platform = :ios, "10.0"

s.dependency "React"
s.dependency "RadarSDK", "~> 3.8.9"
s.dependency "RadarSDK", "~> 3.8.10-beta.1"
end