Я пытаюсь поймать маяк Eddystone-UID с помощью API Google Nearby Messages в iOS, он показывает 1 маяк в журналах, но onFoundHandler не вызывается.
Как я могу поймать этот маяк внутри onFoundHandler?
Код GNSBeaconStrategy:
paramsBlock:{ (params: GNSSubscriptionParams?) in
guard let params = params else { return }
//-------For Beacons -----//
params.deviceTypesToDiscover = .bleBeacon
params.beaconStrategy = GNSBeaconStrategy(paramsBlock: { (params: GNSBeaconStrategyParams!) in
params.includeIBeacons = false
params.lowPowerPreferred = false
params.allowInBackground = true
})
//---------------------------//
params.strategy = GNSStrategy(paramsBlock: { (params: GNSStrategyParams?) in
guard let params = params else { return }
params.allowInBackground = true
params.discoveryMediums = .BLE
})
})
Журналы:
2018-11-05 17:30:21.194933+0530 Genie[1006:71130] Report RPC request: 4 token(s), 1 beacon(s), 4 directive(s)
2018-11-05 17:30:21.890664+0530 Genie[1006:71130] Report RPC response: Success
2018-11-05 17:30:21.890964+0530 Genie[1006:71130] Report RPC response: 0 directive(s), 4 token(s), 1 message(s), 0 publication results(s), 0 unpublish results(s), 0 subscription results(s), 0 unsubscribe results(s)
2018-11-05 17:30:22.278112+0530 Genie[1006:71130] Tokens: 2 good, 0 bad, 2 broadcast
2018-11-05 17:30:22.278450+0530 Genie[1006:71130] Report RPC request: 4 token(s), 2 beacon(s), 4 directive(s)
2018-11-05 17:30:23.224090+0530 Genie[1006:71130] Report RPC response: Success
2018-11-05 17:30:23.224443+0530 Genie[1006:71130] Report RPC response: 0 directive(s), 4 token(s), 0 message(s), 0 publication results(s), 0 unpublish results(s), 0 subscription results(s), 0 unsubscribe results(s) Lost : Optional(32 bytes)
2018-11-05 17:30:26.440055+0530 Genie[1006:71130] Tokens: 2 good, 0 bad, 2 broadcast
2018-11-05 17:30:26.440400+0530 Genie[1006:71130] Report RPC request: 4 token(s), 2 beacon(s), 4 directive(s)
2018-11-05 17:30:27.192833+0530 Genie[1006:71130] Report RPC response: Success
2018-11-05 17:30:27.193124+0530 Genie[1006:71130] Report RPC response: 0 directive(s), 4 token(s), 0 message(s), 0 publication results(s), 0 unpublish results(s), 0 subscription results(s), 0 unsubscribe results(s)
2018-11-05 17:30:31.849780+0530 Genie[1006:71130] Tokens: 2 good, 0 bad, 2 broadcast
2018-11-05 17:30:31.850124+0530 Genie[1006:71130] Report RPC request: 4 token(s), 2 beacon(s), 4 directive(s)
2018-11-05 17:30:32.520768+0530 Genie[1006:71130] Report RPC response: Success
2018-11-05 17:30:32.521072+0530 Genie[1006:71130] Report RPC response: 0 directive(s), 4 token(s), 0 message(s), 0 publication results(s), 0 unpublish results(s), 0 subscription results(s), 0 unsubscribe results(s)
2018-11-05 17:30:37.226566+0530 Genie[1006:71130] Tokens: 1 good, 1 bad, 2 broadcast
2018-11-05 17:30:37.227002+0530 Genie[1006:71130] Report RPC request: 3 token(s), 2 beacon(s), 4 directive(s)
2018-11-05 17:30:38.157719+0530 Genie[1006:71130] Report RPC response: Success
2018-11-05 17:30:38.158020+0530 Genie[1006:71130] Report RPC response: 0 directive(s), 3 token(s), 0 message(s), 0 publication results(s), 0 unpublish results(s), 0 subscription results(s), 0 unsubscribe results(s)
2018-11-05 17:30:42.327070+0530 Genie[1006:71130] Tokens: 1 good, 1 bad, 2 broadcast
2018-11-05 17:30:42.327418+0530 Genie[1006:71130] Report RPC request: 3 token(s), 2 beacon(s), 4 directive(s)
2018-11-05 17:30:43.242551+0530 Genie[1006:71130] Report RPC response: Success
2018-11-05 17:30:43.242853+0530 Genie[1006:71130] Report RPC response: 0 directive(s), 3 token(s), 0 message(s), 0 publication results(s), 0 unpublish results(s), 0 subscription results(s), 0 unsubscribe results(s)
2018-11-05 17:30:47.328020+0530 Genie[1006:71130] Tokens: 1 good, 1 bad, 2 broadcast
2018-11-05 17:30:47.328372+0530 Genie[1006:71130] Report RPC request: 3 token(s), 2 beacon(s), 4 directive(s)
2018-11-05 17:30:48.023183+0530 Genie[1006:71130] Report RPC response: Success
2018-11-05 17:30:48.023479+0530 Genie[1006:71130] Report RPC response: 0 directive(s), 3 token(s), 0 message(s), 0 publication results(s), 0 unpublish results(s), 0 subscription results(s), 0 unsubscribe results(s)
2018-11-05 17:30:52.732236+0530 Genie[1006:71130] Tokens: 1 good, 1 bad, 2 broadcast
2018-11-05 17:30:52.732584+0530 Genie[1006:71130] Report RPC request: 3 token(s), 2 beacon(s), 4 directive(s)
2018-11-05 17:30:53.402511+0530 Genie[1006:71130] Report RPC response: Success
2018-11-05 17:30:53.402809+0530 Genie[1006:71130] Report RPC response: 0 directive(s), 3 token(s), 0 message(s), 0 publication results(s), 0 unpublish results(s), 0 subscription results(s), 0 unsubscribe results(s)
2018-11-05 17:30:58.191318+0530 Genie[1006:71130] Tokens: 1 good, 1 bad, 2 broadcast
2018-11-05 17:30:58.191668+0530 Genie[1006:71130] Report RPC request: 3 token(s), 2 beacon(s), 4 directive(s)
2018-11-05 17:30:59.233391+0530 Genie[1006:71130] Report RPC response: Success
2018-11-05 17:30:59.233693+0530 Genie[1006:71130] Report RPC response: 0 directive(s), 3 token(s), 0 message(s), 0 publication results(s), 0 unpublish results(s), 0 subscription results(s), 0 unsubscribe results(s)
2018-11-05 17:31:03.655082+0530 Genie[1006:71130] Tokens: 1 good, 1 bad, 2 broadcast