The ATTError enum does not include (and cannot be extended to include) additional common profile and service error codes, as per the spec: https://www.bluetooth.com/wp-content/uploads/Files/Specification/HTML/CSS_v12/out/en/supplement-to-the-bluetooth-core-specification/common-profile-and-service-error-codes.html
In particular, because peripheral.willWrite expects a block that returns an ATTError?, it's not possible to return any of these additional error codes (or application-specific error codes).
The
ATTErrorenum does not include (and cannot be extended to include) additional common profile and service error codes, as per the spec: https://www.bluetooth.com/wp-content/uploads/Files/Specification/HTML/CSS_v12/out/en/supplement-to-the-bluetooth-core-specification/common-profile-and-service-error-codes.htmlIn particular, because
peripheral.willWriteexpects a block that returns anATTError?, it's not possible to return any of these additional error codes (or application-specific error codes).