Cordova IOS not loading PDF in webviewer

Hi,

We are exploring PDFTRON CORDOVA ANDROID and IOS.

Scenario: View PDF from remote server using PDFTron.

Cordova Android – loaded successfully with copied public assets.
Cordova IOS – Frame is loading but we are getting below error instead loading PDF
Viewer is on a different domain, the promise from WebViewer function is rejected and API functions will not work because of cross domain permissions. See PDFTron Systems Inc. | Documentation for more information.

Note: Coding is same for Android and IOS. Kindly guide us how to proceed further.

image

Hi Sathyavathi,

Could you please provide:

  1. The version of WebViewer you are running.
  2. Any error messages or warnings in the console log.

It would also be extremely helpful to supply a sample of this behaviour.

Best Regards,
Zach Serviss
Web Development Support Engineer
PDFTron Systems, Inc.

Hi,

Usage In: React Application 4+ years old
React version: 17.0.1
Webpack version: 5
WebViewer Version: “@pdftron/webviewer”: “8.7.0”

No warnings in console. Received attached error in this thread. Cordova IOS – Frame is loading but we are getting below error instead loading PDF
Viewer is on a different domain, the promise from WebViewer function is rejected and API functions will not work because of cross domain permissions. See PDFTron Systems Inc. | Documentation for more information.

Hi Sathyavathi,

Have you followed the guide by either running the code through a config file or postMessage() API to communicate between the page and iframe?

Best Regards,
Zach Serviss
Web Development Support Engineer
PDFTron Systems, Inc.