How do we properly test for nils?
Xcode 7.01 is throwing a new error we didn't have before.
We are receiving this error:
"Binary operator '!=' cannot be applied to operands of type '[NSObject: Anyobject]' and 'NilLiteralConvertible'"
..from this code:
// send request data to phone and handle reply or error
var didOpenParent : Bool = WKInterfaceController.openParentApplication(requestData, reply: { (reply, error) -> Void in
// if we get a response, handle it appropriately
if error == nil && reply != nil
{
// code continues
Apple's documentation gives examples of testing for nils using "!=" as we are doing. Trying some the answers suggested here such as checking if reply.isEqual(nil) or reply.isEmpty did not work for us.
What are we missing?