중요: 2024년 5월 1일부터 Apple에서는 GoogleSignIn-iOS와 같이 흔히 사용되는 SDK를 사용하는 iOS 애플리케이션의 개인 정보 보호 매니페스트 및 서명을 요구합니다. 2024년 5월 1일 전에 GoogleSignIn-iOS v7.1.0 이상으로 업그레이드하세요. 업그레이드 가이드를 따르세요.
대부분의 앱은 로그인한 사용자의 ID를 일종의 백엔드 서비스에 전달해야 합니다. Google로 로그인한 사용자의 ID를 백엔드에 안전하게 전달하려면 백엔드 서버로 인증에 설명된 대로 ID 토큰을 사용합니다.
사용자의 ID 토큰을 가져오려면 백엔드를 나타내는 두 번째 클라이언트 ID(서버 클라이언트 ID)가 필요합니다.
[[["이해하기 쉬움","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-08-31(UTC)"],[[["\u003cp\u003ePrepare for Google Sign-In integration by installing Xcode, Google Sign-In dependencies via CocoaPods or Swift Package Manager, and obtaining OAuth client IDs.\u003c/p\u003e\n"],["\u003cp\u003eConfigure your iOS or macOS app project by adding your OAuth client ID and a custom URL scheme to your \u003ccode\u003eInfo.plist\u003c/code\u003e file.\u003c/p\u003e\n"],["\u003cp\u003eOptionally, configure your project for backend authentication by adding your server client ID and optimizing for Google Workspace domain or OpenID realm.\u003c/p\u003e\n"],["\u003cp\u003eEnsure your application is signed with an Apple-issued certificate before proceeding with Google Sign-In integration.\u003c/p\u003e\n"],["\u003cp\u003eAfter completing the setup, proceed to integrate Google Sign-In features into your app.\u003c/p\u003e\n"]]],[],null,["Before you can begin integrating your iOS or macOS app with the Google Sign-In components,\nyou must download the dependencies and configure your Xcode project. The steps on\nthis page do just that. The [next steps](#next_steps) then describe how to integrate\nGoogle Sign-In features into your app.\n\nBefore you begin\n\nInstall a current version of [Xcode](http://developer.apple.com/xcode/).\n\nInstall the Google Sign-In dependencies in your project \n\nCocoaPods\n\n1. If you don't already have CocoaPods installed, follow the steps in the\n CocoaPods [Getting Started](https://guides.cocoapods.org/using/getting-started.html)\n guide.\n\n2. Open a terminal window and navigate to the location of your app's Xcode\n project.\n\n3. If you have not already created a Podfile for your application, create one\n now:\n\n ```\n pod init\n ```\n\n \u003cbr /\u003e\n\n4. Open the Podfile created for your application and add the following:\n\n ```\n pod 'GoogleSignIn'\n ```\n\n \u003cbr /\u003e\n\n5. If you are using SwiftUI, also add the pod extension for the \"Sign in\n with Google\" button:\n\n ```\n pod 'GoogleSignInSwiftSupport'\n ```\n\n \u003cbr /\u003e\n\n6. Save the file and run:\n\n ```\n pod install\n ```\n\n \u003cbr /\u003e\n\n7. Open the generated `.xcworkspace` *workspace* file for your application in\n Xcode. Use this file for all future development on your application. (Note\n that this is different from the included `.xcodeproj` *project* file, which\n would result in build errors when opened.)\n\n You can refer to the [Objective-C sample app's\n Podfile](https://github.com/google/GoogleSignIn-iOS/blob/main/Samples/ObjC/SignInSample/Podfile)\n for an example.\n\nSwift Package Manager\n\n1. Open your project in Xcode.\n\n2. Add the Google Sign-In dependencies to your app\n ([Xcode documentation](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app)):\n\n |---------------------|----------------------------------------------|\n | **Repository** | `https://github.com/google/GoogleSignIn-iOS` |\n | **Version** | 7.0.0 |\n | **Package product** | GoogleSignIn |\n\n3. If you are using SwiftUI, also add the following extension package product\n for the \"Sign in with Google\" button:\n\n |---------------------|-------------------|\n | **Package product** | GoogleSignInSwift |\n\nGet an OAuth client ID\n\nYour app needs an OAuth client ID to identify itself to Google's authentication\nbackend. For iOS and macOS apps the [OAuth client ID application type](https://support.google.com/cloud/answer/6158849)\nmust be configured as iOS.\n\nIf you haven't already created an OAuth client ID, click the button\nbelow to do so.\n\nCreate an OAuth client ID\n\nAfter you create the OAuth client ID, take note of the client ID string, which\nyou will need to configure Google Sign-In in your app. You can optionally\ndownload the configuration file, which contains your client ID and other\nconfiguration data, for future reference.\n\nIf you already created an OAuth client ID, you can find your existing OAuth\ninformation by clicking the button below.\n\n[Get an existing OAuth client ID](https://console.cloud.google.com/apis/credentials?project=_)\n\nGet an OAuth server client ID\n\nMost apps will need to pass the identity of signed-in users to a backend service\nof some kind. To securely pass the identity of users who signed in with Google\nto your backend, you use ID tokens, as discussed in [Authenticate with a backend server](/identity/sign-in/ios/backend-auth).\nRetrieving a user's ID token requires a second client ID---your *server*\nclient ID---which represents your backend.\n\nTo create a server client ID:\n\n1. Open your project in the\n [Cloud\n console](https://console.developers.google.com/auth/clients).\n\n2. Create a new **Web application** type OAuth client ID. Take note of the\n client ID string, which you will need to configure Google Sign-In in your\n app.\n\nConfigure your application project\n\nGoogle Sign-In requires your project to be configured with your OAuth client ID\nand a custom URL scheme. Optionally, you can also add your server client ID for\n[backend authentication](/identity/sign-in/ios/backend-auth) or optimize your app for your Google\nWorkspace domain.\n\nAdd your OAuth client ID and custom URL scheme\n\nUpdate your app's `Info.plist` file to add your *OAuth\nclient ID* and a custom URL scheme based on the *reversed client ID*.\n\nThe reversed client ID is your client ID with the order of the dot-delimited\nfields reversed. This is also shown under \"*iOS URL scheme* \" when [selecting an\nexisting iOS OAuth client in the Cloud\nconsole](https://console.developers.google.com/auth/clients). For example:\n`com.googleusercontent.apps.1234567890-abcdefg`\n\n\u003cbr /\u003e\n\n```scdoc\n\u003ckey\u003eGIDClientID\u003c/key\u003e\n\u003cstring\u003eYOUR_IOS_CLIENT_ID\u003c/string\u003e\n\u003ckey\u003eCFBundleURLTypes\u003c/key\u003e\n\u003carray\u003e\n \u003cdict\u003e\n \u003ckey\u003eCFBundleURLSchemes\u003c/key\u003e\n \u003carray\u003e\n \u003cstring\u003eYOUR_DOT_REVERSED_IOS_CLIENT_ID\u003c/string\u003e\n \u003c/array\u003e\n \u003c/dict\u003e\n\u003c/array\u003e\n```\n\n\u003cbr /\u003e\n\nOptional: Configure backend authentication\n\nIf you need to get users' ID tokens for [backend authentication](/identity/sign-in/ios/backend-auth),\nalso set the `GIDServerClientID` key in your app's `Info.plist` file.\n| **Note:** This is the OAuth client ID for your backend project, not the ID for your iOS or macOS app. You need to [get an OAuth server client ID](#server_client_id) and specify it here.\n\n\u003cbr /\u003e\n\n```scdoc\n\u003ckey\u003eGIDServerClientID\u003c/key\u003e\n\u003cstring\u003eYOUR_SERVER_CLIENT_ID\u003c/string\u003e\n```\n\n\u003cbr /\u003e\n\nOptional: Optimize for a Google Workspace domain or OpenID realm\n\nUse the `GIDHostedDomain` parameter if you want to optimize the sign-in flow for\na Google Workspace domain.\n\n\u003cbr /\u003e\n\n```scdoc\n\u003ckey\u003eGIDHostedDomain\u003c/key\u003e\n\u003cstring\u003eYOUR_HOSTED_DOMAIN\u003c/string\u003e\n```\n\n\u003cbr /\u003e\n\nUse the `GIDOpenIDRealm` parameter if you want to specify an OpenID realm.\n\n\u003cbr /\u003e\n\n```scdoc\n\u003ckey\u003eGIDOpenIDRealm\u003c/key\u003e\n\u003cstring\u003eYOUR_OPENID_REALM\u003c/string\u003e\n```\n\n\u003cbr /\u003e\n\nSigning your application\n\nYour application must be signed with a certificate issued by Apple to run\nnatively on macOS and iOS devices in order to store credentials using Keychain.\n\nFor your macOS app to successfully store credentials using Keychain, you will\nalso need to add `$(AppIdentifierPrefix)$(CFBundleIdentifier)` to its keychain\naccess group.\n\nNext steps\n\nNow that you've downloaded the project dependencies and configured your Xcode\nproject, you can add [Google Sign-In](/identity/sign-in/ios/sign-in) to your iOS app."]]