We are building hybrid app using ionic 5, one of the requirement is to open the HTML files downloaded to the local app content folder. The HTML files has reference to js & css files. The difficulty we face is the HTML file opens successfully and the javascript & CSS reerred is not opening. we tried using inappbrowser, window.open, previewanyfule plugin most of them same result. need guidance in opening such files.
If you wish to run your ionic app on an android or iOS device you will need Cordova or capacitor.
Related
I've a Cordova 5+ application built with Ionic 1 and Angular 1.
I use ViewerJS to load and read PDF files (retrieved from a remote server): I used an iframe making it working.
On desktop browsers, like Chrome, it works perfectly while on Cordova (precisely, on iOS with WKWebView) it throws errors like:
Not allowed to load local resource file://
First of all, those images are loaded from a CSS file (I'm expected that it uses HTTP instead of file protocol):
url(/images/image.png)
Second, this is the signature of the iframe:
<iframe class="row" sandbox="allow-scripts" ng-src="{{::viewerJsUrl}}"></iframe>
Third and last: I've followed this entire guide, tuning the Cordova build as fine as possible -> https://github.com/jessemonroy650/top-phonegap-mistakes/blob/master/the-whitelist-system.md
What am I missing?
Is there a security problem with iframe on Cordova (iOS, using WKWebView)?
I'm developing an HTML5 game with CreateJS and I'm using Cordova to build for Android and iOS platforms.
The problem is that on iOS, the .xml and .json files are not loaded with PreloaderJS.
I have a xml file and I try to load it:
_loader = new createjs.LoadQueue(false);
_loader.loadFile({src:"assets/generic/levels/landingScreen/xml/logic.xml", type:createjs.AbstractLoader.XML});
It works on web and on Android, but it doesn't work on iOS.
Does anyone have a solution for this?
Thanks!
I'm trying to embed Cordova in my native iOS application. I only need a tiny part of my application to use cordova. From now I managed to show a CordovaViewController with some HTML in there, but I can't find out how to add cordova plugins (ex. cordova-plugin-network-information) in the project.
I installed it using cocoapods, but I can't find in the Cordova's documentation how to wire it up with my www folder so that navigator.connection would not be undefined
Thank you for your help!
I have written and exported a Cordova 3.5.0 PhoneGap Application using the Telerik Platform. The app is using jQuery Mobile and an InAppPurchasing plugin.
The only other plugins used are Cordova Splashscreen and Cordova Statusbar.
I can run the app no problem when i install it via iTunes on to my iPad. However, when I submit the app via Application Loader, I get the following errors:
I was tempted to go in and edit/look for the lines that reference these 'non-public selectors' myself but the Cordova350 file is a unix executable file that when opened looks like bytes of hex codes.
I cant seem to find anything from googling around about anyone experiencing a similar issue. Is this just a setting somewhere I have forgotten to untick? Any help would be appreciated
I am getting this error code when i open a phonegap html site in iOS:
gap:["Device","getDeviceInfo","Device341875241"]
gap:["NetworkStatus","getConnectionInfo","NetworkStatus341875242"]
gap:["App","show","App341875243"]
It is working with Android perfectly.. i am using cordova 2.7.0.
What´s that supposed to mean?
thanks!
You must add the correct cordova-2.7.0.js file that is specific to iOS. This error usually occurs when you add cordova JS file which is not specific to a particular platform. In other words, you should add the iOS specific cordova-2.7.0 JS file to your iOS PhoneGap project.
Possible scenario:
You might have wrongly included the Android specific cordova-2.7.0 JS file in your iOS project.
Fix:
Just remove the current cordova JS file and add the cordova-2.7.0.js file from iOS folder in the downloaded Phonegap-2.7.0 folder