Hybrid App support
  • 09 Mar 2023
  • Dark
    Light

Hybrid App support

  • Dark
    Light

v3.0

What is Hybrid App

An Hybrid App uses both native URL requests and web views to communicate with your server. In the context of PerimeterX, it's important to make sure both native requests and web views are synced together to make sure end users will get the expected behavior from your app.

How to enable Hybrid App support

To enable hybrid app support, you should enable it and set your domains in the policy for the relevant AppID. Here is an example:

policy.hybridAppSupportEnabled = true
policy.set(domains: ["my-domain.com"], forAppId: "<APP_ID>")
policy.hybridAppSupportEnabled = YES;
[policy setWithDomains:[NSSet setWithObject:@"my-domain.com"] forAppId:@"<APP_ID>"];
­čÜžApple Pay on the web
If your app using Apple Pay on the Web you should disable JavaScript evaluation by the SDK. In order to protect the security of Apple Pay transactions in WKWebView, Apple Pay cannot be used alongside of script injection APIs. You can do this by setting the policy. Here is an example:
policy.allowJavaScriptEvaluation = false
policy.allowJavaScriptEvaluation = NO;

Was this article helpful?