IngeoSDK 1.4.1

IngeoSDK 1.4.1

测试测试
语言语言 Objective-CObjective C
许可证 Apache 2
发布最近发布2017年1月

Amit Palomo维护。



IngeoSDK 1.4.1

  • Amit Palomo

IngeoSDK for iOS

概述

IngeoSDK是iOS(Swift和Objective-C)的高效地点管理器,它扩展并改进了CoreLocation。
它使用独特的算法根据用户的运动、行为、速度和位置动态地不断调整CoreLocation的跟踪配置参数。从而实现适合优化的精度和最少功耗的配置方案,实时进行。
无论是前台还是后台,您的应用程序和/或服务器都将接收到最相关的位置数据——即使在网络断开的情况下。当然,或差的位置样本已被过滤。电池消耗仅为每小时~2%。
支持运行iOS 7.0+的iPhone、iPad和iPod Touch。

要查看完整功能列表,请访问:http://ingeo.io/sdk

演示,请?

  1. 作为ZIP文件下载或克隆此仓库。
  2. 解压并在Xcode中打开位于Samples/Swift-Sample01目录的项目文件。
  3. ViewController.swift中编辑,将API密钥添加到初始化方法中

    IGLocationManager.initWithDelegate(self, secretAPIKey: "APIKEYGOESHERE")

    要获取新的API密钥,请免费注册

  4. 现在,只需在iOS模拟器或您的设备上运行,并监视调试控制台,就随着演示应用程序在旧金山街道上旅行(使用记录的GPX文件)。

启用位置服务

  1. 在Xcode中,转到您的目标设置 -> '功能' -> '后台模式'
    启用'位置更新'。

  2. 编辑您的应用程序的Info.plist并在其中添加以下字符串密钥(无空值)

    NSLocationAlwaysUsageDescription
    

使用方法

  1. 导入

    import IngeoSDK
  2. 设置代理

    class ViewController: UIViewController, IGLocationManagerDelegate {
  3. 初始化

    IGLocationManager.initWithDelegate(self, secretAPIKey: "APIKEYGOESHERE")
  4. 开始位置监控

    IGLocationManager.startUpdatingLocationAlwaysOn()

    或者

    IGLocationManager.startUpdatingLocationWhenInUse()
  5. 获得蜂蜜
    在您的代理中实现IGLocationManagerDelegate方法。

    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. 就这样。您已经启用了持续的位置监控。
    坐在那里,通过管理员仪表板观察您的用户http://admin.ingeo.io

API文档

API完整参考:http://ingeo.io/sdk/docs

许可证

Apache v2.0

反馈

请随时通过[email protected]联系我们或在此处打开问题。