mirror of
https://github.com/AU-COVIDSafe/mobile-ios.git
synced 2025-04-19 21:15:21 +00:00
COVIDSafe code from version 1.6 (#6)
This commit is contained in:
parent
149daee2e9
commit
2063cea613
38 changed files with 1963 additions and 1664 deletions
|
@ -83,7 +83,13 @@ extension PeripheralController: CBPeripheralManagerDelegate {
|
|||
DLog("\(["request": request] as AnyObject)")
|
||||
EncounterMessageManager.shared.getAdvertisementPayload { (payloadToAdvertise) in
|
||||
if let payload = payloadToAdvertise {
|
||||
request.value = payload
|
||||
// check offset
|
||||
if request.offset > payload.count {
|
||||
peripheral.respond(to: request, withResult: .invalidOffset)
|
||||
return;
|
||||
}
|
||||
|
||||
request.value = payload.advanced(by: request.offset)
|
||||
peripheral.respond(to: request, withResult: .success)
|
||||
} else {
|
||||
DLog("Error getting payload to advertise")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue