ParseSwift
public struct ParseSwift
ParseSwift
contains static methods to handle global configuration for the Parse framework.
-
initialize(applicationId:
clientKey: masterKey: serverURL: liveQueryServerURL: keyValueStore: authentication: ) Configure the Parse Server. This should only be used when starting your app. Typically in the
application(... didFinishLaunchingWithOptions launchOptions...)
.Declaration
Swift
static public func initialize( applicationId: String, clientKey: String? = nil, masterKey: String? = nil, serverURL: URL, liveQueryServerURL: URL? = nil, keyValueStore: ParseKeyValueStore? = nil, authentication: ((URLAuthenticationChallenge, (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? = nil )
Parameters
applicationId
The application id of your Parse application.
clientKey
The client key of your Parse application.
masterKey
The master key of your Parse application.
serverURL
The server URL to connect to Parse Server.
liveQueryServerURL
The server URL to connect to Parse Server.
keyValueStore
A key/value store that conforms to the
ParseKeyValueStore
protocol. Defaults tonil
in which one will be created an memory, but never persisted. For Linux, this this is the only store available since there is no Keychain. Linux users should replace this store with an encrypted one.authentication
A callback block that will be used to receive/accept/decline network challenges. Defaults to
nil
in which the SDK will use the default OS authentication methods for challenges. It should have the following argument signature:(challenge: URLAuthenticationChallenge, completionHandler: (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void
. See Apple’s documentation for more for details.