forked from organicmaps/organicmaps
[ios] Added location tracking in background.
This commit is contained in:
parent
b38a5af993
commit
e2b32d04f0
2 changed files with 33 additions and 28 deletions
|
@ -2,33 +2,6 @@
|
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>UIApplicationShortcutItems</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UIApplicationShortcutItemType</key>
|
||||
<string>me.maps.3daction.search</string>
|
||||
<key>UIApplicationShortcutItemTitle</key>
|
||||
<string>search</string>
|
||||
<key>UIApplicationShortcutItemIconFile</key>
|
||||
<string>ic_3dtouch_search</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>UIApplicationShortcutItemType</key>
|
||||
<string>me.maps.3daction.bookmarks</string>
|
||||
<key>UIApplicationShortcutItemTitle</key>
|
||||
<string>bookmarks</string>
|
||||
<key>UIApplicationShortcutItemIconFile</key>
|
||||
<string>ic_3dtouch_bookmarks</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>UIApplicationShortcutItemType</key>
|
||||
<string>me.maps.3daction.route</string>
|
||||
<key>UIApplicationShortcutItemTitle</key>
|
||||
<string>route</string>
|
||||
<key>UIApplicationShortcutItemIconFile</key>
|
||||
<string>ic_3dtouch_planing_route</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
|
@ -131,10 +104,38 @@
|
|||
</dict>
|
||||
<key>NSLocationAlwaysUsageDescription</key>
|
||||
<string></string>
|
||||
<key>UIApplicationShortcutItems</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UIApplicationShortcutItemIconFile</key>
|
||||
<string>ic_3dtouch_search</string>
|
||||
<key>UIApplicationShortcutItemTitle</key>
|
||||
<string>search</string>
|
||||
<key>UIApplicationShortcutItemType</key>
|
||||
<string>me.maps.3daction.search</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>UIApplicationShortcutItemIconFile</key>
|
||||
<string>ic_3dtouch_bookmarks</string>
|
||||
<key>UIApplicationShortcutItemTitle</key>
|
||||
<string>bookmarks</string>
|
||||
<key>UIApplicationShortcutItemType</key>
|
||||
<string>me.maps.3daction.bookmarks</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>UIApplicationShortcutItemIconFile</key>
|
||||
<string>ic_3dtouch_planing_route</string>
|
||||
<key>UIApplicationShortcutItemTitle</key>
|
||||
<string>route</string>
|
||||
<key>UIApplicationShortcutItemType</key>
|
||||
<string>me.maps.3daction.route</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>remote-notification</string>
|
||||
<string>fetch</string>
|
||||
<string>location</string>
|
||||
<string>remote-notification</string>
|
||||
</array>
|
||||
<key>UIFileSharingEnabled</key>
|
||||
<true/>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#import "Common.h"
|
||||
#import "LocationManager.h"
|
||||
#import "MapsAppDelegate.h"
|
||||
#import "MapViewController.h"
|
||||
|
@ -23,6 +24,9 @@ static NSString * const kAlohalyticsLocationRequestAlwaysFailed = @"$locationAlw
|
|||
m_locationManager.delegate = self;
|
||||
[UIDevice currentDevice].batteryMonitoringEnabled = YES;
|
||||
[self refreshAccuracy];
|
||||
if (!isIOSVersionLessThan(9))
|
||||
m_locationManager.allowsBackgroundLocationUpdates = YES;
|
||||
m_locationManager.pausesLocationUpdatesAutomatically = YES;
|
||||
m_locationManager.headingFilter = 3.0;
|
||||
// m_locationManager.distanceFilter = 3.0;
|
||||
m_isStarted = NO;
|
||||
|
|
Loading…
Add table
Reference in a new issue