Skip to content
This repository was archived by the owner on Jun 13, 2023. It is now read-only.
This repository was archived by the owner on Jun 13, 2023. It is now read-only.

Live query 1.0.1 release compiler errors #52

@liltimtim

Description

@liltimtim

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 ===

  1. Removed all Derived Data in Xcode
  2. Performed a code clean (CMD + K)
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions