Use CocoaPods
App Indexing uses CocoaPods to install and manage dependencies. Learn how to install CocoaPods.
If you are new to CocoaPods, open a terminal window and navigate to the location of the Xcode project for your app:
pod init
If you already use CocoaPods, make sure it's up to date:
sudo gem update cocoapods
Add App Indexing
Add the following to your Podfile:
pod 'Firebase/AppIndexing'
This statement pulls the App Indexing dependencies from the CocoaPods repository.
Save and install
pod install
Initially, this command creates an .xcworkspace file for your application
configured for App Indexing. Use this file for all future development in your project and
repeat this command to update your workspace.
Import FirebaseAppIndexing
From the new workspace, import the Firebase module in your AppDelegate class.
@import Firebase;
Register your app to our system
Call the registerApp: method in your
application:didFinishLaunchingWithOptions: method.
[[FIRAppIndexing sharedInstance] registerApp:your Apple ID from iTunes Connect];
You're all set! Once our crawlers discover the URLs in your association file, Google automatically begins indexing any existing or new HTTP URLs to your app.
Next: Check Your Implementation
