Name

Notification Name extension, adding PredixMobileSDK notifications

  • Notification used when network connectivity state changes.

    Declaration

    Swift

    public static let pmReachabilityWatcher = Notification.Name("ReachabilityWatcherNotification")
  • Notification issued when the initial replication has completed after the app start. WebApps will not be launched until after this notification fires.

    Declaration

    Swift

    public static let pmInitialReplicationComplete = Notification.Name("InitialReplicationCompleteNotification")
  • Notification issued when database replication events occur.

    Declaration

    Swift

    public static let pmDatabaseDownload = Notification.Name("DatabaseDownloadNotification")
  • Notification informs the SDK that the container UI is ready for SDK interaction. Used with PredixMobilityConfiguration.considerUIReadyWhenApplicationDidBecomeActive.

    Declaration

    Swift

    public static let pmUIReady = Notification.Name("UIReadyNotification")
  • Notification issued when pull (server to client) replication is has reached a complted (idle) state

    Declaration

    Swift

    public static let pmPullReplicationComplete = Notification.Name("pullReplicationCompleteNotification")
  • Notification issued when push (client to server) replication is has reached a complted (idle) state

    Declaration

    Swift

    public static let pmPushReplicationComplete = Notification.Name("pushReplicationCompleteNotification")
  • Notification posted when data flows through the service router via a service request. Can be used to gather metrics

    Notification userInfo contains a dictionary with the following keys:

    • path : the path of the request
    • query : the querystring, if any, of the request
    • method : the http method of the request
    • bytesReceived : number of bytes in the body of the request
    • bytesSent : number of bytes returned in the response data
    • duration : number of milliseconds it took to process this request

    Declaration

    Swift

    public static let pmServiceInvoked = Notification.Name("ServiceInvokedNotification")
  • Notification sent when replication is paused, either due to repeated failure, or due to connnectivity loss.

    No additional data is associated with this notification

    Declaration

    Swift

    public static let pmReplicationPaused = Notification.Name("ReplicationPausedNotification")
  • Notification sent when replication is resumed from a paused state, generally because connectivity has been restored, or because repeated failures paused replication, and PredixMobileConfiguration.replicationFailureRetryRecoveryTime has elapsed.

    No additional data is associated with this notification

    Declaration

    Swift

    public static let pmReplicationResumed = Notification.Name("ReplicationResumedNotification")
  • Notification posted when a web request is detected as a PMAPI request. Can be used to gather metrics

    Similar to the ServiceInvokedNotification, except only tracks requests coming through the web request infraenumure, rather than any request made through the ServiceRouter.

    Notification’s userInfo contains a dictionary with the following keys:

    • path : the path of the request
    • query : the querystring, if any, of the request
    • method : the http method of the request
    • bytesReceived : number of bytes in the body of the request
    • bytesSent : number of bytes returned in the response data
    • duration : number of milliseconds it took to process this request

    Declaration

    Swift

    public static let pmAPIRequestHandled = Notification.Name("PMAPIRequestHandledNotification")
  • Notification posted when documents change in the database

    Notification’s userInfo contains a dictionary with a key changes whose value is an array of dictionaries (i.e. [[AnyHashable: Any]]) with the following keys:

    • documentID : Id of the changed document
    • revisionID : The Id of the newly-added revision. An empty value means the document was purged.
    • inConflict : True if the document is in conflict. (The conflict might pre-date this change.)
    • fromReplication : True if the document change was from replication
    • isDeletion : True if the document is deleted.

    Declaration

    Swift

    public static let pmDatabaseChanged = Notification.Name("DatabaseChangedNotification")
  • Notifcation posted when the configured server endpoint changed.

    If the server endpoint is stored in App Settings, then the endpoint can change. If this is detected this notification will be issued. The Notification’s userInfo dictionary will contain the key serverEndpoint which will contain the new endpoint.

    Declaration

    Swift

    public static let pmServerEndpointChanged = Notification.Name("PMServerEndpointChanged")
  • Declaration

    Swift

    public var description: String
  • Posted when the authentication process completes.

    userInfo will contain status of authentication under the key AuthenticationNotificationCompletionStatusKey

    Declaration

    Swift

    public static let PredixMobileAuthenticationComplete = Notification.Name("PredixMobileAuthenticationCompleteNotification")
  • Posted when the logout process completes.

    Declaration

    Swift

    public static let PredixMobileAuthenticationHasLoggedOut = Notification.Name("PredixMobileAuthenticationLogoutNotification")