Skip to content

IngeoSDK/ingeo-ios-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IngeoSDK: iOS location tracking made easy (Swift & ObjC)

Cocoapods Compatible Platform

IngeoSDK for iOS

Overview

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

Demo, please?

  1. Download as zip file or clone this repository.

  2. Unzip and open the project file in Samples/Swift-Sample01 directory using Xcode.

  3. 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.

  4. Now simply run in iOS Simulator or your device and watch the debug console as the demo app takes you traveling through San Fransisco streets (using a recorded GPX file).

Installing with CocoaPods

  1. Add the following line to your Podfile:

    pod 'IngeoSDK'
    
  2. Run:

    pod install
    

Enable Location Services

  1. In Xcode, Go to your target settings -> 'Capabilities' -> 'Background Modes'
    Turn on 'Location updates'.

  2. Edit your app's Info.plist and add the following String key (with empty value):

     NSLocationAlwaysUsageDescription
    

Usage

  1. Import

    import IngeoSDK
  2. Set Delegate

    class ViewController: UIViewController, IGLocationManagerDelegate {
  3. Initialize

    IGLocationManager.initWithDelegate(self, secretAPIKey: "APIKEYGOESHERE")
  4. Start Location Monitoring

    IGLocationManager.startUpdatingLocationAlwaysOn()

    Or

    IGLocationManager.startUpdatingLocationWhenInUse()
  5. 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]);
    }
  6. That's it. you've just enabled constant location monitoring.
    Sit and watch your users on the Admin Dashboard http://admin.ingeo.io.

API Documentation

Full API reference: http://ingeo.io/sdk/docs

License

Apache v2.0

Feedback

Feel free to contact us at support@ingeo.io or open an issue here.

About

The most power-efficient and lightweight iOS location manager for Swift and ObjC

Resources

License

Stars

Watchers

Forks

Packages

No packages published