Swift - CoreBluetooth's CBCharacteristicProperties is enum on OS X
| Originator: | bradfol | ||
| Number: | rdar://20406373 | Date Originated: | 2015/04/02 |
| Status: | Open | Resolved: | |
| Product: | OS X SDK | Product Version: | 10.10.2 |
| Classification: | Reproducible: | Yes |
Summary: The initializer for CBMutableCharacteristic takes a properties parameter of type CBCharacteristicProperties. It is possible to pass a single value, or to pass multiple values using the bitwise OR operator. Using Swift on the iOS platform, this works as expected. However, using Swift on the OS X platform, it is not possible to pass multiple values for the properties parameter. On OS X, CBCharacteristicProperties is implemented as an enum. Therefore, it is possible to use the bitwise OR operator on its values. The attached screenshot shows that CBCharacteristicProperties uses a different construct between iOS and OS X. Steps to Reproduce: Expected Results: Like on iOS, CBCharacteristicProperties on OS X should be implemented as a struct that adopts RawOptionSetType. Actual Results: CBCharacteristicProperties on OS X is an enum that does not allow the bitwise OR "|" operator. Version: Xcode 6.2 iOS 8.2 OS X Yosemite 10.10.2 Notes: http://stackoverflow.com/questions/29420894/swift-enum-and-cbcharacteristicproperties Screenshot: https://www.dropbox.com/s/9cefa3s3agss6vn/CBCharacteristicProperties.png?dl=0
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Marked as duplicate of 18401121