Skip to content

johnmckerrell/LocationManagerSimulator

Repository files navigation

LocationManagerSimulator
------------------------

John McKerrell
johnmckerrell.com

This is a basic wrapper for the CLLocationManager class in the
iPhone SDK CoreLocation framework. It is intended to allow you
to get real test data into the iPhone Simulator by replaying
existing GPX files.

I've added stratford.gpx and stratford.plist files which can
be used as a demo, many more that could be used for testing
can be found here: http://www.openstreetmap.org/traces

If you find a good demo feel then fork the project add the
file and push it back to me.

Known Issues
------------
stopUpdatingLocation does work but when you restart it will
not start from the same point, it will be as if you continued
on the journey, which may be correct but I imagine some people
would prefer if you carried on where you left off.

Might be nice if this was a proper framework instead of a few
classes that you had to add to your project.

Preparing files
---------------
You will need to find or create a GPX file and convert it into
a plist using the gpx2plist.sh shell script:
    gpx2plist.sh myfile.gpx myfile.plist

Then add the plist file to your project's resources.

To use.. for now just drag this directory into your project then:

#import "LocationManagerSimulator.h"

...

LocationManagerSimulator *locationManager;

// It is also possible to just use init which will look
// for a file called "simulated-locations.plist"
// and multiplier of 1.0
locationManager = [[LocationManagerSimulator alloc] initWithFilename:@"test-gps" andMultiplier:3.0];

// continue in the normal way.

About

A simulator for the CLLocationManager class in the iPhone SDK.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published