hi, i want use anypromise in swift, but get a error.
a603938361 opened this issue · comments
charles commented
charles commented
Because the network framework returns the data by OC, the return value is anypromise, I want to use promise in swift, But I don't know how to convert。 Please help me, thank you。
Max Howell commented
This is fine, chances are the error is hiding. Separate out the steps to see what the error actually is:
let wxModule = WxShareModule()
let a = wxModule.fetchThings()
let b = a.map{ $0 as! [String] }
let c = b.done { }
charles commented
Max Howell commented
I suggest you read our tests and use an example from there: https://github.com/mxcl/PromiseKit/blob/v6/Tests/Bridging/BridgingTests.swift