diff --git a/Classes/Promise+ObjC.swift b/Classes/Promise+ObjC.swift index bc99335..7d76632 100644 --- a/Classes/Promise+ObjC.swift +++ b/Classes/Promise+ObjC.swift @@ -29,7 +29,7 @@ extension Promise where ValueType : AnyObject { so as a workaround, this goes down the rejection path with a BAPromiseNilErrors if the ObjC promise fulfills with a nil */ public convenience init(from: BAPromise) { self.init() - let cancelToken = from.done({ (value: ValueType?) in + let cancelToken:BACancelToken = from.done({ (value: ValueType?) in if let value = value { self.fulfill(with: .success(value)) } else { @@ -38,10 +38,10 @@ extension Promise where ValueType : AnyObject { }, rejected:{ error in self.fulfill(with: .failure(error)) }, finally:{ - + // noop }) self.cancelled({ - from.cancel() + cancelToken.cancel() }, on: DispatchQueue.main) } } diff --git a/Podfile b/Podfile index 3cbb7dc..30b9c17 100644 --- a/Podfile +++ b/Podfile @@ -1,4 +1,4 @@ -xcodeproj 'BAPromise' +project 'BAPromise' use_frameworks! target 'iOS' do