Latest 0.1.6
Homepage https://github.com/akirakazu/RDMgrCocoa
License MIT
Platforms ios 7.0
Dependencies MTDates
Authors

[![CI Status](http://img.shields.io/travis/Aki Xavier/RDMgr.svg?style=flat)](https://travis-ci.org/Aki Xavier/RDMgr)
Version
License
Platform

Requirements

ios >= 7.0

Installation

RDMgr is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "RDMgr"

How to Use

permissions

  • You Have to enable Background Modes with both Audio and Location updates modes.
  • Background Location updates mode is used for outdoor mode when we calculate distance with GPS data.
  • Background audio is a trick when we want to record running data in background for indoor mode on devices below iPhone 5S.
  • add NSLocationWhenInUseUsageDescription to your info.plist.

In AppDelegate.m, add the code below:

- (void)applicationWillResignActive:(UIApplication *)application {
    [[RDManager sharedManager] resignActive];
} 
- (void)applicationDidBecomeActive:(UIApplication *)application {
    [[RDManager sharedManager] becomeActive];
}
- (void)applicationWillTerminate:(UIApplication *)application {
    [[RDManager sharedManager] terminate];
}

Control running:

[[RDManager sharedManager] start];
[[RDManager sharedManager] pause];
[[RDManager sharedManager] stop];

Implement your ViewController as a RDDataDelegate, and set it to the sharedManager with:

[RDManager sharedManager].delegate = myViewController;

and you will receive data through:

- (void)distanceChanged:(double)distance;
- (void)gpsAccuracyChanged:(double)accuracy;
- (void)coordinateChanged:(CLLocation *)location;
- (void)stepChanged:(NSInteger)step;
- (void)durationChanged:(NSInteger)duration;
- (void)paceChanged:(double)pace;
- (void)calorieChanged:(NSInteger)calorie;
- (void)needsGpsAccess;

Force fetch data as RDManager can run and share data between ViewControllers:

- (void)fetchData;

Author

Aki Xavier, [email protected]

License

RDMgr is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "RDMgr",
    "version": "0.1.6",
    "summary": "running data recorder.",
    "description": "a longer description to meet lib lint",
    "homepage": "https://github.com/akirakazu/RDMgrCocoa",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Aki Xavier": "[email protected]"
    },
    "source": {
        "git": "https://github.com/akirakazu/RDMgrCocoa.git",
        "tag": "0.1.6"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source_files": "RDMgr/Classes/**/*",
    "dependencies": {
        "MTDates": []
    }
}

Pin It on Pinterest

Share This