Flutter http_proxy not working for ios Device - flutter

The Flutter app for iOS devices doesn't accept the system proxy instead uses a different IP address for the Network API calls.
This is the solution I followed to make flutter proxy aware.
import 'package:http_proxy/http_proxy.dart';
HttpProxy httpProxy = await HttpProxy.createHttpProxy();
HttpOverrides.global=httpProxy;
This works for android but doesn't work on iOS. Is there any Solution to make the flutter app proxy aware on iOS too?

Related

Setting a manual wifi IP via a Flutter APP

I'm using Flutter to create an APP that connects to a WIFI access point. I have used WifiIot to connect to Wi-Fi routers before, but this access point doesn't have a DHCP client, so I need to set the IP manually (I already know how I'm going to manage IP clashes).
I want to do this programmatically - not by having the user set the IP, globally, via settings.
Target platform: Android.
I tried seeing if WifiIot had this capability - Not seeing that it does.
Also looked at other Dart libraries.
I'm in the process of seeing if I can do this with native Android (Kotlin) and maybe call this from Flutter (not my preferred method).

How to use proxy in Wi-fi setting for the app in Flutter app?

Case:
I use Flutter to create an app, and the app will call Restful Api to backend server to get data.
However, the backend server only open to a selected host and port for security reason.
The app works well if it is under that network, but cannot works properly because of fail to get data if out of that network.
As a result, I would like to setup a proxy for the wi-fi I'm using, and run the app as normal.
Unfortunately, the flutter app still not working in both Android and IOS platform.
Question:
How to use proxy in Wi-fi setting for the app in Flutter app?
You may try using this package to apply the system's global proxy settings: https://pub.dev/packages/native_flutter_proxy
Dart's networking tools don't pick up these settings on their own.

How to authorize domains for TinyCloud on iOS apps (built via Capacitor)

I've created an iOS app from my web app thanks to Capacitor and I'm having an issue with Tiny since the domain appears unapproved and I don't know how to fix it. On which domain runs a Capacitor app ? localhost ? capacitor ?
So my iOS users are seing the popup saying the domaine is not registered
The TinyMCE Cloud platform works with the http and https protocols but it won't accept non-standard protocols such as capacitor.
You could switch to bundling TinyMCE in your application as opposed to fetching it from our Cloud platform but there is currently no way to make our Cloud work with the capacitor protocol.

Pusher Private channel subscribtion cannot connect to endpoint on IOS device with Ionic 4

I'm using Pusher for real chat application.
I've created a web app and a mobile app using Ionic 4.
The app use private channels, and everything works well on web enviroment.
During development i've tested the Ionic app on browser (ionic serve)
and the chat works very well.
When I tried to test the app on a real IOS Device (also XCode emulator),
i get an error in channel subscribtion
Unable to retrieve auth string from auth endpoint - received status 0 from https://...
I've tested the endpoint and works fine, even if I try to simulate the connection from the device as a simple API.
So I cannot understand where is the problem.
If I use a default channel (so no private) everything works fine also on IOS Device.
I'm thinking the problem should be on some Cordova/Ionic configuration?
Here's the code I use for Pusher setup and subscription (works if run on the browser with ionic)
this.pusher = new Pusher(this.environment.pusherKey, {
cluster: 'eu',
encrypted: true,
authEndpoint: this.mainService.hostEndpoint + 'user/pusherAuth',
});
this.pusher.subscribe(channelName)
Who's the hero who can help me solve this problem? :)
I don't want to rollback on the not a private channel just as a workaround for the problem.
for me i had the same issue and fixed that with adding 'Access-Control-Allow-Origin' header to my server response.

Install a progressive web application (PWA) on the phone without a network

Is it possible (e.g. when developing) to send a pwa to the phone someway e..g. via usb cable without the network and serving it in https?
The use case is development, when maybe a wifi network is not available or unpractical to set up.
If your APP is fully PWA compliant, the app added to home will be an installed APK, which you can extract using file explorer(I used ES File explorer) and put it in other devices using USB connection and adb install myapp.apk for installation.
After you load the apk, it would anyways make calls to your web-server which I'm not sure how it make sense to achieve without network connection though. I couldn't think of any reason to develop a mobile application as PWA without network. You can even have a pass though internet(sharing your desktops internet via USB) by connecting via USB if wifi is not available. But developing PWA with absolute no network mode is not practical.
Update: While you can generate the APK and side load it via USB in the above mentioned way, transferring the cached assets(HTML/CSS/JS/images) might be tricky. You may have to wrap your app as a plain cordova application or Ionic kind of PWA app which uses Cordova to wrap and build with your assets. This way, your APK will be having everything it needs to run for calculator kind of use case.