Skip to content

Commit

Permalink
If API token is not set, don't track
Browse files Browse the repository at this point in the history
And display a warning in the console
  • Loading branch information
rsattar committed Jan 27, 2016
1 parent 3f852f0 commit 5f119e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions LaunchKit/Classes/LaunchKit.m
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,12 @@ - (void)trackProperties:(NSDictionary *)properties

- (void)trackProperties:(NSDictionary *)properties completionHandler:(void (^)())completion
{
if (self.apiToken.length == 0) {
if (self.debugMode) {
LKLogWarning(@"Not tracking, because API Token is empty");
}
return;
}
if (self.verboseLogging) {
LKLog(@"Tracking: %@", properties);
}
Expand Down

0 comments on commit 5f119e9

Please sign in to comment.