diff --git a/FindMySync.xcodeproj/project.pbxproj b/FindMySync.xcodeproj/project.pbxproj index 99d9740..d866d9e 100644 --- a/FindMySync.xcodeproj/project.pbxproj +++ b/FindMySync.xcodeproj/project.pbxproj @@ -415,7 +415,7 @@ CODE_SIGN_ENTITLEMENTS = FindMySync/FindMySync.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = "20240317-1135"; + CURRENT_PROJECT_VERSION = "20240318-2212"; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = FindMySync/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = FindMySync; @@ -441,7 +441,7 @@ CODE_SIGN_ENTITLEMENTS = FindMySync/FindMySync.entitlements; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = "20240317-1135"; + CURRENT_PROJECT_VERSION = "20240318-2212"; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = FindMySync/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = FindMySync; diff --git a/FindMySync/Synchronizer.swift b/FindMySync/Synchronizer.swift index 0d77f73..e9b42f6 100644 --- a/FindMySync/Synchronizer.swift +++ b/FindMySync/Synchronizer.swift @@ -104,6 +104,9 @@ class Synchronizer { var index = genaHexString.startIndex while index < genaHexString.endIndex { + guard genaHexString.distance(from: index, to: genaHexString.endIndex) >= 2 else { + break + } let byteString = genaHexString[index.. 0 { - var genaHexString = gena[0] - if gena[0].count > 0 { + var genaHexString = gena[0] + let data = getKeyData(from: genaHexString) keyData = Data(data) @@ -181,7 +184,7 @@ class Synchronizer { log("Error: Cannot get Beacon key data.\nPlease try to run the below command on your Terminal, and save the \"gena\" value (it looks like \"0xABCDEF...7890\" without spaces) to the Extras panel.") log("/usr/bin/security find-generic-password -l BeaconStore -g") } else { - log("Got Beacon key data!! Phewww!") + log("Got Beacon key data (\(keyData.count) byte(s))") let key = SymmetricKey(data: keyData) @@ -264,6 +267,8 @@ class Synchronizer { { beaconNames[identifier] = name } + } else { + log("Error: Cannot decrypt beacon name record \(namingItem.lastPathComponent)") } } } @@ -287,6 +292,8 @@ class Synchronizer { sharedBeaconMap[identifier] = ownerBeaconIdentifier } } + } else { + log("Error: Cannot decrypt shared beacon record \(sharedRecord.lastPathComponent)") } } } @@ -352,6 +359,8 @@ class Synchronizer { } } + } else { + log("Error: Cannot decrypt beacon location record \(locationItem.lastPathComponent)") } } } diff --git a/README.md b/README.md index fcbb498..8c5ecad 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ Please contribute using [GitHub Flow](https://guides.github.com/introduction/flo ## **Changelog** -- **v1.2 / 20240317-1135** +- **v1.2 / 20240318-2212** - Add Sonoma 14.4 support (Thanks to [@YeapGuy](https://github.com/YeapGuy) and [@airy10](https://github.com/airy10)) ## **License**