Google distributes several iOS specific APIs and SDKs via CocoaPods. CocoaPods is an open source dependency manager for Swift and Objective-C Cocoa projects. CocoaPods makes it easy to install or update new SDKs when working with Xcode.
You can install the CocoaPods tool on OS X by running the following command from the terminal. Detailed information is available in the Getting Started guide.
$ sudo gem install cocoapods
Add a Google SDK to your iOS app
CocoaPods is used to install and manage dependencies in existing Xcode projects.
- Create an Xcode project, and save it to your local machine.
- Create a file named
Podfilein your project directory. This file defines your project's dependencies, and is commonly referred to as a Podspec.
Podfile, and add your dependencies. A simple Podspec is shown here:
platform :ios, '8.1' target "YourProjectNameHere" do pod 'Firebase' end
Save the file.
Open a terminal and
cdto the directory containing the Podfile.
$ cd <path-to-project>/project/
pod installcommand. This will install the SDKs specified in the Podspec, along with any dependencies they may have.
$ pod update
Open your app's
.xcworkspacefile to launch Xcode. Use this file for all development on your app.
CocoaPods published by Google
Below is a complete list of the Podspecs published by Google.
|CocoaPods published by Google|
|Google App Indexing||
|Google Cloud Messaging||
|Google Conversion Tracking||
|Google Mobile Ads||
|Google IDFA Support||
|Google Sign In||
|Google Tag Manager||
|Google Play Games Services||
|Google Interactive Media Ads||
- I'm using CocoaPods. How do I update to the latest version of the SDK?
- In the terminal, run
pod updatein the directory where the
- What can I do if the
podcommand isn't working?
- CocoaPods may not be installed on your system. Please follow the Getting Started guide and try again. If that doesn't resolve the issue, check the status of the CocoaPods service at: https://status.cocoapods.org/.