अहम जानकारी: Apple, 1 मई, 2024 से GoogleSignIn-iOS के साथ-साथ, आम तौर पर इस्तेमाल किए जाने वाले SDK टूल का इस्तेमाल करने वाले iOS ऐप्लिकेशन के लिए, निजता मेनिफ़ेस्ट और हस्ताक्षर स्वीकार करना ज़रूरी कर देगा. 1 मई, 2024 से पहले, GoogleSignIn-iOS v7.1.0+ वर्शन पर अपग्रेड करें. हमारी अपग्रेड गाइड देखें.
'Google साइन इन' सुविधा को तेज़ी से माइग्रेट करने से जुड़ी गाइड
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
इस पेज पर, 'Google साइन-इन' SDK टूल के मेजर वर्शन में हुए अहम बदलावों की जानकारी दी गई है.
अपने ऐप्लिकेशन को 'Google साइन-इन' SDK टूल के नए वर्शन पर माइग्रेट करने के लिए,
यह गाइड पढ़ें. ध्यान दें कि दस्तावेज़ हमेशा सबसे नए वर्शन के बारे में बताता है.
अपने ऐप्लिकेशन को, 'Google साइन-इन' SDK टूल के वर्शन 7.0.0 से पहले के किसी वर्शन से माइग्रेट करने के लिए,
ये बदलाव करें:
अपने ऐप्लिकेशन की Info.plist फ़ाइल में, OAuth क्लाइंट कॉन्फ़िगरेशन को सेट करें.
इसे रनटाइम पर (GIDConfiguration ऑब्जेक्ट का इस्तेमाल करके) सेट करना जारी रखा जा सकता है, लेकिन अब इसका सुझाव नहीं दिया जाता है. उदाहरणों और ज़्यादा जानकारी के लिए शुरू
करने की गाइड देखें.
GIDSignInDelegate प्रोटोकॉल और उसके तरीकों के सभी रेफ़रंस हटाएं.
लॉजिक को signIn:didSignInForUser:withError: से signInWithConfiguration:presentingViewController:callback: के कॉलबैक ब्लॉक में ले जाएं.
लॉजिक को signIn:didDisconnectWithUser:withError: से disconnectWithCallback: के कॉलबैक ब्लॉक में ले जाएं.
GIDSignInButton को मैन्युअल तरीके से ऐसे तरीके से कनेक्ट करें जिससे IBAction या इससे मिलते-जुलते तरीके का इस्तेमाल करके signInWithConfiguration:presentingViewController:callback: को कॉल किया जा सके.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eThis page provides migration guides for updating your app to the latest Google Sign-In SDK versions (v7.0.0+ and v6.0.0).\u003c/p\u003e\n"],["\u003cp\u003eFor v7.0.0+, OAuth client configuration should be set in \u003ccode\u003eInfo.plist\u003c/code\u003e, additional scopes are requested from \u003ccode\u003eGIDGoogleUser\u003c/code\u003e, and various properties and methods have been moved or updated.\u003c/p\u003e\n"],["\u003cp\u003eMigrating to v6.0.0 involves using \u003ccode\u003eGIDConfiguration\u003c/code\u003e for client configuration, updating method calls, and replacing \u003ccode\u003eGIDSignInDelegate\u003c/code\u003e with callback blocks.\u003c/p\u003e\n"],["\u003cp\u003eDetailed information and examples are available in linked resources like release notes, GitHub repository, and the "Get Started" guide.\u003c/p\u003e\n"]]],[],null,["This page details key changes for major versions of the Google Sign-In SDK.\n\nFollow this guide to migrate your app to the latest version of the Google\nSign-In SDK. Note that the documentation always refers to the most recent\nversion.\n\nAlso refer to the [release notes](/identity/sign-in/ios/release) and the\n[repository on GitHub](https://github.com/google/GoogleSignIn-iOS)\nfor more information.\n\nGoogle Sign-In SDK v7.0.0+\n\nTo migrate your app from a version of the Google Sign-In SDK prior to v7.0.0,\nmake the following changes:\n\n- Set your OAuth client configuration in your application's `Info.plist` file.\n You can continue to set it at runtime (using a `GIDConfiguration`) object,\n but this is no longer recommended. See the [get\n started](/identity/sign-in/ios/start-integrating#configure_app_project) guide for\n examples and more details.\n\n | `Info.plist` key | Description |\n |---------------------|-------------------------------------------------------------------------------------------------------------------|\n | `GIDClientID` | [OAuth client ID](/identity/sign-in/ios/start-integrating#add_client_id) |\n | `GIDServerClientID` | [Server OAuth client ID for backend authentication](/identity/sign-in/ios/start-integrating#add_server_client_id) |\n | `GIDHostedDomain` | [Google Workspace domain](/identity/sign-in/ios/start-integrating#add_domain_realm) |\n | `GIDOpenIDRealm` | [OpenID realm](/identity/sign-in/ios/start-integrating#add_domain_realm) |\n\n- The `addScopes:` method has been moved to GIDGoogleUser. Instead of\n requesting additional authorization scopes from GIDSignIn, you should now\n [request them from GIDGoogleUser after authentication](/identity/sign-in/ios/api-access#2_request_additional_scopes)\n has completed.\n\n- If you are setting `serverClientID` to [enable server-side API access for\n your app](/identity/sign-in/ios/offline-access), `serverAuthCode` will now be\n returned with `GIDSignInResult` in your completion.\n\n- Properties from `GIDAuthentication` have moved into `GIDGoogleUser`.\n\n- Update method calls:\n\n| v6.2.x | v7.0.0+ |\n|--------------------------------------------------------------------------|------------------------------------------------------------------|\n| `GIDSignIn` `signInWithConfiguration:presentingViewController:callback:` | `GIDSignIn` `signInWithPresentingViewController:completion:` |\n| `GIDSignIn` `restorePreviousSignInWithCallback:` | `GIDSignIn` `restorePreviousSignInWithCompletion:` |\n| `GIDSignIn` `disconnectWithCallback:` | `GIDSignIn` `disconnectWithCompletion:` |\n| `GIDAuthentication` `doWithFreshTokens:` | `GIDGoogleUser` `refreshTokensIfNeededWithCompletion:` |\n| `GIDSignIn` `addScopes:presentingViewController:callback:` | `GIDGoogleUser` `addScopes:presentingViewController:completion:` |\n\nGoogle Sign-In SDK v6.0.0\n\nTo migrate your app from a version of the Google Sign-In SDK prior to v6.0.0,\nmake the following changes:\n\n- Update all `[GIDSignIn sharedInstance]` calls to `GIDSignIn.sharedInstance`\n property accesses.\n\n- Move all client configuration (client IDs, etc.) to a `GIDConfiguration`\n object.\n\n- Update calls to removed methods to their new equivalents:\n\n | v5.x.x | v6.0.0 |\n |-----------------------------|--------------------------------------------------------------|\n | `signIn` | `signInWithConfiguration:presentingViewController:callback:` |\n | `restorePreviousSignIn` | `restorePreviousSignInWithCallback:` |\n | `disconnect` | `disconnectWithCallback:` |\n | `getTokensWithHandler:` | `doWithFreshTokens:` |\n | `refreshTokensWithHandler:` | `doWithFreshTokens:` |\n\n- Remove all references to the `GIDSignInDelegate` protocol and its methods.\n\n - Move the logic from `signIn:didSignInForUser:withError:` to the callback\n block of `signInWithConfiguration:presentingViewController:callback:`.\n\n - Move the logic from `signIn:didDisconnectWithUser:withError:` to the\n callback block of `disconnectWithCallback:`.\n\n- Manually connect `GIDSignInButton` to a method that calls\n `signInWithConfiguration:presentingViewController:callback:` using an\n `IBAction` or similar."]]