• How to get the most out of iPhone Tracker on Leopard and how does it impact our privacy
  • How to get the most out of iPhone Tracker on Leopard and how does it impact our privacy
    Written by battye
    Sat Apr 23, 2011 7:43 am

    Recently people have been talking about how iPhones are tracking movements of users and how the Mac app iPhone Tracker is displaying this data visually. Personally I don't see it as a huge problem because the phone companies already know this information, and many Apps require location data anyway. It looks like locations are recorded from the present dating back to when the iPhone was last restored, but I cannot be certain of this.

    For people that are concerned about their privacy, there is some good news. It appears to me that the iPhone is recording locations by triangulating signals from cell phone towers and sometimes there are some very obvious outliers. For instance, I was recently in England and it recorded a couple of dozen locations that I was nowhere near (see the many yellow dots that are isolated):


    I'm not sure if it just happened to pick up a long range signal from a tower in Oxford and recorded it accordingly, but I certainly wasn't anywhere near there. I have to agree with the comments I've read by other users, it gives a general sense of where you have been rather than pinpoint accuracy. For instance, I drive some routes very often so I was expecting to see those highways littered with markers - but they were not. Yet some locations which I have only been to a handful of times over the past year were littered with markers.

    The larger (and darker) the circles are, the more time you have spent in a certain area and in this sense the application is most accurate. For instance, when I was in England it accurately recorded that I spent a lot of time in London and Windsor. Here is a zoomed in version of the same area:


    And of only London:


    Now for the technical part of this article. I figure that most people who have Xcode would work this out for themselves anyway, so there seems to be no point in hiding the procedures below.

    How to get iPhone Tracker working on Leopard

    Download the source code from Github (https://github.com/petewarden/iPhoneTracker) and then open the file iPhoneTracking.xcodeproj in Xcode.

    In the top left, you will see the program referencing an unknown SDK (macosx10.6). Simply change this to Mac OS X 10.5 (so 10.5 | Debug | i386 should now appear as the selected option). If you now try clicking the "Build and Go" button (the play button with the hammer) you should get one compile error. In the bottom left, you will see a red cross with a "1" next to it - click this. The error you should see is "Error: cannot find protocol declaration for 'NSApplicationDelegate'". Double click this error, and the file iPhoneTrackingAppDelegate.h will open. This line should be highlighted:

    @interface iPhoneTrackingAppDelegate : NSObject <NSApplicationDelegate> {

    The fix is easy. NSApplicationDelegate was introduced in version 10.6, which is why on Leopard it cannot be found. All that needs to be done, is the line replaced with this:

    @interface iPhoneTrackingAppDelegate : NSObject {

    Then click "Build and Go" again, click "Save All" when prompted, and a blank screen titled "iPhoneTracker" should appear. After a few seconds, as it is downloading map images from the internet, the iPhone locations should be displayed.

    How to track locations more precisely

    By default, the application groups locations. If you want to see where you were with greater accuracy, it is fairly easy to do this:

    In iPhoneTrackingAppDelegate.m, find:

    const float precision = 100;
    NSMutableDictionary* buckets = [NSMutableDictionary dictionary];

    Change precision to a much higher number, say 1000000. The difference is noticable... when the precision is lower locations will be grouped almost in grid like positions (with larger, different coloured markers) whereas with a higher precision individual locations will be distinguished.


    How to see your location on a certain date

    Also in iPhoneTrackingAppDelegate.m, find the following lines:

    NSString* allKey = [NSString stringWithFormat:@"%f,%f,All Time", latitude_index, longitude_index];
    NSString* timeKey = [NSString stringWithFormat:@"%f,%f,%@", latitude_index, longitude_index, timeBucketString];

    Below that, add:

    // Log locations
    NSString *myFileWritingString = [NSString stringWithFormat:@"LATITUDE: %f, LONGITUDE: %f, DATE: %@", latitude_index, longitude_index, timeBucketString];
    NSLog(@"%@", myFileWritingString);

    Build and Go to re-compile the code, and wait about 30 seconds for the data to load (it takes longer as it is writing to the log as well as loading the location data now).

    Then click the Log - the black gdb button in Xcode - to view the output (ie. the latitude, longitude and date). The latitude and longitude can be entered into Google Maps to see the location.


    Overall, iPhone Tracker is an interesting application and more interesting still will be how Apple comment on why the iPhone tracks locations in the first place. A few estimates lead me to believe that it records locations several hundred times a day (from a quick look at the logs, I've seen anywhere between 4 and 900 locations recorded on a given day).
  • Article search