# GCKLaunchOptions Class

[Instance Methods](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_launch_options#pub-methods) \| [Properties](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_launch_options#properties) GCKLaunchOptions Class Reference

## Overview

Receiver application launch options.

Changes to this object must be made before passing it to the [GCKCastContext](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_cast_context "A class containing global objects and state for the framework. ").

Inherits NSObject, \<NSCopying\>, and \<NSSecureCoding\>.

|---|---|
| ## Instance Method Summary ||
| (instancetype) | - [init](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_launch_options#a517758eee4ced6050e6c1828f2dd99ff) |
|   | Initializes the object with default values. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_launch_options#a517758eee4ced6050e6c1828f2dd99ff) |
|   ||
| (instancetype) | - [initWithRelaunchIfRunning:](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_launch_options#aaffd323b75c8c8575cd11117c176878b) |
|   | Initializes the object with the sender device's language code and the specified relaunch behavior. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_launch_options#aaffd323b75c8c8575cd11117c176878b) |
|   ||
| (instancetype) | - [initWithLanguageCode:relaunchIfRunning:](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_launch_options#a368319fc96627c9073677d441ffbbad2) |
|   | Initializes the object with the specified language code and relaunch behavior. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_launch_options#a368319fc96627c9073677d441ffbbad2) |
|   ||
| (instancetype) | - [initWithRelaunchIfRunning:androidReceiverCompatible:](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_launch_options#ad24e461b07166adca090b9290132e744) |
|   | Initializes the object with the sender device's language code, the specified relaunch behavior and if the sender application supports Android TV application. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_launch_options#ad24e461b07166adca090b9290132e744) |
|   ||
| (instancetype) | - [initWithRelaunchIfRunning:languageCode:androidReceiverCompatible:](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_launch_options#a5611e07559f92c2ec54428e061921676) |
|   | Designated initializer. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_launch_options#a5611e07559f92c2ec54428e061921676) |
|   ||

|---|---|
| ## Property Summary ||
| NSString \* | [languageCode](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_launch_options#a945553da0a01cb4bfd16ca587f21bc08) |
|   | The sender's language code as per RFC 5646. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_launch_options#a945553da0a01cb4bfd16ca587f21bc08) |
|   ||
| BOOL | [relaunchIfRunning](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_launch_options#a130bec9fa71e880bef4aec51be5dcf56) |
|   | A flag indicating whether the receiver application should be relaunched if it is already running. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_launch_options#a130bec9fa71e880bef4aec51be5dcf56) |
|   ||
| BOOL | [androidReceiverCompatible](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_launch_options#ab10650f96800319cbbda0302ad4b505b) |
|   | A flag indicating whether the sender application supports casting to an Android TV application. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_launch_options#ab10650f96800319cbbda0302ad4b505b) |
|   ||

## Method Detail

|---|---|---|---|
| - (instancetype) init |   |   |   |

Initializes the object with default values.

|---|---|---|---|---|
| - (instancetype) initWithRelaunchIfRunning: |   | (BOOL) | *relaunchIfRunning* |   |

Initializes the object with the sender device's language code and the specified relaunch behavior.

|---|---|---|---|
| - (instancetype) initWithLanguageCode: |   | (nullable NSString \*) | *languageCode* |
| relaunchIfRunning: |   | (BOOL) | *relaunchIfRunning* |
|   |   |   |   |

Initializes the object with the specified language code and relaunch behavior.

Parameters
:

    |---|---|
    | languageCode | The language code as per RFC 5646. |
    | relaunchIfRunning | A flag indicating whether the receiver application should be relaunched if it is already running. |


|---|---|---|---|
| - (instancetype) [initWithRelaunchIfRunning:](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_launch_options#aaffd323b75c8c8575cd11117c176878b) |   | (BOOL) | *relaunchIfRunning* |
| androidReceiverCompatible: |   | (BOOL) | *androidReceiverCompatible* |
|   |   |   |   |

Initializes the object with the sender device's language code, the specified relaunch behavior and if the sender application supports Android TV application.

Since
:   4.4.7

|---|---|---|---|
| - (instancetype) [initWithRelaunchIfRunning:](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_launch_options#aaffd323b75c8c8575cd11117c176878b) |   | (BOOL) | *relaunchIfRunning* |
| languageCode: |   | (nullable NSString \*) | *languageCode* |
| androidReceiverCompatible: |   | (BOOL) | *androidReceiverCompatible* |
|   |   |   |   |

Designated initializer.

Initializes the object with the specified language code, relaunch behavior and support for Android TV application.

Parameters
:

    |---|---|
    | relaunchIfRunning | A flag indicating whether the receiver application should be relaunched |
    | languageCode | The language code as per RFC 5646. |
    | androidReceiverCompatible | A flag indicating whether the sender application supports Android application on the receiver side. |


Since
:   4.4.7

## Property Detail

|---|---|
| |---| | - (NSString\*) languageCode | | readwritenonatomiccopy |

The sender's language code as per RFC 5646.

The default is the sender device's language.

|---|---|
| |---| | - (BOOL) relaunchIfRunning | | readwritenonatomicassign |

A flag indicating whether the receiver application should be relaunched if it is already running.

The default is `NO`.

|---|---|
| |---| | - (BOOL) androidReceiverCompatible | | readwritenonatomicassign |

A flag indicating whether the sender application supports casting to an Android TV application.

Default value is `NO`.

Since
:   4.4.7