GCKCredentialsData Class
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
کلاسی برای حفظ اطلاعات اعتبار برنامه کاربردی برای شناسایی و احتمالاً احراز هویت کاربر.
- از آنجا که
- 4.4.8
NSObject را به ارث می برد.
- (instancetype) initWithCredentials: |
|
(NSString *_Nullable) |
credentials |
|
یک شیء GCKCredentialsData
را که به تازگی تخصیص داده شده را با اعتبار مشخص شده راه اندازی و برمی گرداند.
credentialsType
به "ios" به عنوان مقدار پیش فرض اختصاص داده می شود تا نشان دهد که از فرستنده iOS آمده است.
- Parameters
-
credentials | A string to identify and possibly authenticate the user. May be nil . |
- (instancetype) initWithCredentials: |
|
(NSString *_Nullable) |
credentials |
credentialsType: |
|
(NSString *_Nullable) |
credentialsType |
|
|
| |
یک شیء جدید اختصاص داده شده GCKCredentialsData
را با نوع اعتبار و نوع اعتبار مشخص شده، مقداردهی اولیه و برمی گرداند.
- 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 . |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\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`. |"]]