<div class="meta" robots="noindex">

</div>

Class

# iOSApplication

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2020r2. Please use `MobileApplication</api/mobile/mobileapplication>` as a replacement.

</div>

## Description

The base class for iOS apps.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                                      | Type                                   | Read-Only | Shared |
|-----------------------------------------------------------|----------------------------------------|-----------|--------|
| `CurrentScreen<iosapplication.currentscreen>`             | `iOSScreen</api/deprecated/iosscreen>` | ✓         |        |
| `DefaultiPadScreen<iosapplication.defaultipadscreen>`     | `iOSScreen</api/deprecated/iosscreen>` | ✓         |        |
| `DefaultiPhoneScreen<iosapplication.defaultiphonescreen>` | `iOSScreen</api/deprecated/iosscreen>` | ✓         |        |

## Events

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                    | Parameters | Returns |
|---------------------------------------------------------|------------|---------|
| `LowMemoryWarning<iosapplication.lowmemorywarning>`     |            |         |
| `Open<iosapplication.open>`                             |            |         |
| `UnhandledException<iosapplication.unhandledexception>` |            |         |

## Property descriptions

<div id="iosapplication.currentscreen">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSApplication.CurrentScreen

**CurrentScreen** As `iOSScreen</api/deprecated/iosscreen>`

The currently displayed screen. You can use this property to access the current screen so that you can change its content.

This property is read-only.

The screen is typically the base (first) view that was displayed in a phone app. It may also refer to a Split View or a Tab screen.

In most cases you will want to use the `iOSView.PushTo<iosview.pushto>` method to display a new view over this initial view. This retains the view hierarchy and allows the back button to go back to the previous view.

There may be times when you need to replace the entire screen and do not want the view hierarchy. For example, you may have an initial login view that is displayed but after the user successfully logs in and you want to replace that view with another view so that the back button does not return the user to the login view.

You can directly change the screen content like this to swap in a new view:

``` xojo
Var myNewView As New MyView
App.CurrentScreen.Content = myNewView
```

Use the same technique to swap in a new `iOSLayout</api/ios/ioslayout>`, `iOSSplitView</api/ios/iossplitview>` or `iOSTabBar</api/ios/iostabbar>`. For example, this swaps in a new screen:

``` xojo
Var s As New MySpecialScreen
App.CurrentScreen.Content = s.Content
```

<div id="iosapplication.defaultipadscreen">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSApplication.DefaultiPadScreen

**DefaultiPadScreen** As `iOSScreen</api/deprecated/iosscreen>`

Set to the default iOSScreen to use when the app is launched on an iPad-sized device.

This property is read-only.

If no DefaultiPadScreen is specified, the app will still run on an iPad but will use the DefaultiPhoneScreen, running it in "scaled" mode.

One or both of DefaultiPhoneScreen and DefaultiPadScreen must be specified.

By specifying separate screens for DefaultiPhoneScreen and DefaultiPadScreen, you can have completely different layouts for each type of device.

<div id="iosapplication.defaultiphonescreen">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSApplication.DefaultiPhoneScreen

**DefaultiPhoneScreen** As `iOSScreen</api/deprecated/iosscreen>`

Set to the default iOSScreen to use when the app is launched on an iPhone-sized device.

This property is read-only.

If you do not specify a DefaultiPhoneScreen, then the app will not run on iPhone-sized devices.

One or both of DefaultiPhoneScreen and DefaultiPadScreen must be specified.

By specifying separate screens for DefaultiPhoneScreen and DefaultiPadScreen, you can have completely different layouts for each type of device.

## Event descriptions

<div id="iosapplication.lowmemorywarning">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSApplication.LowMemoryWarning

**LowMemoryWarning**

Called when iOS reports a low-memory situation. Apps should attempt to free up objects and other resources when this event is raised. If the low-memory situation persists, iOS may kill your app.

Your implementation of this method should free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. It is strongly recommended that you implement this method. If your app does not release enough memory during low-memory conditions, the system may terminate it outright.

<div id="iosapplication.open">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSApplication.Open

**Open**

Called when the iOS app is first launched.

The launchOptions parameter is a reference to an NSDictionary.

More information here: [UIApplicationDelegate](https://developer.apple.com/documentation/uikit/uiapplicationdelegate)

Return True if your app has handled the request. The default of False means your app cannot handle launch options.

<div id="iosapplication.unhandledexception">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSApplication.UnhandledException

**UnhandledException**

Called if the app had an exception and did not handle it. If the event is not implemented or the event handler returns False, the application will terminate.

## Notes

You can change the iOS App Name using an IDE Script like this:

``` xojo
PropertyValue("App.iOSAppName") = "MyApp"
```

## Compatibility

iOS projects on the iOS operating system.

## See also

`Object</api/data_types/additional_types/object>` parent class; `iOSLayout</api/ios/ioslayout>`, `iOSSplitView</api/ios/iossplitview>`, `iOSTabBar</api/ios/iostabbar>`
