Perimeter X
PerimeterX main class. You should interact with it in order to setup and start the SDK.
Functions
Use this function to get notified when the PerimeterX SDK is ready for the given AppID. If it's already ready, the callback will be called immediately. You should call this function only after you have already called the start(appId:delegate:completion:) function for the given AppID.
Returns a JSON string that represent a "blocked request" error. When the interceptor is enabled, the body of the URL response will be the same as the string that returns here. When the interceptor is disabled, you may replace the original URL response with the string that returns here.
This function checks if the SDK can handle the URL request's response and presents the block screen. Returns true if the PerimeterX's payload in the response can be handled by the SDK. This function does not present the block screen. This function should be used only when the requestsInterceptedAutomaticallyEnabled is set to false in the policy. You must call the start(appId:delegate:completion:) function and wait until it's done before calling this function
Returns a JSON string that represent a "blocked request and challenge cancelled" error. When the interceptor is enabled, the body of the URL response will be the same as the string that returns here. When the interceptor is disabled, you may replace the original URL response with the string that returns here.
Returns a JSON string that represent a "blocked request and challenge solved" error. When the interceptor is enabled, the body of the URL response will be the same as the string that returns here.
This function handles the URL request's response and presents the block screen, if necessary. Returns true if the PerimeterX's payload in the response was handled by the SDK. This function should be used only when the requestsInterceptedAutomaticallyEnabled is set to false in the policy. You must call the start(appId:delegate:completion:) function and wait until it's done before calling this function
Returns HTTP headers that should be added to the URL request. This function should be used only when the requestsInterceptedAutomaticallyEnabled is set to false in the policy.
Returns true if the error is "blocked request and challenge cancelled" error. This kind error should returned when the requestsInterceptedAutomaticallyEnabled is set to true and delayResponseUntilChallengeSolvedOrCancelled is set to true.
Returns true if the error is "blocked request and challenge solved" error. This kind error should returned when the requestsInterceptedAutomaticallyEnabled is set to true and delayResponseUntilChallengeSolvedOrCancelled is set to true.
Returns true if the error is "blocked request" error. This kind error should returned when the requestsInterceptedAutomaticallyEnabled is set to true and delayResponseUntilChallengeSolvedOrCancelled is set to false.
Register a callback that will be called after the user cancelled the challenge. Returns the registration ID. Use it to unregister with unregisterCallbackForChallengeCancelledEvent function. This function returns nil on failure. You must call the start function before calling this function.
Register a callback that will be called after the user solved the challenge. Returns the registration ID. Use it to unregister with unregisterCallbackForChallengeSolvedEvent function. This function returns nil on failure. You must call the start function before calling this function.
Register a callback that will be called after a request was blocked. Returns the registration ID. Use it to unregister with unregisterCallbackForRequestBlockedEvent function. This function returns nil on failure. You must call the start function before calling this function.
Provide outgoing URL request to the Account Defender feature. You must call the setUserId function before calling this function. If you are using the automatic interceptor you should not need to use this function (it will be called automatically by the interceptor).
Returns the current SDK version.
Setup the web view to be synced with SDK. Do not set a web view client to the web view after calling this function. If you wish to set a web view client, call this function again with the new web view client. This function enables JavaScript in the web view's settings. Do not change this setting.
Start the bot protection. Protection will be started only after the completion is called with true result.
Unregister the callback for challenge cancelled that is associated with the given registration ID. Registration ID is provided from the registerCallbackForRequestCancelledEvent function.
Unregister the callback for challenge solved that is associated with the given registration ID. Registration ID is provided from the registerCallbackForRequestSolvedEvent function.
Unregister the callback for request blocked that is associated with the given registration ID. Registration ID is provided from the registerCallbackForRequestBlockedEvent function.