### Install CocoaPods Dependencies Source: https://github.com/google/googlesignin-ios/blob/main/Samples/ObjC/SignInSample/README.md Run this command in the specified directory to install the necessary dependencies for the CocoaPods sample app. ```bash pod install ``` -------------------------------- ### Install Objective-C Sample via CocoaPods Source: https://github.com/google/googlesignin-ios/blob/main/README.md Commands to clone the repository and install dependencies for the Objective-C sample project using CocoaPods. ```bash git clone https://github.com/google/GoogleSignIn-iOS cd GoogleSignIn-iOS/Samples/ObjC/SignInSample/ pod install open SignInSampleForPod.xcworkspace ``` -------------------------------- ### Install Objective-C Sample via Swift Package Manager Source: https://github.com/google/googlesignin-ios/blob/main/README.md Commands to clone the repository and open the project for use with Swift Package Manager. ```bash git clone https://github.com/google/GoogleSignIn-iOS open GoogleSignIn-iOS/Samples/ObjC/SignInSample/SignInSample.xcodeproj ``` -------------------------------- ### Open CocoaPods workspace Source: https://github.com/google/googlesignin-ios/blob/main/Samples/Swift/AppAttestExample/README.md Open the generated workspace file after running pod install. ```bash open AppAttestExample.xcworkspace ``` -------------------------------- ### Open CocoaPods Workspace Source: https://github.com/google/googlesignin-ios/blob/main/Samples/Swift/DaysUntilBirthday/README.md Open the generated workspace file after running pod install. ```bash open DaysUntilBirthdayForPod.xcworkspace ``` -------------------------------- ### Open Swift Package Manager Project Source: https://github.com/google/googlesignin-ios/blob/main/Samples/ObjC/SignInSample/README.md Open the Xcode project file to access the Swift Package Manager sample app. ```bash open SignInSample.xcodeproj ``` -------------------------------- ### Open Swift Package Manager Project Source: https://github.com/google/googlesignin-ios/blob/main/Samples/Swift/DaysUntilBirthday/README.md Open the Xcode project file to use Swift Package Manager. ```bash open DaysUntilBirthday.xcodeproj ``` -------------------------------- ### Open Swift Package Manager project Source: https://github.com/google/googlesignin-ios/blob/main/Samples/Swift/AppAttestExample/README.md Open the project file directly when using Swift Package Manager. ```bash open AppAttestExample.xcodeproj ``` -------------------------------- ### Implement Google Sign-In Button in SwiftUI Source: https://github.com/google/googlesignin-ios/blob/main/README.md Basic implementation of the Google Sign-In button using the default view model configuration. ```swift GoogleSignInButton { GIDSignIn.sharedInstance.signIn(withPresenting: yourViewController) { signInResult, error in // check `error`; do something with `signInResult` } } ``` -------------------------------- ### Open CocoaPods Workspace Source: https://github.com/google/googlesignin-ios/blob/main/Samples/ObjC/SignInSample/README.md Open the generated workspace file to access the CocoaPods sample app project. ```bash open SignInSampleForPod.xcworkspace ``` -------------------------------- ### Run Integration Tests via Command Line Source: https://github.com/google/googlesignin-ios/blob/main/Samples/Swift/DaysUntilBirthday/README.md Pass email and password secrets as environment variables when running xcodebuild locally. ```bash xcodebuild EMAIL_SECRET=... PASSWORD_SECRET=... ``` -------------------------------- ### Run xcodebuild with environment variables Source: https://github.com/google/googlesignin-ios/blob/main/Samples/Swift/AppAttestExample/README.md Pass API keys and debug tokens as arguments during local xcodebuild execution. ```bash xcodebuild APP_CHECK_WEB_API_KEY=... AppCheckDebugToken=... ``` -------------------------------- ### Host SwiftUI Sign-In Button in AppKit Source: https://github.com/google/googlesignin-ios/blob/main/README.md Wrapping the SwiftUI Google Sign-In button in an NSHostingView for use within AppKit applications. ```swift let signInButton = GoogleSignInButton { GIDSignIn.sharedInstance.signIn(withPresenting: yourViewController) { signInResult, error in // check `error`; do something with `signInResult` } } let hostedButton = NSHostingView(rootView: signInButton) ``` -------------------------------- ### Create GIDSignInButton in UIKit Source: https://github.com/google/googlesignin-ios/blob/main/README.md Programmatic instantiation of the GIDSignInButton for UIKit applications. ```swift let button = GIDSignInButton(frame: CGRect()) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.