Closed JoeyBodnar closed 5 years ago
@JoeyBodnar, eddystoneUID is the serial number of the beacon.
We logged the value of eddystoneUID
and it contained more info that just the serial number. The string did contain the serial number, but the serial number was only part of a long string of other random letters/numbers. Is there a way to specifically get just the serial number?
The last 12 characters of eddystoneUID
is the serial number of the beacon. You can extract the serial number from that.
I am trying to get the eddystoneUID
from the beacon but it is reading as nil. I should note, I am trying this from the func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse
method. This is what I'm trying
response.notification.request.content.userInfo["EddystoneUID"]
However the value is nil. response.notification.request.content.userInfo["EddystoneURL"]
works for the URL though.
@JoeyBodnar, The notification object doesn't have the EddystoneUID
and the UNNotification
has only EddystoneURL
. Is there any requirement for the serial number?
oh. Yes, we are trying to cache the beacons so the user can go back and view the data associated with them, and to do so we need the serial number since that is what can connect a beacon to our object. So there is no way to get this info when opening the app from a notification?
Is the data the user going to view from your app or the campaign that you're running via the Beaconstac dashboard? The reason I ask is because the campaign may change later.
If you want to cache the actual campaign that was running at that time, the URL will suffice.
It is data from our app.
Is there any way to pass any custom information in this method? Or EddystoneURL is the only thing we get and that cannot be changed?
Is there any way at all possible to get any of these properties from the notification?
eddystoneURL eddystoneUID physicalWebDescription physicalWebEddyStoneURL physicalWebIcon physicalWebTitle physicalWebUpdated
or pass any other data to the notification? Or the EddystoneURL is the only thing we have access to?
@JoeyBodnar, You cannot pass any data to the notification object. You can only read from it. I am working on fix, will release it soon. Do you need all these properties or just the eddystoneUID
?
just the eddystoneUID is fine, not all of them. As long as I can get the serial number then that will be good enough. Thank you!
when should the new version be released? is there an estimated date?
@JoeyBodnar, I have released the new version 2.0.0.
thank you! will try it now.
I just updated to v2.0 and I am getting an error on this line:
let isNearBeeNotification = nearBee.checkAndProcessNearbyNotification(response.notification, queryParameters: ["authToken" : authToken])
The error says "Extra argument 'queryParameters' in call". How are we supposed to pass the query parameters then?
Hi @JoeyBodnar, Sorry few commits got reverted somehow. I have updated the source. You have to run the following commands
rm -rf Pods
rm -rf Podfile.lock
pod cache clean 'NearBee' --all
pod install
ok thanks, will try it now!
Beacons have the following properties available on iOS:
Judging from this, it does not appear possible to get the serial number of a beacon inside the app. Is there another way I haven't noticed?
Thanks