-
-
Notifications
You must be signed in to change notification settings - Fork 132
Live query 1.0.1 release compiler errors #52
Description
Ran pod update and installed latest version of 1.0.1 of the ParseLiveQuery Library.
Went to compile again and now receiving error in BoltsHelpers.swift
"Value of type 'TaskCompletionSource' has no member 'trySetError'
Installing Bolts (1.8.4)
Installing Bolts-Swift (1.2.0)
Installing BuddyBuildSDK (1.0.9)
Installing CardIO (5.3.2)
Installing Crashlytics (3.7.2)
Installing Fabric (1.6.7)
Installing IQKeyboardManagerSwift (4.0.4)
Installing Parse (1.14.2)
Installing ParseLiveQuery (1.0.1)
Installing SidebarOverlay (3.0.0)
Installing SocketRocket (0.5.1)
Installing Stripe (8.0.3)
these are my pod files and versions.
=== SOLUTION ===
- Removed all Derived Data in Xcode
- Performed a code clean (CMD + K)
- Fixed problematic code location (as Xcode indicated)
internal func swiftTask(task: BFTask) -> Task {
let taskCompletionSource = TaskCompletionSource()
task.continueWithBlock { task in
if task.cancelled {
taskCompletionSource.tryCancel()
} else if let error = task.error where task.faulted {
taskCompletionSource.trySet(error: error)
// taskCompletionSource.trySetError(error)
} else if let result = task.result {
taskCompletionSource.trySet(result: result)
// taskCompletionSource.trySetResult(result)
} else {
fatalError("Unknown task state")
}
return nil
}
return taskCompletionSource.task
}
Above is the location where taskCompletionSource has an incorrect method signature "trySetResult". This method no longer exists and it appears it has been combined into an overloaded, single method called "trySet".
By changing this to the code above taskCompletionSource.trySet(result: result), I was able to compile successfully.