# GCKCredentialsData Class

[Instance Methods](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_credentials_data#pub-methods) GCKCredentialsData Class Reference

## Overview

A class to maintain the application specific credentials data to identify and possibly authenticates the user.

Since
:   4.4.8

Inherits NSObject.

|---|---|
| ## Instance Method Summary ||
| (instancetype) | - **init** |
|   ||
| (instancetype) | - [initWithCredentials:](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_credentials_data#ada5bd74b764e23bfc36563e8166aa5e5) |
|   | Initializes and returns a newly allocated `https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_credentials_data` object with the specified credentials. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_credentials_data#ada5bd74b764e23bfc36563e8166aa5e5) |
|   ||
| (instancetype) | - [initWithCredentials:credentialsType:](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_credentials_data#af54f24138f866978440e36d5af449ae8) |
|   | Initializes and returns a newly allocated `https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_credentials_data` object with the specified credentials and credentials type. [More...](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_credentials_data#af54f24138f866978440e36d5af449ae8) |
|   ||
| (NSString \*_Nullable) | - **credentials** |
|   ||
| (NSString \*_Nullable) | - **credentialsType** |
|   ||

## Method Detail

|---|---|---|---|---|
| - (instancetype) initWithCredentials: |   | (NSString \*_Nullable) | *credentials* |   |

Initializes and returns a newly allocated `https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_credentials_data` object with the specified credentials.

The `credentialsType` is assigned "ios" as default value to indicate it comes from an iOS sender.

Parameters
:

    |---|---|
    | credentials | A string to identify and possibly authenticate the user. May be `nil`. |


|---|---|---|---|
| - (instancetype) [initWithCredentials:](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_credentials_data#ada5bd74b764e23bfc36563e8166aa5e5) |   | (NSString \*_Nullable) | *credentials* |
| credentialsType: |   | (NSString \*_Nullable) | *credentialsType* |
|   |   |   |   |

Initializes and returns a newly allocated `https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_credentials_data` object with the specified credentials and credentials type.

Parameters
:

    |---|---|
    | credentials | A string to identify and possibly authenticate the user. May be `nil`. |
    | credentialsType | A string to identify the type of the credentials. May be `nil`. |