Themeable browser use UIWebView forcefully with ionic capacitor - ionic-framework

I am doing ionic application with capacitor.
I have to use https://ionicframework.com/docs/native/themeable-browser plugin for one funcationality but when I make build and upload to apple store app is rejected because of UiWebView issue.
Commands for installing themeable plugin
npm install cordova-plugin-themeablebrowser
npm install #ionic-native/themeable-browser
ionic cap sync
If I remove that plugin and upload it to apple build process pass successfully.

Apple no longer accepts new submissions using UIWebView:
https://forums.developer.apple.com/thread/122114
There is also an Ionic blog article: https://ionicframework.com/blog/understanding-itms-90809-uiwebview-api-deprecation/
You can use Capacitor's Browser API, but it is quite limited compared to some existing Cordova plugins. However it is built around WKWebView and is therefore compliant.
There is AFAIK no alternative but to move to WKWebView if you want your app to be on the Apple App Store.

I assume you are using Themeable Browser instead of InAppBrowser because you need to customize the toolbar and other components. Unfortunately Themeable Browser is no longer a supported project. In InAppBrowser version 5.0.0 https://cordova.apache.org/announcements/2021/02/16/inappbrowser-release-5.0.0.html only uses WKWebView and you can now set InAppBrowserStatusBarStyle to "darkcontent". Unfortunately, other changes have to be applied manually. I succeeded for Android and I fight for Ios :-)

Related

Any cordova plugin to add WebAuthn API to Android WebView?

We've developed a cordova app that shows one of our websites (which is also accessible using a web browser).
Recently, FIDO2 authentication using WebAuthn has been added to that website. This works fine in the tested browsers (Chrome and Firefox), but not in our cordova application, as it uses Android WebView, which doesn't implement the WebAuthn API.
Does anybody know if there is any cordova plugin to add this API to Android WebView?
Is there any website with information about the Android WebView roadmap (bugs that will be fixed in next release, new features that will be added, ...)?
You're correct that Android WebView doesn't support WebAuthn in Android 13. We hope to address that in the Android 14 timeframe but, for now, you have to inject Javascript hooks and use a Javascript bridge to implement it. It's certainly possible to do but I'm not aware of any packaged solutions that do it.

How to build mobile website with ionic 1.2

How does one build a mobile website with ionic 1.2? I can't find any official guides/tutorials/docs.
This is an excerpt from a post on the ionic blog announcing ionic 1.2 release:
Ionic 1.2 marks the first release where we actively recommend Ionic for those looking to build a mobile website (not just an app for the app store)
Well, there's nothing stopping you from deploying it as a web app, as long as you don't have cordova dependencies in your app (for the natives). Also be aware that non webkit based browsers will probably malfunction.
Look at this thread for testimonials with mixed results

Ionic missing InAppBrowser plugin error When doing custom authentication

I've created an Ionic app and I'm trying to use the Custom Authentication option eg. Ionic.Auth.login('custom', authOptions, data).then(success, failure); However, I get an error message in the failure saying "Missing InAppBrowser plugin".
The plugin is installed and I've tried to uninstall and reinstall the plugin with no luck. When I use 'basic' the request goes through fine.
How do I fix this or get around it?
Plugins only work when running in native devices. You can't use them on browser with ionic serve.
You may want to start testing on a real android device or emulator.
Alternatively, there's a chrome plugin called Ripple that emulate an real devices with native-like features, allowing you to use some plugins on browser.

Updating Ionic Apps in real time

I'm a web developer, new to Ionic.But I can't find out how can I update my app on the server,like a website,and without having user redownload the app.Is there any solutions?
Thanks!
There's an available plugin you can use Cordova-hot-code-push
This plugin provides functionality to perform automatic updates of the web based content in your application.Basically, everything that is stored in www folder of your Cordova project can be updated using this plugin.
supported platforms: Android 4.0.0 or above.
iOS 7.0 or above. Xcode 7 is required.
It has a great wiki too.
Yes, as of recently there is a solution for this. Ionic calls it Ionic Deploy, and you can see the official documentation about it here.
However, one must note that this is still in Alpha version and they don't recommend it for production, but since they're very apt in shipping new features, I'm sure this will be even production ready very soon.

Call phonegap plugin function within web app

i am building my first phonegap app and when i open the app i instantly redirecting (window.location) the user to my server where my web app is hosted. Is it possible to load the phonegap plugins from there? Because the "deviceready" event is not firing and i cannot call any plugin functions.
I can confirm that loading remotely does appear to allow access to native components (when scripts are properly loaded) and that cordova.jsdoes not appear to need to be loaded by the local index.html bootstrap.
Short answer: Yes
Some 'gotcha's'
You will have to supply correct cordova.js version for the platform browsing to your site.
you can look here for more info https://github.com/apache/cordova-js. This project hosts the core js elements, and builds the platform specific cordova.js lib
Any plugin api's your app wants to interact with must be pre-installed into the Native App
any plugin with native code will have to be added to the project and deployed to device bundled inside the app. There is no way to lazyload native code. The js portions of the plugin could be hosted on your server, however.
More information, some apps that do this
The PhoneGap Developer App uses a similar technique to what is describe above and what you want. The only difference is that it is meant as a dev tool, and the server is a local dev machine.
The Cordova App Harness also uses this technique of pre-bundling an app package with plugins, to be consumed by remotely hosted resources
You cannot, deviceready only functioning if the app run on mobile phone environment only. If web based or dekstop application, it won't trigger.
No , dont do that . loading remote website will not able to intract with your plugins . and the app will get rejected on istore too