Community
cancel
Showing results for 
Search instead for 
Did you mean: 
mohammed_h_
Beginner
46 Views

Problem on loading internal files use AJAX

Hi every one


I have a problem on iOS App, when I want to load some HTML files which they are templates on the App by ajax, the response of operation is "Error" not 404 , you should know:

- the App Ajax requests working for external HTTP requests 

- there is no problem on :

Chrome desktop , Safari , on preview , on Built Android APK , on Preview on iOS

the problem appear only on Installed Build IPA file on iphone 7

 

I want to get the HTML files to use them as a templates by using ajax of jQuery also i have use CSP

<meta http-equiv="Content-Security-Policy" content="default-src * cdvfile://*; style-src * cdvfile://* 'unsafe-inline'; script-src * cdvfile://* 'unsafe-inline' 'unsafe-eval'; img-src * data: 'unsafe-inline' cdvfile://* ; connect-src * 'unsafe-inline'; frame-src *;">

 

and I am using Jquery 2.4 also jQuery 3.1 

 

again: no problem with requesting API to my online server, the problem is with the local files, please i need a help

 

Tags (2)
0 Kudos
3 Replies
Jerroyd_M_Intel
Employee
46 Views

Do you have a proper Content Security Policy set in your header?

mohammed_h_
Beginner
46 Views

Yes i have allowed everythingon CSP with no avail .

but after 48 hours i found the problem related to Apple wkwebview which has an issue on sealing with file:// after that i download a modified version of it from ionic team.

Jerroyd_M_Intel
Employee
46 Views

Glad to hear it! If you can post/link your solution for other people who find this thread, that would be great!

--Jerroyd

Reply