googlesamples / ios-nearby

68 stars 30 forks source link

How to scan for Eddystone's UID? #36

Open ritesh124 opened 6 years ago

ritesh124 commented 6 years ago

In Android there is a function which can filter the google nearby messages for a particular Eddystone or iBeacon id. i.e.

MessageFilter messageFilter = new MessageFilter.Builder()
  .includeEddystoneUids(MY_EDDYSTONE_UID_NAMESPACE, null /* any instance */)
  .build();

How do we do that in iOS? Function provided is below:

let beaconSubscription = messageManager.subscriptionWithMessageFoundHandler(
    myMessageFoundHandler, messageLostHandler: myMessageLostHandler,
    paramsBlock: { (params: GNSSubscriptionParams!) in
      params.deviceTypesToDiscover = .BLEBeacon
      params.messageNamespace = "com.mycompany.mybeaconservice"
      params.type = "mybeacontype"
    })

Basically in Android its simple, we just give the particular Eddystone UID & bam. But in iOS I need help.

felipesanti commented 5 years ago

Hi, this is also important for our use case, anyone in Nearby team working on this?