# &lt;GCKDeviceManagerDelegate&gt; Protocol

[Instance Methods](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#pub-methods) \<GCKDeviceManagerDelegate\> Protocol Reference

## Overview

The [GCKDeviceManager](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device_manager "A controller for Cast devices. ") delegate protocol.

Unless indicated otherwise, the caller should **not** release the delegating [GCKDeviceManager](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device_manager "A controller for Cast devices. ") object from within a delegate method.

Inherits \<NSObjectNSObject\>.

|---|---|
| ## Instance Method Summary ||
| (void) | - [deviceManagerDidConnect:](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#a55eb58b1dec590260b465841e1f0164f) |
|   | Called when a connection has been established to the device. [More...](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#a55eb58b1dec590260b465841e1f0164f) |
|   ||
| (void) | - [deviceManager:didFailToConnectWithError:](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#a07d11720660bd77aa14b811639ea518f) |
|   | Called when the connection to the device has failed. [More...](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#a07d11720660bd77aa14b811639ea518f) |
|   ||
| (void) | - [deviceManager:didDisconnectWithError:](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#a7233a9ca38e1f52b1dd1c71570bc1139) |
|   | Called when the connection to the device has been terminated. [More...](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#a7233a9ca38e1f52b1dd1c71570bc1139) |
|   ||
| (void) | - [deviceManager:didSuspendConnectionWithReason:](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#a5a9bdde1216a28e6fe7b845f286d25db) |
|   | Called when the connection to the device has been suspended, possibly temporarily. [More...](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#a5a9bdde1216a28e6fe7b845f286d25db) |
|   ||
| (void) | - [deviceManagerDidResumeConnection:rejoinedApplication:](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#aa5ea9c72679915ee9d3d4ae32c58faa5) |
|   | Called when a previously suspended device connection has been re-established. [More...](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#aa5ea9c72679915ee9d3d4ae32c58faa5) |
|   ||
| (void) | - [deviceManager:didConnectToCastApplication:sessionID:launchedApplication:](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#a9b9da661f29235ffc839a7c6883d9daf) |
|   | Called when an application has been launched or joined. [More...](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#a9b9da661f29235ffc839a7c6883d9daf) |
|   ||
| (void) | - [deviceManager:didFailToConnectToApplicationWithError:](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#afe71a650ed4742af51ae9295d8825ed8) |
|   | Called when connecting to an application fails. [More...](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#afe71a650ed4742af51ae9295d8825ed8) |
|   ||
| (void) | - [deviceManager:didDisconnectFromApplicationWithError:](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#a4c6500daa527adc70653ca170d01ba4e) |
|   | Called when disconnected from the current application. [More...](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#a4c6500daa527adc70653ca170d01ba4e) |
|   ||
| (void) | - [deviceManagerDidStopApplication:](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#a61a62dc55e896a6541be968712f2a6f7) |
|   | Called when a stop application request has completed successfully. [More...](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#a61a62dc55e896a6541be968712f2a6f7) |
|   ||
| (void) | - [deviceManager:didFailToStopApplicationWithError:](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#a14b76984e3a27bc4de99c456f55aa70c) |
|   | Called when a stop application request fails. [More...](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#a14b76984e3a27bc4de99c456f55aa70c) |
|   ||
| (void) | - [deviceManager:didReceiveApplicationMetadata:](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#aa70c4b1b7c7c5dc4ab9c2dc961dcc582) |
|   | Called whenever the application metadata for the currently running application has changed. [More...](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#aa70c4b1b7c7c5dc4ab9c2dc961dcc582) |
|   ||
| (void) | - [deviceManager:didReceiveApplicationStatusText:](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#ae154d99c001b4f15ffa1e4cd70335776) |
|   | Called whenever the currently running application status text has changed. [More...](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#ae154d99c001b4f15ffa1e4cd70335776) |
|   ||
| (void) | - [deviceManager:volumeDidChangeToLevel:isMuted:](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#ab46baa1580d82666c7cac7870455372e) |
|   | Called whenever the volume changes. [More...](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#ab46baa1580d82666c7cac7870455372e) |
|   ||
| (void) | - [deviceManager:didReceiveActiveInputStatus:](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#a2a4031a396dec71332963cc3c5c8bef8) |
|   | Called whenever the active input status changes. [More...](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#a2a4031a396dec71332963cc3c5c8bef8) |
|   ||
| (void) | - [deviceManager:didReceiveStandbyStatus:](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#ae3caa718d53f169cdd2c50a943ffaeeb) |
|   | Called whenever the standby status changes. [More...](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#ae3caa718d53f169cdd2c50a943ffaeeb) |
|   ||
| (void) | - [deviceManager:request:didFailWithError:](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#ae2aae6e20e275bd862df79e65e826ab5) |
|   | Called when an asynchronous operation has failed. [More...](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#ae2aae6e20e275bd862df79e65e826ab5) |
|   ||
| (void) | - [deviceManagerDidPair:withGuestModeDevice:](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#ac03992339e981f410c1b2fe90c75544f) |
|   | Called when a guest mode connection has been established to the device. [More...](https://developers.google.com/cast/v3/reference/ios/protocol_g_c_k_device_manager_delegate-p#ac03992339e981f410c1b2fe90c75544f) |
|   ||

## Method Detail

|---|---|
| |---|---|---|---|---| | - (void) deviceManagerDidConnect: |   | ([GCKDeviceManager](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device_manager) \*) | *deviceManager* |   | | optional |

Called when a connection has been established to the device.

Parameters
:

    |---|---|
    | deviceManager | The device manager. |


|---|---|
| |---|---|---|---| | - (void) deviceManager: |   | ([GCKDeviceManager](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device_manager) \*) | *deviceManager* | | didFailToConnectWithError: |   | (NSError \*) | *error* | |   |   |   |   | | optional |

Called when the connection to the device has failed.

It is safe to release the [GCKDeviceManager](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device_manager "A controller for Cast devices. ") object from within this callback.

Parameters
:

    |---|---|
    | deviceManager | The device manager. |
    | error | The error that caused the connection to fail. |


|---|---|
| |---|---|---|---| | - (void) deviceManager: |   | ([GCKDeviceManager](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device_manager) \*) | *deviceManager* | | didDisconnectWithError: |   | (NSError \*__nullable) | *error* | |   |   |   |   | | optional |

Called when the connection to the device has been terminated.

It is safe to release the [GCKDeviceManager](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device_manager "A controller for Cast devices. ") object from within this callback.

Parameters
:

    |---|---|
    | deviceManager | The device manager. |
    | error | The error that caused the disconnection; `nil` if there was no error (for example, an intentional disconnect). |


|---|---|
| |---|---|---|---| | - (void) deviceManager: |   | ([GCKDeviceManager](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device_manager) \*) | *deviceManager* | | didSuspendConnectionWithReason: |   | ([GCKConnectionSuspendReason](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a9ac76146a1ad598bb34070e314876a37)) | *reason* | |   |   |   |   | | optional |

Called when the connection to the device has been suspended, possibly temporarily.

When a connection is suspended, the device manager will automatically attempt to re-establish the connection at the appropriate time. The calling application should not attempt to force a reconnect itself.

Parameters
:

    |---|---|
    | deviceManager | The device manager. |
    | reason | The reason for the suspension. |


|---|---|
| |---|---|---|---| | - (void) deviceManagerDidResumeConnection: |   | ([GCKDeviceManager](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device_manager) \*) | *deviceManager* | | rejoinedApplication: |   | (BOOL) | *rejoinedApplication* | |   |   |   |   | | optional |

Called when a previously suspended device connection has been re-established.

Parameters
:

    |---|---|
    | deviceManager | The device manager. |
    | rejoinedApplication | If a connection had been established to a receiver application at the time of the suspension, this flag indicates whether that application has been successfully re-joined. This value would be `NO` if, for example, the application was terminated during the time that the device manager was attempting to re-establish its connection to the device. |


|---|---|
| |---|---|---|---| | - (void) deviceManager: |   | ([GCKDeviceManager](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device_manager) \*) | *deviceManager* | | didConnectToCastApplication: |   | ([GCKApplicationMetadata](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_application_metadata) \*) | *applicationMetadata* | | sessionID: |   | (NSString \*) | *sessionID* | | launchedApplication: |   | (BOOL) | *launchedApplication* | |   |   |   |   | | optional |

Called when an application has been launched or joined.

Parameters
:

    |---|---|
    | deviceManager | The device manager. |
    | applicationMetadata | Metadata about the application. |
    | sessionID | The current application session ID that is active on the receiver. |
    | launchedApplication | `YES` if the application was launched as part of the connection, or `NO` if the application was already running and was joined. |


|---|---|
| |---|---|---|---| | - (void) deviceManager: |   | ([GCKDeviceManager](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device_manager) \*) | *deviceManager* | | didFailToConnectToApplicationWithError: |   | (NSError \*) | *error* | |   |   |   |   | | optional |

Called when connecting to an application fails.

Parameters
:

    |---|---|
    | deviceManager | The device manager. |
    | error | The error that caused the failure. |


|---|---|
| |---|---|---|---| | - (void) deviceManager: |   | ([GCKDeviceManager](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device_manager) \*) | *deviceManager* | | didDisconnectFromApplicationWithError: |   | (NSError \*__nullable) | *error* | |   |   |   |   | | optional |

Called when disconnected from the current application.

Parameters
:

    |---|---|
    | deviceManager | The device manager. |
    | error | The error that caused the disconnect, or `nil` if this was a normal disconnect. |


|---|---|
| |---|---|---|---|---| | - (void) deviceManagerDidStopApplication: |   | ([GCKDeviceManager](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device_manager) \*) | *deviceManager* |   | | optional |

Called when a stop application request has completed successfully.

Parameters
:

    |---|---|
    | deviceManager | The device manager. |


|---|---|
| |---|---|---|---| | - (void) deviceManager: |   | ([GCKDeviceManager](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device_manager) \*) | *deviceManager* | | didFailToStopApplicationWithError: |   | (NSError \*) | *error* | |   |   |   |   | | optional |

Called when a stop application request fails.

Parameters
:

    |---|---|
    | deviceManager | The device manager. |
    | error | The error that caused the failure. |


|---|---|
| |---|---|---|---| | - (void) deviceManager: |   | ([GCKDeviceManager](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device_manager) \*) | *deviceManager* | | didReceiveApplicationMetadata: |   | ([GCKApplicationMetadata](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_application_metadata) \*__nullable) | *metadata* | |   |   |   |   | | optional |

Called whenever the application metadata for the currently running application has changed.

Parameters
:

    |---|---|
    | deviceManager | The device manager. |
    | metadata | The application metadata. May be nil if no application is currently running. |


|---|---|
| |---|---|---|---| | - (void) deviceManager: |   | ([GCKDeviceManager](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device_manager) \*) | *deviceManager* | | didReceiveApplicationStatusText: |   | (NSString \*__nullable) | *applicationStatusText* | |   |   |   |   | | optional |

Called whenever the currently running application status text has changed.

Parameters
:

    |---|---|
    | deviceManager | The device manager. |
    | applicationStatusText | The application status text. May be nil if no application is currently running or if the application did not report any status text. |


|---|---|
| |---|---|---|---| | - (void) deviceManager: |   | ([GCKDeviceManager](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device_manager) \*) | *deviceManager* | | volumeDidChangeToLevel: |   | (float) | *volumeLevel* | | isMuted: |   | (BOOL) | *isMuted* | |   |   |   |   | | optional |

Called whenever the volume changes.

Parameters
:

    |---|---|
    | deviceManager | The device manager. |
    | volumeLevel | The current device volume level. |
    | isMuted | The current device mute state. |


|---|---|
| |---|---|---|---| | - (void) deviceManager: |   | ([GCKDeviceManager](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device_manager) \*) | *deviceManager* | | didReceiveActiveInputStatus: |   | ([GCKActiveInputStatus](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a4e1d6d2f711f543c3bb3ea38807322fa)) | *activeInputStatus* | |   |   |   |   | | optional |

Called whenever the active input status changes.

Parameters
:

    |---|---|
    | deviceManager | The device manager. |
    | activeInputStatus | The active input status. |


|---|---|
| |---|---|---|---| | - (void) deviceManager: |   | ([GCKDeviceManager](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device_manager) \*) | *deviceManager* | | didReceiveStandbyStatus: |   | ([GCKStandbyStatus](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a0b2d49eee120006431d7701487917932)) | *standbyStatus* | |   |   |   |   | | optional |

Called whenever the standby status changes.

Parameters
:

    |---|---|
    | deviceManager | The device manager. |
    | standbyStatus | The standby status. |


|---|---|
| |---|---|---|---| | - (void) deviceManager: |   | ([GCKDeviceManager](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device_manager) \*) | *deviceManager* | | request: |   | (NSInteger) | *requestID* | | didFailWithError: |   | (NSError \*) | *error* | |   |   |   |   | | optional |

Called when an asynchronous operation has failed.

Parameters
:

    |---|---|
    | deviceManager | The device manager. |
    | requestID | The ID of the request that failed. |
    | error | The error. |


|---|---|
| |---|---|---|---| | - (void) deviceManagerDidPair: |   | ([GCKDeviceManager](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device_manager) \*) | *deviceManager* | | withGuestModeDevice: |   | ([GCKDevice](https://developers.google.com/cast/v3/reference/ios/interface_g_c_k_device) \*) | *guestModeDevice* | |   |   |   |   | | optional |

Called when a guest mode connection has been established to the device.

Parameters
:

    |---|---|
    | deviceManager | The device manager. |
    | guestModeDevice | The device object for the concrete guest mode device. |