Nil value sent on beaconConnection(connection: ESTBeaconConnection!, didDisconnectWithError error: NSError!)

The error value in didDisconnectWithError is nil sometimes; specially after disconnecting. But the protocol is defined as NSError! in Swift, implying that always a non-nil will be sent.

I think the SDK should be updated:

  • To always send a non-nil value as NSError! protocol implies.
  • Or, to update the protocol as NSError?


Good catch. “nil” is a perfectly valid value here, in a situation when there was no error during disconnection, but ideally it’d be an optional (NSError?) then.

We’ll look into that, and for now we just recommend explicitly checking it for nil (which’ll be required once we switch to an optional anyway).