I'm trying to chain some promise on promise kit, I have syntax problem when the promise type is like this Promise<Location>
, only when the promise has a type I get compiler error. I'm new on using promisekit
Swift.start(host,"","").then{ result -> Void in
}.then{ obj -> Void in
println(obj)
Swift.getCurrent.then{ obj -> Void in
let payload:Dictionary<String,AnyObject> = obj as! Dictionary<String,AnyObject>
self.deviceUUID = payload["uuid"] as! String
}
}.then { obj -> Location in
println(obj)
Swift.getLocation("3333").then{ location in
self.locationUUID = location.get("uuid")
}
}