Skip to content

Commit

Permalink
User Permission Prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnendusaha committed Dec 14, 2017
1 parent e84bae4 commit 7add7f3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/Analytics/BMSAnalytics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ public class BMSAnalytics: AnalyticsDelegate {
return
}

if CLLocationManager.locationServicesEnabled() && CLLocationManager.authorizationStatus() == CLAuthorizationStatus.notDetermined {
self.locationManager.requestWhenInUseAuthorization()
}

BMSAnalytics.startTime = Int64(Date.timeIntervalSinceReferenceDate * 1000) // milliseconds

lifecycleEvents[Constants.Metadata.Analytics.sessionId] = UUID().uuidString
Expand Down

0 comments on commit 7add7f3

Please sign in to comment.