0

Just upgraded to the latest beta and i'm getting this error: enter image description here

Any ideas?

Code is:

func testFileStatusNotifications() {

    let x : XCNotificationExpectationHandler = { (n : NSNotification!) -> Bool in

        // Extract userInfo
        let u = n.userInfo!

        let dict = u.values.first as! [String : Double]
        let percent = dict["percent"]!

        return (percent > 10)
    }

It appears that the handler type must have changed:

typealias XCNotificationExpectationHandler = (NSNotification) -> ObjCBool

as it now is of type ObjCBool

Jeef
  • 26,861
  • 21
  • 78
  • 156

1 Answers1

0
func testFileStatusNotifications() {

    let x : XCNotificationExpectationHandler = { (n : NSNotification!) -> ObjCBool in

        // Extract userInfo
        let u = n.userInfo!
        let dict = u.values.first as! [String : Double]
        let percent = dict["percent"]!

        let ret =  (percent > 10)
        return ObjCBool(ret)
    }

That seems to have fixed things.

Jeef
  • 26,861
  • 21
  • 78
  • 156