Skip to content

Commit

Permalink
- Added desiredAccuracy option
Browse files Browse the repository at this point in the history
- Updated project example and others
  • Loading branch information
mhergon committed Jul 17, 2018
1 parent 7cbf92b commit 93683b2
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 6 deletions.
4 changes: 2 additions & 2 deletions EagleBit.podspec
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Pod::Spec.new do |spec|
spec.name = 'EagleBit'
spec.platform = :ios, "10.0"
spec.version = '1.0.4'
spec.version = '1.0.5'
spec.license = { :type => 'Apache License, Version 2.0' }
spec.homepage = 'https://github.com/mhergon/EagleBit'
spec.authors = { 'Marc Hervera' => '[email protected]' }
spec.summary = 'EagleBit is the most efficient way to get locations indefinitely without without sacrificing battery life'
spec.source = { :git => 'https://github.com/mhergon/EagleBit.git', :tag => 'v1.0.4' }
spec.source = { :git => 'https://github.com/mhergon/EagleBit.git', :tag => 'v1.0.5' }
spec.source_files = 'EagleBit.swift'
spec.ios.frameworks = 'CoreLocation'
spec.requires_arc = true
Expand Down
9 changes: 9 additions & 0 deletions EagleBit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ public class EagleBit: NSObject {
}
}

/// Desired accuracy
public var desiredAccuracy: CLLocationAccuracy = kCLLocationAccuracyHundredMeters {
didSet {
locationManager.desiredAccuracy = desiredAccuracy
}
}

/// Show/hide background location indicator
public var showsBackgroundLocationIndicator = false {
didSet {
Expand Down Expand Up @@ -96,8 +103,10 @@ public extension EagleBit {
switch level {
case .inUse:
locationManager.requestWhenInUseAuthorization()

case .always:
locationManager.requestAlwaysAuthorization()

}

}
Expand Down
6 changes: 5 additions & 1 deletion Eaglebit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0900;
LastUpgradeCheck = 0900;
LastUpgradeCheck = 0940;
ORGANIZATIONNAME = mhergon;
TargetAttributes = {
4B0FE7121F9CA165008A3513 = {
Expand Down Expand Up @@ -319,13 +319,15 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -376,13 +378,15 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
4 changes: 1 addition & 3 deletions Eaglebit.xcodeproj/xcshareddata/xcschemes/EagleBit.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0910"
LastUpgradeVersion = "0940"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,7 +26,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
Expand All @@ -37,7 +36,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
4 changes: 4 additions & 0 deletions Eaglebit/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,9 @@
</array>
<key>UILaunchStoryboardName</key>
<string>MainViewController</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
</dict>
</plist>

0 comments on commit 93683b2

Please sign in to comment.