CLBeaconIdentityConstraint wildcards

Hi,

I am trying to understand how the wildcarding works with CLBeaconIdentityConstraint. The documentation states the following:

Constraints always specify a UUID value, but the major and minor values are optional.

However, CLBeaconIdentityConstraint comes with the following initializers:

  • init(uuid: UUID)
  • init(uuid: UUID, major: CLBeaconMajorValue)
  • init(uuid: UUID, major: CLBeaconMajorValue, minor: CLBeaconMinorValue)

This tells me that you cannot specify a wildcard for both major and minor independently, but rather only for minor or for both major and minor. I do work with beacons that have a weird major mixed in with other data. The idea I want to achieve is to wildcard major, while still being able to supply a minor value. I don't always need this option, but sometimes I don't need/want to know the major but filter out some minor values.

Since this class is coming from Objective-C, it works with NSNumber internally (and in Swift they are optional getters), however through the initialisers specified above, I cannot nil the major value. Even in Objective-C the initializers are not exposing the NSNumber object.

Is there any approach that does not involve runtime ObjC "hacks" to nil the major NSNumber backing object?

Does it make sense to try and nil the major while keeping the minor? Will Core Location still supply beacons just fine?

Thanks