Classe GCKCredentialsData
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Una classe per gestire i dati delle credenziali specifici dell'applicazione al fine di identificare ed eventualmente autenticare l'utente.
- Dal
- 4.4.8
Eredita NSObject.
- (instancetype) initWithCredentials: |
|
(NSString *_Nullable) |
credentials |
|
Inizializza e restituisce un oggetto GCKCredentialsData
appena allocato con le credenziali specificate.
A credentialsType
viene assegnato il valore predefinito "ios" per indicare che proviene da un mittente iOS.
- Parameters
-
credentials | A string to identify and possibly authenticate the user. May be nil . |
- (instancetype) initWithCredentials: |
|
(NSString *_Nullable) |
credentials |
credentialsType: |
|
(NSString *_Nullable) |
credentialsType |
|
|
| |
Inizializza e restituisce un oggetto GCKCredentialsData
appena allocato con le credenziali e il tipo di credenziali specificati.
- 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 . |
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-25 UTC.
[null,null,["Ultimo aggiornamento 2025-07-25 UTC."],[[["\u003cp\u003e\u003ccode\u003eGCKCredentialsData\u003c/code\u003e stores application-specific credentials to identify and potentially authenticate users.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to initialize with credentials and a credentials type (defaulting to "ios" if not specified).\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecredentials\u003c/code\u003e and \u003ccode\u003ecredentialsType\u003c/code\u003e properties can be accessed to retrieve the stored values.\u003c/p\u003e\n"],["\u003cp\u003eThis class is available since Google Cast SDK v4.4.8.\u003c/p\u003e\n"]]],["The `GCKCredentialsData` class manages application-specific user credentials. Key actions include initializing the class instance via `-init`, `-initWithCredentials:` or `-initWithCredentials:credentialsType:`. Initialization allows setting credentials, a string for user identification and possible authentication, and optionally, `credentialsType`, identifying the credential type. The default `credentialsType` is \"ios\". The class also has read only methods `credentials` and `credentialsType` to retrieve those stored data.\n"],null,["# GCKCredentialsData Class\n\n[Instance Methods](#pub-methods) \nGCKCredentialsData Class Reference \n\nOverview\n--------\n\nA class to maintain the application specific credentials data to identify and possibly authenticates the user.\n\nSince\n: 4.4.8\n\nInherits NSObject.\n\n|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Instance Method Summary ----------------------- ||\n| (instancetype) | - **init** |\n| ||\n| (instancetype) | - [initWithCredentials:](/cast/docs/reference/ios/interface_g_c_k_credentials_data#ada5bd74b764e23bfc36563e8166aa5e5) |\n| | Initializes and returns a newly allocated [GCKCredentialsData](/cast/docs/reference/ios/interface_g_c_k_credentials_data \"A class to maintain the application specific credentials data to identify and possibly authenticates ...\") object with the specified credentials. [More...](#ada5bd74b764e23bfc36563e8166aa5e5) |\n| ||\n| (instancetype) | - [initWithCredentials:credentialsType:](/cast/docs/reference/ios/interface_g_c_k_credentials_data#af54f24138f866978440e36d5af449ae8) |\n| | Initializes and returns a newly allocated [GCKCredentialsData](/cast/docs/reference/ios/interface_g_c_k_credentials_data \"A class to maintain the application specific credentials data to identify and possibly authenticates ...\") object with the specified credentials and credentials type. [More...](#af54f24138f866978440e36d5af449ae8) |\n| ||\n| (NSString \\*_Nullable) | - **credentials** |\n| ||\n| (NSString \\*_Nullable) | - **credentialsType** |\n| ||\n\nMethod Detail\n-------------\n\n|---------------------------------------|---|------------------------|---------------|---|\n| - (instancetype) initWithCredentials: | | (NSString \\*_Nullable) | *credentials* | |\n\nInitializes and returns a newly allocated [GCKCredentialsData](/cast/docs/reference/ios/interface_g_c_k_credentials_data \"A class to maintain the application specific credentials data to identify and possibly authenticates ...\") object with the specified credentials.\n\nThe `credentialsType` is assigned \"ios\" as default value to indicate it comes from an iOS sender.\n\nParameters\n:\n\n |-------------|------------------------------------------------------------------------|\n | credentials | A string to identify and possibly authenticate the user. May be `nil`. |\n\n\n|--------------------------------------------------------------------------------------------------------------------------------------|---|------------------------|-------------------|\n| - (instancetype) [initWithCredentials:](/cast/docs/reference/ios/interface_g_c_k_credentials_data#ada5bd74b764e23bfc36563e8166aa5e5) | | (NSString \\*_Nullable) | *credentials* |\n| credentialsType: | | (NSString \\*_Nullable) | *credentialsType* |\n| | | | |\n\nInitializes and returns a newly allocated [GCKCredentialsData](/cast/docs/reference/ios/interface_g_c_k_credentials_data \"A class to maintain the application specific credentials data to identify and possibly authenticates ...\") object with the specified credentials and credentials type.\n\nParameters\n:\n\n |-----------------|------------------------------------------------------------------------|\n | credentials | A string to identify and possibly authenticate the user. May be `nil`. |\n | credentialsType | A string to identify the type of the credentials. May be `nil`. |"]]