2021年4月24日星期六

ParseSwift.initialize shows Cannot convert value of type error

I figure that it is time to start using Swift so I am working on a complete rewrite of an obj C app. This app uses Parse Server and CocoaPods. Following the ParseSwift documentation example in my AppDelegate.swift I added

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

and so on ... But the initialize line is showing an error

Cannot convert value of type '((URLAuthenticationChallenge, (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void).Type' to expected argument type '((URLAuthenticationChallenge, (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?'

https://stackoverflow.com/questions/67249638/parseswift-initialize-shows-cannot-convert-value-of-type-error April 25, 2021 at 12:00PM

没有评论:

发表评论