Isolation of Ionic Apps - ionic-framework

We are building an Ionic App with Capacitor. As far as I understand the architecture this starts a webserver in the app to serve the web resources (Angular) so they can be loaded in the webview.
My question is: How does isolation work, when running multiple Ionic Apps? Is the webserver only accessible for the app? Why are there no port conflicts?
Is there any detailed documentation for such topics?

I received the following answer on the github page of capacitor: https://github.com/ionic-team/capacitor/discussions/5880
It’s not a real web server, so there is no conflict with other apps. In the past iOS had a real web server and it had conflicts, so we removed it.
It uses WKURLScheme handler instead that intercepts requests to custom schemes
https://developer.apple.com/documentation/webkit/wkurlschemehandler

Related

Flutter Web, debug in https?

One of the functions of my application requires the ability to record. Chrome won't let non-secure sites access the microphone.
I can use, and have been using, flutter build web --profile --dart-define=Dart2jsOptimization=O0 for this and pointing an IIS site at the ...../build/web, but my app takes 1-2.5 minutes to build each time. Really slows down the workflow of minor adjustments.
Is there a way to run to an https server?

Migrate ionic app in a server as a website

I have an ionic app that is connected to the mySQL database from a server and I want to migrate this app to the same server. I want to use this application as a website, which will continue to extract data from the mySQL database. How can I do that?
Thank you.
First I think you should probably split this into two projects:
the Ionic app, which communicates with the server via the API
the server side API (PHP file) with connection to the database
Usually these two would be in separate (Git) repositories.
You can then execute ionic build --prod to build the Ionic app for the web. The deployable files will be in the www directory once the command has finished. You can copy the files in this directory to a webserver like Apache or nginx, or you can easily deploy it to Firebase Hosting for example as well. It's just static files (HTML, CSS, JS, images, etc.).
You can find more information about deploying an Ionic app as a PWA (progressive web app) here. It also shows you how to deploy to Firebase Hosting, which has a free plan to get started with.

Unable to get API call logs from specific application running on Android using Charles

I am facing problem in getting API call's data using charles for one particular application. I have already done proxy settings on my android and iPhone. I am able to see logs from all other apps running on my mobile except a particular app.
Could there be any limitation imposed by Android app?
This is not limitation caused by Android app, but more likely caused by Charles.
Charles is a proxy, but only proxy for HTTP(S). There are many app that communicate with server using non-HTTP protocol (raw socket for example). In such condition, Charles is not able to intercept the requests and responses.

Where to "host" a Progressive Web App (PWA)?

Im just starting out diving into PWAs.
Where should a PWA being published?
Can it be published like any other javascript app on the web (as a simple URL)?
A PWA is like any other website. You can host it anywhere you can host a "regular" site, as long as it is served via HTTPS.
A PWA is made up of service workers, which can run in the background. To avoid tampering with service workers the specification of PWA requires it to be hosted over HTTPS.
So any hosts supporting HTTPS would be good enough for them.

How to run a Sencha Touch 2 app without a web server?

Does anyone have any idea on how to run a sencha touch 2 app without installing a web server (like LAMP/XAMP). (PS : I'm new to Sencha Touch)
I know there is one way - Including phonegap's javascript file in the app.json of the Sencha Touch 2 app. Which'll look like this
"js":
{
"path": "cordova-2.5.0.js"
}
After this the sample application runs on the browser without the web server.
Is there ANY other way?
How does adding the phonegap js file help in running the sencha touch app without web server anyway??
Starting chrome with --allow-file-access-from-files --disable-web-security flags also does the trick.
Sencha requires web server because if app is in development mode microloader in sencha make Ajax request for app.json file and from it, it loads other files. You can see this in
../sencha-sdk/mircroloader/development.js
file with following code -
var xhr = new XMLHttpRequest();
xhr.open('GET', 'app.json', false);
When you start chrome with above mentioned flags, chrome does allow making ajax requests even if file opened with file://.... url scheme.
When you deploy the app after compressing js/css with sencha cmd, all files are bunched into one single file. You no more need a webserver in that case.
Update
From Cordova docs for Whitelisting domain
Domain whitelisting in Apache Cordova is a security model that controls access to outside domains, such as http://google.com. The default security policy is to block all network access. The application developer can then declare access to specific network domains and subdomains.
And
In the Widget Access specification, the element is used to declare access to specific network domains. In the future, Apache Cordova will abstract the platform whitelisting implementations to the W3C Widget Access specification. However, for now each platform must implement it's own domain whitelisting.
Moreover, W3C Widget Access does not enclose the security and user agent enforce policy. It is defined in XMLHTTPRequest.
So what Cordova essential does is, adds an exception in policy to allow access to certain network resource outside app domain with whitelisted domains.