XPMobileSDKConnectionDelegate

@objc
public protocol XPMobileSDKConnectionDelegate

XPMobileSDKConnectionDelegate - Connection delegate protocol which needs to be implemented in order a connection to server to be achieved, and then to be added as delegate to XPMobileSDK class.

  • Sent to observers when connection has logged in.

    Declaration

    Swift

    @objc
    optional func connectionDidLogIn(_ connection: XPSDKConnection)
  • Sent to observers when connection has failed to log in. Check the error to determine if it was due to incorrect credentials! Note that error may be a null object if we have failed to even parse the response from the server.

    Declaration

    Swift

    @objc
    optional func connectiondidFailLoginWithError(_ error: NSError)
  • Sent to observers when connecting has failed.

    Declaration

    Swift

    @objc
    optional func connectionDidFailConnectWithError(_ error: NSError)
  • Sent to observers when connection to the server will be closed

    Declaration

    Swift

    @objc
    optional func connectionWillDisconnect(_ connection: XPSDKConnection)
  • Sent to observers when connection to server was closed

    Declaration

    Swift

    @objc
    optional func connectionDidDisconnect(_ connection: XPSDKConnection)
  • Sent to observers when connection has connected to the server

    Declaration

    Swift

    @objc
    optional func connectionDidConnect(_ connection: XPSDKConnection)
  • Sent to observers when connection to the server was lost.

    Declaration

    Swift

    @objc
    optional func connectionLostConnectivity(_ connection: XPSDKConnection)
  • Sent to observers when connection to the server was restored.

    Declaration

    Swift

    @objc
    optional func connectionRestoredConnectivity(_ connection: XPSDKConnection)
  • Sent to observers when connection pop to root

    Declaration

    Swift

    @objc
    optional func connectionPopToRoot(_ connection: XPSDKConnection)
  • Sent to observers when connection is in the process of logging in, a code has been sent to the server for verification, but this code is wrong.

    Declaration

    Swift

    @objc
    optional func connectionCodeError(_ connection: XPSDKConnection)
  • Sent to observers when connection is in the process of logging in, but requires additional verification code.

    Declaration

    Swift

    @objc
    optional func connectionCodeRequired(_ connection: XPSDKConnection)
  • Sent to observers when connecting with external connection ID has failed.

    Declaration

    Swift

    @objc
    optional func wrongConnectionIdWithError(_ error: NSError)
  • Sent to observers when connection reachability has changed

    Declaration

    Swift

    @objc
    optional func connectionReachabilityChanged(_ notification: Notification)
  • Sent to observers to update state

    Declaration

    Swift

    @objc
    optional func updateState(_ state: NSNumber)
  • Sent to observers when a notification is received

    Declaration

    Swift

    @objc
    optional func didReceiveNotification(_ notification: NSDictionary)
  • Sent to observers when received challenge for trust

    Declaration

    Swift

    @objc
    optional func receiveChallengeForTrustWithInfo(_ info: [String : AnyObject])