ParseSwift.initialize无法转换错误类型的值

ParseSwift.initialize无法转换错误类型的值,swift,parse-platform,Swift,Parse Platform,我想是时候开始使用Swift了,所以我正在完全重写一个obj C应用程序。此应用程序使用解析服务器和CoCoapod。在my AppDelegate.swift中的ParseSwift文档示例之后,我添加了 import ParseSwift class AppDelegate: UIResponder, UIApplicationDelegate, CLLocationManagerDelegate { func application(_ application: UIApplicati

我想是时候开始使用Swift了,所以我正在完全重写一个obj C应用程序。此应用程序使用解析服务器和CoCoapod。在my AppDelegate.swift中的ParseSwift文档示例之后,我添加了

import ParseSwift

class AppDelegate: UIResponder, UIApplicationDelegate, CLLocationManagerDelegate {

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
        
        ParseSwift.initialize(applicationId: "AppID", clientKey: "", serverURL: URL(string: "https://server")!, liveQueryServerURL: URL(string: "https://server")!, authentication: ((URLAuthenticationChallenge,(URLSession.AuthChallengeDisposition,URLCredential?) -> Void) -> Void))
等等。。。但是初始化行显示错误

无法将类型“((URLAuthenticationChallenge,(URLSession.AuthChallengeDisposition,URLCredential?->Void)->Void).类型”的值转换为预期的参数类型“((UrlAuthenticationChallengeDisposition,(URLSession.AuthChallengeDisposition,URLCredential?->)->Void)?”


身份验证是一个可选字段,因此不需要传递值

如果您没有对身份验证进行任何操作(大多数情况下),则不应传递任何内容:

ParseSwift.initialize(applicationId:“AppID”,
clientKey:“”,
服务器URL:URL(字符串):https://server")!)
当您计划将身份验证用于证书固定时,应将其用作尾随闭包:

ParseSwift.initialize(applicationId:“AppID”,
clientKey:“”,
服务器URL:URL(字符串):https://server“{(质询、凭证)在中”
凭证(.performDefaultHandling,无)
}

您不能这样初始化它
URLAuthenticationChallenge
URLSession.AuthChallengeDisposition
URLCredential?
只是一种类型。您需要一个实际的、实例化的对象