iOS: Failed to load resource: Origin null is not allowed by Access-Control-Allow-Origin

HI, I have images stored in a folder which I have added to extraFiles.

The images display OK but are missing when I convert to PDF.
I have tried toDataURL which works on Android but throws a security error on iOS.

I have also tried to copy the image to a canvas but it also throws a security error.

I have tried many different ways but to no avail.

Can any one help?

Are you running as a web app or a native app?

A Native iOS app. toDataURL throws a security error.

What’s the error?

I usually use a plugin for this kind of thing. Here’s one:

That is the actual plugin I am using, but the images are missing so I convert the images using toDataURL which works on Windows and Android but not on iOS due to security error

But what’s the error?

using .toDataURL on a image I have in a folder which I have added to extaFiles = SecurityError: The operation is insecure.

This is a simular issue: https://stackoverflow.com/questions/25753754/canvas-todataurl-security-error-the-operation-is-insecure#:~:text=It’s%20because%20of%20the%20Same,See%20toDataURL%20for%20more%20information.

TEMPORARY WORK AROUND:
As I only have a few images instead of trying to read my images using .toDataURL I converted the images to base64 and then hard coded the resulting base64 code as follows,

If selectedLogo = "1" Then 
  myLogo.src =  ("data:image/png;base64,ivbordlgllf.....")
Else if selectedLogo = "2" Then
 myLogo.src =  ("data:image/png;base64,idfhbg.....")
End if 

This worked on the generated PDF.