Xcode 6.1.1: Swift UIDevice-identifierForVendor imported as implicitly unwrapped optional, but it can be nil

Originator:dieter.komendera
Number:rdar://19983253 Date Originated:27-Feb-2015 12:20 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 6.1.1 (6A2008a)
Classification:Serious Bug Reproducible:Always
 
Summary:

UIDevice-identifierForVendor is imported like that
    var identifierForVendor: NSUUID! { get } // a UUID that may be used to uniquely identify the device, same across apps from a single vendor.

The docs say it can be nil though:
If the value is nil, wait and get the value again later. This happens, for example, after the device has been restarted but before the user has unlocked the device.

https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice_Class/#//apple_ref/occ/instp/UIDevice/identifierForVendor

Thus it should be imported as an Optional

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!