Advanced Configuration
Advanced Configuration
You can configure a few runtime options for your Appcelerator project. Once you create a project, you will see an appcelerator.xml file in the public directory. This file is used by the Appcelerator javascript client to configure itself during startup.
Here’s a sample appcelerator.xml file
<?xml version="1.0" encoding="UTF-8"?>
<appcelerator version="1.0" xmlns="http://www.appcelerator.org/config">
<servicebroker poll="false" marshaller="application/json">
@{rootPath}servicebroker
</servicebroker>
<upload>@{rootPath}upload</upload>
<download>@{rootPath}download</download>
<proxy>@{rootPath}proxy</proxy>
<sessionid>_myapp_session</sessionid>
</appcelerator>
The options listed above have default values, which are determined for you when the project is first created. These options are explained below in detail. You may also add additional options to your appcelerator.xml from the list below. For example, to disable the cookie check (explained below) you would add to appcelerator.xml:
<cookie_check>false</cookie_check>
Configuration Options
| servicebroker |
The service broker refers to the URL on the server that handles messages sent from the client to the server via POST. The @{rootPath} is determined by the doc path.
|
| upload | The URL for handling upload requests by app:upload widget |
| download | The URL for handling download requests by app:download widget |
| proxy | The URL for handling proxy requests by app:http widget |
| sessionid | The name of the cookie, which is set by the server application. This name and value of this cookie is used by the client to set values which are used on the server to check against forged XHR requests. If you change the name of your app or the cookie that is set by your app, make sure to change this variable too. |
| cookie_check | Default true. The client will check to see if the browser has cookies disabled, and if so will then redirect to upgrade_cookies.html. To disable the behavior, set this value to false. |
| browser_check | Default true. The client will check to see if the browser is supported. For example, if the browser is Internet Explorer 5.5, the user will be redirected to upgrade.html. To disable the behavior, set this value to false. |
| hide_body | Default false. To prevent the browser from displaying partial content, you can set this value to true and the <body>'s visibility will be hidden until the document is finished loading. |
| report_stats | Default true. When the document is finished loading, r:appcelerator.status.report will be sent to the server along with the browser's stats such as user agent, screen res, Flash version, and cookie values. |
| usegears | Default true. If the browser has Google Gears installed, then the Gears threading system will be used as an optimization for queueing local messages. |