Skip to content

Commit

Permalink
Supports iOS 8 extra annoying GPS permissions. Refs #37.
Browse files Browse the repository at this point in the history
  • Loading branch information
gradha committed Jun 12, 2015
1 parent d03b959 commit 1c2da73
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions resources/Er_recorder.plist
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,7 @@
</array>
<key>UIFileSharingEnabled</key>
<true/>
<key>NSLocationAlwaysUsageDescription</key>
<string>Allow constant tracking of your position at the expense of your battery life?</string>
</dict>
</plist>
2 changes: 2 additions & 0 deletions resources/Record_my_position-appstore.plist
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,7 @@
</array>
<key>UIFileSharingEnabled</key>
<true/>
<key>NSLocationAlwaysUsageDescription</key>
<string>Allow constant tracking of your position at the expense of your battery life?</string>
</dict>
</plist>
2 changes: 2 additions & 0 deletions resources/Record_my_position-dev.plist
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,7 @@
</array>
<key>UIFileSharingEnabled</key>
<true/>
<key>NSLocationAlwaysUsageDescription</key>
<string>Allow constant tracking of your position at the expense of your battery life?</string>
</dict>
</plist>
7 changes: 7 additions & 0 deletions src/EHGPS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ import UIKit
*/
func start() -> Bool
{
if mManager.respondsToSelector(Selector("requestAlwaysAuthorization")) {
let status = CLLocationManager.authorizationStatus()
if status == .NotDetermined {
mManager.requestAlwaysAuthorization()
}
}

if CLLocationManager.locationServicesEnabled() {
assert(nil != EHGPS.cDB)
if (!gpsIsOn && !mNoLog) {
Expand Down

0 comments on commit 1c2da73

Please sign in to comment.