Try Sign-In for iOS and macOS

Use our iOS and macOS sample app to see how Sign-In works, or add Sign-In to your existing app.

This sample shows how to integrate Sign-In in Swift for iOS and macOS.

For Objetive-C, see the SignInSample sample app in the Google Sign-In for iOS repository.

To use this sample, make sure you have a current version of Xcode installed.

Get the project

The DaysUntilBirthday Swift sample app is available in the Sign-In repository using CocoaPods and Swift Package Manager. Follow the instructions for your preferred option below to download and run the sample app:

CocoaPods

  1. If you don't already have CocoaPods installed, follow the steps in the CocoaPods Getting Started guide.
  2. Clone the Google Sign-In for iOS repository:
    git clone https://github.com/google/GoogleSignIn-iOS
  3. Navigate to the DaysUntilBirthday directory:
    cd GoogleSignIn-iOS/Samples/Swift/DaysUntilBirthday
  4. Install the Cocoapods dependencies:
    pod install
  5. Open the DaysUntilBirthdayForPod workspace in Xcode:
    open DaysUntilBirthdayForPod.xcworkspace

Swift Package Manager

  1. Clone the Sign-In for iOS repository:
    git clone https://github.com/google/GoogleSignIn-iOS
  2. Open the Swift sample project:
    open GoogleSignIn-iOS/Samples/Swift/DaysUntilBirthday/DaysUntilBirthday.xcodeproj

Swift Package Manager will automatically add the dependencies when Xcode opens the project.

Run the application

For iOS, select the DaysUntilBirthday (iOS) target, then start the sample application on a device or in the iOS simulator by clicking the run button for the workspace.

For macOS, select the DaysUntilBirthday (macOS) target, then start the sample application by clicking the run button for the workspace.

Next steps

If you want to see how you can implement Google Sign-In in your own app, take a look at our implementation guide. Or, take a look at the complete sample on GitHub.

Add Sign-In to your app See the sample apps on GitHub

Did you have a good experience? Run into trouble? Let us know!