All Projects → ionic-team → Cordova Plugin Ionic Webview

ionic-team / Cordova Plugin Ionic Webview

Licence: apache-2.0
Web View plugin for Cordova, specialized for Ionic apps.

Projects that are alternatives of or similar to Cordova Plugin Ionic Webview

todo-list
TodoList using Ionic2/3 & Firebase: * PWA * SSO Google plus. * Share list via QRcode. * Upload image from Camera or Storage. * Speech Recognition.
Stars: ✭ 18 (-95.7%)
Mutual labels:  cordova, ionic
ionic-native-sms-retriever-plugin-master
Cross-platform plugin for Cordova / PhoneGap to Retrieve SMS. Available for Android.
Stars: ✭ 16 (-96.18%)
Mutual labels:  cordova, ionic
cordova-plugin-crypto-file
Encrypts source files, works with cordova-plugin-ionic-webview
Stars: ✭ 29 (-93.08%)
Mutual labels:  cordova, ionic
cordova-plugin-apkupdater
This plugin allows your Android app to download and install compressed updates without the Google Play Store.
Stars: ✭ 46 (-89.02%)
Mutual labels:  cordova, ionic
ionic-multi-camera
Take multiple photos one after another
Stars: ✭ 12 (-97.14%)
Mutual labels:  cordova, ionic
ionic-docker
An ionic image for CI
Stars: ✭ 56 (-86.63%)
Mutual labels:  cordova, ionic
cordova-plugin-today-widget
Add a today widget app extension target to your cordova project.
Stars: ✭ 51 (-87.83%)
Mutual labels:  cordova, ionic
Mobile.UP
Mobile.UP
Stars: ✭ 13 (-96.9%)
Mutual labels:  cordova, ionic
setup-ionic
Set up your GitHub Actions workflow with Cordova/Ionic environment
Stars: ✭ 23 (-94.51%)
Mutual labels:  cordova, ionic
ionic4-angular6-crud-example
Building CRUD Mobile App using Ionic 4, Angular 6 and Cordova
Stars: ✭ 50 (-88.07%)
Mutual labels:  cordova, ionic
cordova-plugin-xpay
💰 This is a app payment cordova-plugin, support wechat payment and alipay temporally.
Stars: ✭ 19 (-95.47%)
Mutual labels:  cordova, ionic
Awesome Cordova
📱 A curated list of amazingly awesome Cordova libraries, resources and shiny things.
Stars: ✭ 269 (-35.8%)
Mutual labels:  cordova, ionic
cordova-plugin-flurryanalytics
Adds support for all that Flurry Analytics flavored goodness to your Cordova based apps
Stars: ✭ 23 (-94.51%)
Mutual labels:  cordova, ionic
keyonic-v2
A Keycloak Mobile Implementation using Angular v4 and Ionic v3
Stars: ✭ 23 (-94.51%)
Mutual labels:  cordova, ionic
example-cordova-code-push-plugin
Ionic + Cordova Code Push Plugin Example
Stars: ✭ 45 (-89.26%)
Mutual labels:  cordova, ionic
generator-angular-pro
AngularJS project generator for scalable, enterprise-grade web and mobile applications
Stars: ✭ 43 (-89.74%)
Mutual labels:  cordova, ionic
v-cupertino
A Vue 3 Wrapper for Cupertino Pane Library
Stars: ✭ 17 (-95.94%)
Mutual labels:  cordova, ionic
bitpocket-mobile-app
Mobile app for accepting bitcoin payments at the point of sale (Bitcoin POS).
Stars: ✭ 26 (-93.79%)
Mutual labels:  cordova, ionic
scanbot-sdk-example-ionic
Scanbot scanner SDK example app for Ionic with Cordova.
Stars: ✭ 24 (-94.27%)
Mutual labels:  cordova, ionic
Vscode Cordova
A Visual Studio Code extension providing intellisense, debug, and build support for Cordova and Ionic projects.
Stars: ✭ 267 (-36.28%)
Mutual labels:  cordova, ionic

semantic-release Dependabot Status npm

Ionic Web View for Cordova

A Web View plugin for Cordova, focused on providing the highest performance experience for Ionic apps (but can be used with any Cordova app).

This plugin uses WKWebView on iOS and the latest evergreen webview on Android. Additionally, this plugin makes it easy to use HTML5 style routing that web developers expect for building single-page apps.

