Installation

Install Intercom to see and talk to users of your iOS app. The Intercom for iOS library supports iOS 13+ and requires Xcode 14 to build.

Step 1 - Install Intercom

If you’re new to Intercom, you’ll need to create an account and start your free trial. Then you have three options:

Option 1: CocoaPods

Cocoapods 1.10 is required to install Intercom.
Add Intercom to your Podfile and run pod install

target :YourTargetName do
  pod 'Intercom'
end

Option 2: Swift Package Manager

Add https://github.com/intercom/intercom-ios as a Swift Package Repository in Xcode and follow the instructions to add Intercom as a Swift Package.

Option 3: Install Intercom manually

  1. Download Intercom for iOS and extract the zip.
  2. Drag Intercom.xcframework into your project. Make sure ** "Copy items if needed"** is selected and click Finish.

  1. In the target settings for your app, set the Intercom.xcframework to “Embed & Sign”. This can be found in the “Frameworks, Libraries, and Embedded Content” section of the “General” tab.

Step 2 - Update Info.plist

Photo Library usage:
With the exception of apps that only support iOS 14+, when installing Intercom, you'll need to make sure that you have a NSPhotoLibraryUsageDescription entry in your Info.plist.

For apps that support iOS 13, this is required by Apple to access the photo library. It is necessary when installing Intercom due to the image upload functionality. Users will be prompted for the photo library permission only when they tap the image upload button.

On iOS 14+, Intercom uses the new PHPickerViewController API which does not require requesting users for photo library permission.

Step 3 - Initialize Intercom

First, you'll need to get your Intercom app ID and iOS API key. To find these, just select the 'Intercom for iOS' option in your app settings.

Then initialize Intercom by importing Intercom and adding the following to your application delegate:

  1. swift
  2. objectivec
import Intercom 
  
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
     Intercom.setApiKey("<Your iOS API Key>", forAppId: "<Your App ID>")
}

If your app is using a UISceneDelegate you will need to put your Intercom initialisation code into your SceneDelegate

  1. swift
  2. objectivec
import Intercom 

func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
 	Intercom.setApiKey("<Your iOS API Key>", forAppId: "<Your App ID>")
}