# App settings

Each app has some general settings which can be configured. These settings can be changed by clicking the cog icon in the toolbar when inside an app.

## Share App Preview URL

In the top-right section of the App Settings, you find a Share icon. Clicking this icon will open a dialog containing the URL to the App (in the Develop environment) as well as a QR code containing the same URL.&#x20;

Scan the QR code to preview or test the App from your mobile device.

## General settings

<table><thead><tr><th width="296">Setting</th><th>Description</th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>Used in the <code>&#x3C;title></code> tag and displayed as the title of the browser tab. Also used in the list of apps at the root URL of the Appfarm Client and throughout Appfarm Create.</td></tr><tr><td><strong>Description</strong></td><td>A longer description of the app. For your own reference.</td></tr><tr><td><strong>Readable ID</strong></td><td>A slug to use in the app's public URL. For example, in the following app URL the Readable ID is <code>events</code>: https://thirty50.appfarm.app/events.<br><br>The value must consist only of valid URL characters. Illegal characters will be automatically removed.<br><br><strong>Important:</strong> If you change the Readable ID, the app's URL will change, and you will have to provide the new URL to your users. Homescreen shortcuts on mobile devices will also become invalid.</td></tr><tr><td><strong>App Icon</strong></td><td>An icon from the built-in icon library. Displayed in the list of apps at the root URL of the Appfarm Client and throughout Appfarm Create.</td></tr><tr><td><strong>Default View</strong></td><td>The view displayed when navigating to the root of the app.</td></tr><tr><td><strong>Theme</strong></td><td>The <a href="../resources/themes">theme</a> to apply to the app. You can also switch themes dynamically, using the <a href="../../library/action-nodes/set-theme">Set Theme action node</a>.</td></tr></tbody></table>

## Device adaptivity and responsivity

<table><thead><tr><th width="296">Setting</th><th>Description</th></tr></thead><tbody><tr><td><strong>Device Size Availability</strong></td><td><p>The device sizes that the app should be available for. Use this option when you implement a design strategy with multiple apps where each app is targeted at specific device sizes. The following sizes are available:</p><ul><li><code>Extra Small</code>: up to 600 px (mobile phones)</li><li><code>Small</code>: 600–1239 px (tablets)</li><li><code>Medium</code>: 1240–1439 px (small and medium sized laptops)</li><li><code>Large</code>: 1440px and over (larger laptops and desktop monitors)</li></ul><p>When navigating to the app, the device's screen size will be evaluated, and the Appfarm Client will determine if the app should be accessible or not based on this setting.</p></td></tr><tr><td><strong>Responsive Strategy</strong></td><td><p>When a responsive strategy is applied, the UI designer provides breakpoints so that you can design the app to adapt to different screen sizes.</p><ul><li><code>None</code>: Design for one screen size. No breakpoints are provided to override styling.</li><li><code>Desktop First</code>: Design for large screens first, with breakpoints to adapt the design for progressively smaller screen sizes. </li><li><code>Mobile First</code>: Design for small screens first, with breakpoints to adapt the design for progressively larger screen sizes.</li></ul></td></tr></tbody></table>

## App drawer

<table><thead><tr><th width="296">Setting</th><th>Description</th></tr></thead><tbody><tr><td><strong>Main App Drawer</strong></td><td><p>If you are using a <a href="ui/views/drawer">drawer</a> as the main navigation you can select it here. Defining a main app drawer enables some additional built-in features:</p><ul><li>The drawer state is accessible via the built-in <a href="data/app-variables">app variable</a> <strong>Is Main Drawer Open</strong>.</li><li>If the drawer's <strong>Type</strong> property is <code>Temporary</code>, the drawer will be automatically closed when navigating using action nodes such as <a href="../../library/action-nodes/navigate">Navigate</a> and Open Dialog.</li></ul></td></tr><tr><td><strong>Drawer Default Open</strong></td><td>Show the drawer when the app is loaded. This setting is ignored if the drawer's <strong>Type</strong> property is <code>Temporary</code>.</td></tr></tbody></table>

## Event handlers

