iOS Configuration
The config.xml
settings file controls various Cordova settings.
This is application wide, and not set per CDVViewController instance.
The config.xml
file is located in your <project folder>/<appname>
directory.
<preference>
Various preferences (as <preference>
tags) default on not breaking
existing apps. The available preferences are:
-
DisallowOverscroll
(boolean, defaults tofalse
): set totrue
if you don't want the WebView to rubber-band. -
TopActivityIndicator
(string, defaults togray
): this is the top spinning throbber in the status/battery bar, valid values arewhiteLarge
,white
, andgray
. -
EnableLocation
(boolean, defaults tofalse
): set totrue
, to initialize the Geolocation plugin at start-up (so the fix on your location can be more accurate) DEPRECATED: please set theonload
attribute of the[Geolocation](../../../cordova/geolocation/geolocation.html)
plugin totrue
instead. -
EnableViewportScale
(boolean, defaults tofalse
): set totrue
to prevent viewport scaling through a meta tag. -
AutoHideSplashScreen
(boolean, defaults totrue
): set tofalse
to control when the splashscreen is hidden through a JavaScript API. -
FadeSplashScreen
(boolean, defaults totrue
): set tofalse
to prevent the splash-screen to fade in and out when showing or hiding it. -
FadeSplashScreenDuration
(float, defaults to 2): The splash-screen Fade duration in seconds. -
ShowSplashScreenSpinner
(boolean, defaults totrue
): set tofalse
to hide the splash-screen spinner. -
MediaPlaybackRequiresUserAction
(boolean, defaults tofalse
): set to true to not allow autoplayed HTML5 video. -
AllowInlineMediaPlayback
(boolean, defaults tofalse
): set to true to allow inline HTML5 media playback, also, the video element in the HTML document must also include the webkit-playsinline attribute. -
BackupWebStorage
(string, defaults tocloud
): valid values arenone
,cloud
andlocal
. Set tocloud
to allow the web storage data to be backed up to iCloud, and set tolocal
to only allow local backups (iTunes sync). Set tonone
to not allow any backups of web storage. -
KeyboardDisplayRequiresUserAction
(boolean, defaults totrue
): set to false to open the keyboard when form elements get focus via the JavaScript focus() call. -
SuppressesIncrementalRendering
(boolean, defaults tofalse
): set to true to wait until all new view content has been received before it is rendered. -
HideKeyboardFormAccessoryBar
(boolean, defaults tofalse
): set to true to hide the additional toolbar that is on top of the keyboard. This toolbar features the Prev, Next, and Done buttons. -
KeyboardShrinksView
(boolean, defaults tofalse
): set totrue
to shrink the WebView when the keyboard comes up. The WebView shrinks instead of the viewport shrinking and the page scrollable. This applies to apps that position their elements relative to the bottom of the WebView. This is the default behaviour on Android, and makes a lot of sense when building apps as opposed to webpages.