CocoaPods trunk is moving to be read-only. Read more on the blog, there are 17 months to go.
TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | Apache 2 |
ReleasedLast Release | Jan 2017 |
Maintained by Amit Palomo.
IngeoSDK is a power-efficient location manager for iOS (Swift and Objective-C), which extends and improves CoreLocation.
It uses unique algorithms to dynamically and constantly adjust CoreLocation's tracking configuration parameters according to user's
motion, behavior, speed and whereabouts. Thus enabling suited configuration scheme for optimized accuracy and minimum power consumption in real-time.
Your app and/or server will receive the most relevant location data while in foreground or background - even when network is disconnected.
Off-course, or bad location samples are filtered out for you. Battery consumption is just ~2% per hour.
Supports iPhone, iPad, iPod Touch running iOS 7.0+
For a full list of features visit: http://ingeo.io/sdk
Edit ViewController.swift to enter your API key in the initializer method:
IGLocationManager.initWithDelegate(self, secretAPIKey: "APIKEYGOESHERE")
To get a new API key, Signup for free.
In Xcode, Go to your target settings -> 'Capabilities' -> 'Background Modes'
Turn on 'Location updates'.
Edit your app's Info.plist and add the following String key (with empty value):
NSLocationAlwaysUsageDescription
Import
import IngeoSDK
Set Delegate
class ViewController: UIViewController, IGLocationManagerDelegate {
Initialize
IGLocationManager.initWithDelegate(self, secretAPIKey: "APIKEYGOESHERE")
Start Location Monitoring
IGLocationManager.startUpdatingLocationAlwaysOn()
Or
IGLocationManager.startUpdatingLocationWhenInUse()
Get the honey
Implement IGLocationManagerDelegate methods in your delegate.
Swift:
func igLocationManager(manager: IGLocationManager!, didUpdateLocation igLocation: IGLocation!) {
print("didUpdateLocation: \(igLocation.description)")
}
func igLocationManager(manager: IGLocationManager!, didDetectMotionState motionState: IGMotionState) {
print("didDetectMotionState: \(IGLocation.stringForMotionState(motionState))")
}
Objective-C:
- (void)igLocationManager:(IGLocationManager *)manager didUpdateLocation:(IGLocation *)igLocation {
NSLog(@"didUpdateLocation: %@", [igLocation description]);
}
- (void)igLocationManager:(IGLocationManager *)manager didDetectMotionState:(IGMotionState)motionState {
NSLog(@"didDetectMotionState: %@",[IGLocation stringForMotionState:motionState]);
}
That's it. you've just enabled constant location monitoring.
Sit and watch your users on the Admin Dashboard http://admin.ingeo.io.
Full API reference: http://ingeo.io/sdk/docs
Apache v2.0
Feel free to contact us at [email protected] or open an issue here.