Swift double unwrapping of Optionals
问题 I understand what optional are in Swift but I just encountered a ”Double Wrapped Optional’ , where if I don’t use two '!' Xcode gives an complier error Value of optional type 'String?' not unwrapped; did you mean to use '!' or ‘?'? I have the following code, where app is of type NSRunningApplication . let name: String = app.localizedName! Why should I have to use two ! ? Isn’t one enough to unwrap the variable because it is of type var localizedName: String? . Context: Xcode want me to use