MSMessage senderParticipantIdentifier missing nullable annotation

Originator:rob
Number:rdar://27997457 Date Originated:24-Aug-2016
Status:Open Resolved:
Product:iOS SDK Product Version:Beta 6
Classification:Serious bug Reproducible:Always
 
Summary:
MSMessage senderParticipantIdentifier is not marked as `nullable` in the MSMessage.h header file but the documentation states that this property is nil when a new MSMessage is instantiated. Accessing this property while the value is nil in Swift will crash the application and there is no way to check for nil on a non-optional property.

Steps to Reproduce:
Run the following code in Swift:
    let message = MSMessage(session: MSSession())
    let uuid = message.senderParticipantIdentifier
    print(uuid)

Expected Results:
I expect the type of `uuid` to be `UUID?` and that the code won’t crash.

Actual Results:
The type of `uuid` is `UUID` and the code crashes on the line `let uuid = message.senderParticipantIdentifier`.

Regression:
NA

Notes:
NA

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!