diff --git a/Icon.icns b/Icon.icns
new file mode 100644
index 0000000..e6e6db0
Binary files /dev/null and b/Icon.icns differ
diff --git a/iPhoneTracking-Info.plist b/iPhoneTracking-Info.plist
index 8ae9b58..fd99387 100644
--- a/iPhoneTracking-Info.plist
+++ b/iPhoneTracking-Info.plist
@@ -7,7 +7,7 @@
CFBundleExecutable
${EXECUTABLE_NAME}
CFBundleIconFile
- Icon.png
+ Icon.icns
CFBundleIdentifier
com.yourcompany.${PRODUCT_NAME:rfc1034identifier}
CFBundleInfoDictionaryVersion
diff --git a/iPhoneTracking.xcodeproj/project.pbxproj b/iPhoneTracking.xcodeproj/project.pbxproj
index 14c99b4..30493a0 100644
--- a/iPhoneTracking.xcodeproj/project.pbxproj
+++ b/iPhoneTracking.xcodeproj/project.pbxproj
@@ -10,6 +10,7 @@
00F0B7F4135A97350017896A /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 00F0B7F3135A97350017896A /* Icon.png */; };
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
256AC3DA0F4B6AC300CF3369 /* iPhoneTrackingAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 256AC3D90F4B6AC300CF3369 /* iPhoneTrackingAppDelegate.m */; };
+ 4226580B1364DE7B007F9FAF /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 4226580A1364DE7B007F9FAF /* Icon.icns */; };
59C0BD6D135A545200378314 /* readme.asciidoc in Resources */ = {isa = PBXBuildFile; fileRef = 59C0BD6C135A545200378314 /* readme.asciidoc */; };
59F0A2FF135922A600098746 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 59F0A2FE135922A500098746 /* WebKit.framework */; };
59F0A3081359237800098746 /* index.html in Resources */ = {isa = PBXBuildFile; fileRef = 59F0A3071359237800098746 /* index.html */; };
@@ -36,6 +37,7 @@
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; };
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; };
+ 4226580A1364DE7B007F9FAF /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Icon.icns; sourceTree = ""; };
59C0BD6C135A545200378314 /* readme.asciidoc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = readme.asciidoc; sourceTree = ""; wrapsLines = 1; };
59F0A2FE135922A500098746 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
59F0A3071359237800098746 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = index.html; sourceTree = ""; };
@@ -133,6 +135,7 @@
isa = PBXGroup;
children = (
00F0B7F3135A97350017896A /* Icon.png */,
+ 4226580A1364DE7B007F9FAF /* Icon.icns */,
59F0A63B135A4FDB00098746 /* Credits.html */,
8D1107310486CEB800E47090 /* iPhoneTracking-Info.plist */,
59F0A3071359237800098746 /* index.html */,
@@ -223,6 +226,7 @@
59F0A63D135A4FDC00098746 /* Credits.html in Resources */,
59C0BD6D135A545200378314 /* readme.asciidoc in Resources */,
00F0B7F4135A97350017896A /* Icon.png in Resources */,
+ 4226580B1364DE7B007F9FAF /* Icon.icns in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/iPhoneTrackingAppDelegate.m b/iPhoneTrackingAppDelegate.m
index 9971824..c23c203 100644
--- a/iPhoneTrackingAppDelegate.m
+++ b/iPhoneTrackingAppDelegate.m
@@ -78,7 +78,7 @@ - (void)loadLocationDB
NSString* backupPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Application Support/MobileSync/Backup/"];
NSFileManager *fm = [NSFileManager defaultManager];
- NSArray* backupContents = [[NSFileManager defaultManager] directoryContentsAtPath:backupPath];
+ NSArray* backupContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:backupPath error:nil];
NSMutableArray* fileInfoList = [NSMutableArray array];
for (NSString *childName in backupContents) {
@@ -185,16 +185,15 @@ - (BOOL)tryToLoadLocationDB:(NSString*) locationDBPath forDevice:(NSString*) dev
const float latitude = [latitude_number floatValue];
const float longitude = [longitude_number floatValue];
- const float timestamp = [timestamp_number floatValue];
-
- // The timestamps seem to be based off 2001-01-01 strangely, so convert to the
- // standard Unix form using this offset
- const float iOSToUnixOffset = (31*365.25*24*60*60);
- const float unixTimestamp = (timestamp+iOSToUnixOffset);
if ((latitude==0.0)&&(longitude==0.0)) {
continue;
}
+
+ // The timestamps are based off 2001-01-01 because that's "NSDate" reference time,
+ // so convert to the standard Unix form using the offset from "NSTimeInvervalSince1970"
+ //const float unixTimestamp = (timestamp+NSTimeIntervalSince1970);
+ const float unixTimestamp = [[NSDate dateWithTimeIntervalSinceReferenceDate:[timestamp_number floatValue]] timeIntervalSince1970];
const float weekInSeconds = (7*24*60*60);
const float timeBucket = (floor(unixTimestamp/weekInSeconds)*weekInSeconds);
diff --git a/parsembdb.m b/parsembdb.m
index dd2e513..abc6bb8 100644
--- a/parsembdb.m
+++ b/parsembdb.m
@@ -180,7 +180,7 @@ + (NSDictionary*) getFileListForPath:(NSString*)path
char* hexArray = "0123456789abcdef";
- NSNumber* filecount = getint(data, &offset, 4); // 4-byte count of records
+ /*NSNumber* filecount = */getint(data, &offset, 4); // 4-byte count of records
while (offset < dataLength) {
// 26 byte record, made up of ...
char* fileID_string = malloc(41);
@@ -198,7 +198,7 @@ + (NSDictionary*) getFileListForPath:(NSString*)path
offset = offset + 20;
NSNumber* mbdb_offset = getint(data, &offset, 4); // 4-byte offset field
mbdb_offset = [NSNumber numberWithInteger: ([mbdb_offset integerValue] + 6)]; // Add 6 to get past prolog
- NSNumber* mode = getint(data, &offset, 2); // 2-byte mode field
+ /*NSNumber* mode = */getint(data, &offset, 2); // 2-byte mode field
[mbdx setObject:fileID_nsString forKey: mbdb_offset];
}