Run an action when the app is loaded/refreshed. This is commonly used to populate default data, check for URL parameters, or set a [theme](https://docs.appfarm.io/reference/resources/themes).

**Note:** Running actions on app load will increase app loading time and should be used with care.

<table><thead><tr><th width="296">Setting</th><th>Description</th></tr></thead><tbody><tr><td><strong>On App Load</strong></td><td>The action will be triggered after the data sources have been populated, but before the UI is shown to the user.</td></tr><tr><td><strong>On App Loaded</strong></td><td>The action will be triggered after the UI is shown to the user.</td></tr><tr><td><strong>On Online</strong></td><td>The action will be triggered when an App is offline, and goes online.</td></tr><tr><td><strong>On Offline</strong></td><td>The action will be triggered when an App is online, and goes offline. Note that database operations, or Action Nodes communicating with the server, cannot be executed in this action.</td></tr><tr><td><strong>On Visible</strong></td><td>The action will be triggered when the App goes from hidden to focused / visible. NB: The browser must support the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API">Page Visibility API</a> (all major browser supports this).</td></tr><tr><td><strong>On Hidden</strong></td><td>The action will be triggered when the App goes from focused / visible to hidden. NB: The browser must support the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API">Page Visibility API</a> (all major browser supports this).</td></tr><tr><td><strong>On Browser History Change</strong></td><td><p>This can be used to trigger an action every time the browser history changes, for example when navigating between views, or changing the URL params.<br><br>If the connected Action uses <a href="../actions#action-params">Action Params</a>, you will have access to a specific set of parameters for this event handler, for passing in to the Action: </p><p>Source View, Target View, Source Path, Target Path, Source Params, Target Params.<br></p><p>This new event handler combined with the possibility the add <a href="#custom-header-tags">custom headers</a> should be enough to integrate any Analytics tool to Appfarm, included Google Analytics 4 (GA4). However, GA4 automatically detects browser history change once the custom header scripts have been added.</p></td></tr></tbody></table>

## Progressive Web App

These values are included in the app's [web application manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest). Setting a value here will overwrite the equivalent value set in the [Environment configuration](https://docs.appfarm.io/reference/configuration/environments).

<table><thead><tr><th width="294">Setting</th><th>Description</th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>The name of the app. It may be displayed among a list of other apps or as a label for an icon. A maximum of 45 characters is recommended.</td></tr><tr><td><strong>Short Name</strong></td><td><p>An abbreviated name used as the app name on device homescreens and other places with limited space.</p><p>A maximum of 12 characters is recommended. If left blank, <strong>Name</strong> will be used and truncated.</p></td></tr><tr><td><strong>Orientation</strong></td><td>The default orientation of your app on mobile devices.</td></tr><tr><td><strong>Background Color</strong></td><td>A color that may be used by the operating system as a placeholder while the app's styles are loaded. Usually, this should match the background color of the app.</td></tr><tr><td><strong>Theme Color</strong></td><td>A color that may be used by the operating system when displaying the app. This color may apply even when an app is not installed as a PWA.</td></tr><tr><td><strong>Icon 72x72–512x512</strong></td><td>App icons of various dimensions that can be used in different contexts across an operating system. The icons must be uploaded to <a href="../resources/files">Files</a>.</td></tr><tr><td><strong>Enable Push</strong></td><td><p><strong>Deprecated!</strong> This setting is no longer in use and is currently Read Only. </p><p></p><p>Use action node <a href="../../library/action-nodes/request-permissions">Request Permissions</a> instead.</p></td></tr><tr><td><strong>Push Icon 192x192</strong></td><td><p>The icon that will be visible on web push notifications on supporting devices.</p><p></p><p><strong>Note:</strong> If you are using the Push notification action node in a service, changes to the push icon will not be applied to the service until there are changes in the data model or services.</p></td></tr><tr><td><strong>Enable Offline</strong></td><td>Enables offline support for this App. This will make the App store runtime only data on the client, and the App will be able to run while offline. <br><br>Please note that Database connected data sources do not work in Offline mode, so the App needs to be designed to specifically targeting offline mode - with runtime only data sources, and handling of persisting or deleting data base on whether the App is Online or Offline. Please also see the <strong>On Offline</strong> and <strong>On Online</strong> <a href="#event-handlers">Event Handlers</a> described in the section above.</td></tr></tbody></table>

{% hint style="info" %}
Regarding the **Enable Push** setting: This will be deprecated from Appfarm version 23.4 (to be released september 2023). It will be replaced by an action node for requesting permissions. Note that with this Appfarm Release, push notifications will also be available for iOS devices. Up until spring 2023, push notifications have only been available for progressive web apps for Android.
{% endhint %}

## Shareable link info

Generate `<meta>` tags for rich link previews when the app is shared on social media or in messages on smartphones. For a detailed walkthrough of implementing link previews, see [How to generate link previews for social media](https://docs.appfarm.io/how-to/enhance-your-app/link-previews).

<table><thead><tr><th width="296">Setting</th><th>Description</th></tr></thead><tbody><tr><td><strong>Data Source</strong></td><td>Select a data source to enable dynamic data in the meta tags. For example, if a link to an event is shared and you want to populate the tags with details of that specific event.</td></tr><tr><td><strong>Query Param Name</strong></td><td><em>Available if a data source is selected.</em><br>The name of the query parameter used to specify the object to return. Use lower case letters with no spaces, for example "event".</td></tr><tr><td><strong>Identifying Property</strong></td><td><em>Available if a data source is selected.</em><br>A unique identifying property to be used to look up the correct object in the database. A Random Identifier property is recommended. If not specified, ID will be used.</td></tr><tr><td><strong>Title</strong></td><td>The value for the Open Graph property <em>og:title</em>.</td></tr><tr><td><strong>Description</strong></td><td>The value for the Open Graph property <em>og:description</em>.</td></tr><tr><td><strong>Image</strong></td><td>The value for the Open Graph property <em>og:image</em>.</td></tr><tr><td><strong>Site Name</strong></td><td>The value for the Open Graph property <em>og:site_name</em>.</td></tr></tbody></table>

In addition to these values, the meta tag for the Open Graph property *og:url* is also generated and populated with your app's root URL.

## Other

<table><thead><tr><th width="296">Setting</th><th>Description</th></tr></thead><tbody><tr><td><strong>Hide from App List</strong></td><td>Hide the app from the list of apps shown when a user navigates to the root URL of the Appfarm Client.</td></tr><tr><td><strong>App Type</strong></td><td><p>Differentiate between normals apps in production and those in development or for restricted admin purposes. Changing this option may affect billing for your solution, as the number of <code>Normal</code> apps deployed to production is defined as part of your subscription. The options are:</p><ul><li><code>Normal</code>: Available in all environments and uses a regular security configuration</li><li><code>Dev Only</code>: Only available in the Development environment. Not counted for billing. Most apps in early development will use this option.</li><li><code>Config/Admin</code>: Not counted for billing. Requires special permissions held only by the Owners and Maintainers roles. This option is intended for temporary use or basic admin apps for data migration or raw data access.</li></ul></td></tr><tr><td><strong>Disable Connection Notifier</strong></td><td>Don't show a notification in the Appfarm Client when it is disconnected from the server. If selected, you need to handle this case manually by referencing the app variable <strong>Is Online</strong>.</td></tr><tr><td><strong>Timers</strong></td><td>Manage <a href="#timers">timers</a>.</td></tr><tr><td><strong>Topics</strong></td><td>Manage <a href="#topics">topics</a>.</td></tr><tr><td><strong>Enable Non-Production Banner</strong></td><td>If checked, a banner will be shown in the app when it is running in a non-production environment.</td></tr></tbody></table>

### Timers

If you want to perform an action on a schedule when the app is in use, for example every minute, you can use a timer. Timers can be used to run automatic carousels/slideshows, fetch the latest data from an external API, or other dynamic features.

As an example, say you have a timer that is permanently enabled and has an interval of 30 seconds. When the app is loaded, a 30 second countdown will begin. When it reaches 0 the action specified for **On Timeout** will be triggered. The countdown will then begin again.&#x20;

<table><thead><tr><th width="278">Setting</th><th>Description</th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>A reference for the timer.</td></tr><tr><td><strong>Enabled</strong></td><td>Set the timer to always operate by setting the value to <code>true</code>, or set the value according to a data binding, condition, or function.</td></tr><tr><td><strong>Interval</strong></td><td>The number of seconds between each instance of the timer. The lowest possible value is 1 second, which means you can trigger an action at most every second.</td></tr><tr><td><strong>On Timeout</strong></td><td>The action to trigger when the timer expires.</td></tr></tbody></table>

### Topics

Topics can be used for lightweight communication between components. For example, to synchronize axis selection in charts.
