Skip to content

Commit

Permalink
mac14.4-extra
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinPham committed Mar 18, 2024
1 parent 38cc8b0 commit 26f203a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions FindMySync.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
15 changes: 12 additions & 3 deletions FindMySync/Synchronizer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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..<genaHexString.index(index, offsetBy: 2)]
let byte = UInt8(byteString, radix: 16)!
data.append(byte)
Expand Down Expand Up @@ -165,9 +168,9 @@ class Synchronizer {
gena = gena[1].components(separatedBy: " \"")

if gena.count > 0 {
var genaHexString = gena[0]

if gena[0].count > 0 {
var genaHexString = gena[0]

let data = getKeyData(from: genaHexString)

keyData = Data(data)
Expand All @@ -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)

Expand Down Expand Up @@ -264,6 +267,8 @@ class Synchronizer {
{
beaconNames[identifier] = name
}
} else {
log("Error: Cannot decrypt beacon name record \(namingItem.lastPathComponent)")
}
}
}
Expand All @@ -287,6 +292,8 @@ class Synchronizer {
sharedBeaconMap[identifier] = ownerBeaconIdentifier
}
}
} else {
log("Error: Cannot decrypt shared beacon record \(sharedRecord.lastPathComponent)")
}
}
}
Expand Down Expand Up @@ -352,6 +359,8 @@ class Synchronizer {
}

}
} else {
log("Error: Cannot decrypt beacon location record \(locationItem.lastPathComponent)")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**
Expand Down

0 comments on commit 26f203a

Please sign in to comment.