> For the complete documentation index, see [llms.txt](https://en.docs.monaca.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://en.docs.monaca.io/reference/config/ios/config_xml.md).

# config.xml

The `config.xml` file is a settings file controlling various settings of Cordova.

![](/files/-MfbMnFtP6mjCg5ib--s)

Below are available elements and preferences you may need to configure:

## \<widget> element

| Attribute | Type   | Default Value | Description                                |
| --------- | ------ | ------------- | ------------------------------------------ |
| `version` | String | `1.0.0`       | A version number which is visible to users |

**Example**

```markup
<widget id="com.example.helloworld" version="0.0.1">
  ...
</widget>
```

## \<content> element

| Attribute | Type   | Default Value | Description                                                                                                                                                                                         |
| --------- | ------ | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `src`     | String | `indext.html` | The `<content>` element defines the app's starting page in the top-level web assets directory. You can change the starting page by changing the value of the `src` attribute to your preferred URL. |

**Example**

```markup
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" id="com.example.helloworld" version="1.0.0">
  ...
  <content src="https://monaca.io/" />
</widget>
```

## \<access> element

| Attribute | Type   | Default Value | Description                                                                                           |
| --------- | ------ | ------------- | ----------------------------------------------------------------------------------------------------- |
| `origin`  | String | `*`           | Controls access to specific network domains. If set to `*`, you can access all domains from your app. |

**Example**

```markup
...
<access origin="*" />
...
```

## \<preference> element

The `<preference>` tag sets various options as pairs of name/value attributes. Each preference's name is case-insensitive. Many preferences are unique to specific platforms, as listed at the top of this page. The following sections detail preferences that apply to more than one platform.

| Preference Name              | Type    | Default Value | Description                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ---------------------------- | ------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `DisallowOverScroll`         | Boolean | `false`       | Set to `true` if you want to disable the rubber-band scrolling for WebView.                                                                                                                                                                                                                                                                                                                                                                 |
| `EnableViewportScale`        | Boolean | `false`       | Set to `true` to prevent viewport scaling through a `<meta>` tag.                                                                                                                                                                                                                                                                                                                                                                           |
| `AutoHideSplashScreen`       | Boolean | `true`        | Set to `false` to control the splashscreen when it’s hidden through a JavaScript API.                                                                                                                                                                                                                                                                                                                                                       |
| `BackupWebStorage`           | String  | `cloud`       | <p>There are 3 valid values: </p><p></p><ul><li><code>none</code>: disables any backups of web storage.</li><li><code>cloud</code>: allows the web storage data to be backed up to iCloud.</li><li><code>local</code>: allows only local backups (iTunes sync).</li></ul>                                                                                                                                                                   |
| `UIWebViewDecelerationSpeed` | String  | `normal`      | <p>Controls the deceleration speed of momentum scrolling. There are 2 valid values: </p><p></p><ul><li><code>normal</code>: is the default speed for most native apps</li><li><code>fast</code>: is the default speed for Mobile Safari.</li></ul>                                                                                                                                                                                          |
| `Orientation`\*              | String  | `default`     | <p>(Cordova 5.2 or Higher) There are 4 valid values: </p><p></p><ul><li><code>all</code>: to specify both portrait & landscape mode you would use the platform specific value all</li><li><code>default</code>: screen orientation will be applied according to system default.</li><li><code>landscape</code>: set screen orientation to landscape mode.</li><li><code>portrait</code>: set screen orientation to portrait mode.</li></ul> |

**Example**

```markup
...
<preference name="DisallowOverscroll" value="false" />
<preference name="EnableViewportScale" value="false" />
<preference name="AutoHideSplashScreen" value="true" />
<preference name="BackupWebStorage" value="cloud" />
<preference name="UIWebViewDecelerationSpeed" value="normal" />
<preference name="Orientation" value="portrait" />
...
```

**\***: There are two use ways to configure `Orientation` preference:

1. Global Settings:

   ```markup
   <widget>
   ....
   <preference name="orientation" value="default"/>
   ....
   </widget>
   ```

{% hint style="info" %}
It is also possible to apply the setting for all devices at once; however, you can only use `default`, `landscape` and `portrait` value. `all` is not possible for Global Settings.
{% endhint %}

&#x20;   2\. Platform Specific Settings:

```markup
<widget>
...
<platform name="ios">
 <preference name="orientation" value="default"/>
</platform>
...
</widget>
```

{% hint style="info" %}
For Android/Windows, `default` means all directions, but in iOS only portrait will be applied.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://en.docs.monaca.io/reference/config/ios/config_xml.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