Note: This repo and its documentation are for cordova-plugin-ionic-webview @ 5.x, which uses the new features that may not work with all apps. See Requirements and Migrating to 5.x.

2.x documentation can be found here.

📖 Documentation: https://beta.ionicframework.com/docs/building/webview

📣 Support/Questions? Please see our Support Page for general support questions. The issues on GitHub should be reserved for bug reports and feature requests.

💖 Want to contribute? Please see CONTRIBUTING.md.

Configuration

This plugin has several configuration options that can be set in config.xml.

Android and iOS Preferences

Preferences available for both iOS and Android

Hostname

<preference name="Hostname" value="app" />

Default value is localhost.

Example ionic://app on iOS, http://app on Android.

If you change it, you'll need to add a new allow-navigation entry in the config.xml for the configured url (i.e <allow-navigation href="http://app/*"/> if Hostname is set to app). This is only needed for the Android url when using http://, https:// or a custom scheme. All ionic:// urls are whitelisted by the plugin.

Android Preferences

Preferences only available Android platform

Scheme

<preference name="Scheme" value="https" />

Default value is http

Configures the Scheme the app uses to load the content.

ResolveServiceWorkerRequests

<preference name="ResolveServiceWorkerRequests" value="true" />

Default value is false

Enable to resolve requests made by Service Workers through the local server.

MixedContentMode

<preference name="MixedContentMode" value="2" />

Configures the WebView's behavior when an origin attempts to load a resource from a different origin.

Default value is 0 (MIXED_CONTENT_ALWAYS_ALLOW), which allows loading resources from other origins.

Other possible values are 1 (MIXED_CONTENT_NEVER_ALLOW) and 2 (MIXED_CONTENT_COMPATIBILITY_MODE)

Android documentation

iOS Preferences

Preferences only available for iOS platform

iosScheme

<preference name="iosScheme" value="httpsionic" />

Default value is ionic

Configures the Scheme the app uses to load the content.

Values like http, https or file are not valid and will use default value instead.

If you change it, you'll need to add a new allow-navigation entry in the config.xml for the configured scheme (i.e <allow-navigation href="httpsionic://*"/> if iosScheme is set to httpsionic).

WKSuspendInBackground

<preference name="WKSuspendInBackground" value="false" />

Default value is true (suspend).

Set to false to stop WKWebView suspending in background too eagerly.

KeyboardAppearanceDark

<preference name="KeyboardAppearanceDark" value="false" />

Whether to use a dark styled keyboard on iOS

ScrollEnabled

<preference name="ScrollEnabled" value="true" />

Ionic apps work better if the WKWebView is not scrollable, so the scroll is disabled by default, but can be enabled with this preference. This only affects the main ScrollView of the WKWebView, so only affects the body, not other scrollable components.

Plugin Requirements

  • Cordova CLI: 7.1.0+
  • iOS: iOS 11+ and cordova-ios 4+
  • Android: Android 5+ and cordova-android 6.4+

Migrating to 5.x

  1. Remove and re-add the Web View plugin:

    cordova plugin rm cordova-plugin-ionic-webview
    cordova plugin add [email protected]
    
  2. If using cordova-android < 9, make sure you have <preference name="android-minSdkVersion" value="21" /> in the config.xml as this version of the plugin only supports Android 5+ (SDK 21+). If using cordova-android >= 9 is not neccessary as cordova-android 9 only supports Android 5.1+ (SDK 22+)

  3. Since version 2, apps are served from HTTP on Android by default.

    • The default origin for requests from the Android WebView is http://localhost. If Hostname and Scheme preferences are set, then origin will be schemeValue://HostnameValue.
  4. Since version 3, apps are served from ionic:// scheme on iOS by default.

    • The default origin for requests from the iOS WebView is ionic://localhost. If Hostname and iosScheme preferences are set, then origin will be iosSchemeValue://HostnameValue.
  5. The WebView is not able to display images, videos or other files from file or content protocols or if it doesn't have protocol at all. For those cases use window.Ionic.WebView.convertFileSrc() to get the proper url.

  6. Replace any usages of window.Ionic.normalizeURL() and window.wkRewriteURL() with window.Ionic.WebView.convertFileSrc().

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].