---
title: "How do I install Sarbacane Chat in an iOS app?"
description: "Add the Sarbacane Chat chatbox to your iPhone or iPad app with the iOS SDK."
url: https://help.sarbacane.com/en/articles/363-how-do-i-install-sarbacane-chat-in-an-ios-app
collection: "For developers"
updated: 2026-12-03
language: en
alternates: [fr, es]
---

# How do I install Sarbacane Chat in an iOS app?

Add the Sarbacane Chat chatbox to your iPhone or iPad app with the iOS SDK.

To show Sarbacane Chat in your iOS app, install the SDK with CocoaPods, then call it with your chatbox's public key. This article is for the app's developer.

## Prerequisites

-   A Sarbacane Chat licence assigned to your user, with access to **Settings**.
    
-   An iOS project that uses CocoaPods, targeting iOS 9 or later.
    

## Steps

1.  In Sarbacane Chat, at the bottom of the left menu, click **Settings**. Under **Chatbox**, open **Deploy**, then the **iOS app** tab.
    
2.  On the right, under **Public brand key:**, click **Copy**. The key starts with "spk-".
    

**Important**: use the public key. The **Secret brand key:** must never appear in the app's code.

3.  In your project's Podfile, add the line `pod 'XenoApp'`, then run `pod install`.
    
4.  In `AppDelegate`, in the `didFinishLaunchingWithOptions` method, import the SDK and prepare the chatbox with your public key:
    

```swift
import XenoApp

Xeno.sharedInstance.prepare(apiKey: "YOUR_PUBLIC_KEY")
```

5.  In the `ViewController` where the chatbox should appear, in the `viewDidLoad` method, show it:
    

```swift
Xeno.sharedInstance.show()
```

**Note**: the SDK and the class use the technical name XenoApp / Xeno. This is expected. With no other setting, each device appears in Sarbacane Chat as a new contact named "Unknown". To pass the identity of the logged-in user, `prepare` accepts an `identity` parameter (a dictionary, for example with `id` and `name`).

## Expected result

Launch the app and open the view: the chatbox appears. Send a test message: it arrives in **Inbox**.

## Troubleshooting

### The chatbox does not appear

Check in this order:

1.  `pod install` has run, and `import XenoApp` is present in both files.
    
2.  `prepare` is called in `AppDelegate`, before `show()`.
    
3.  The key is the public key ("spk-…"), copied without spaces.
    
4.  `show()` is called in the view that is actually displayed.
    

If the problem persists, contact our Sarbacane Chat experts at aide-chat@sarbacane.com.

## Related articles

-   [How do I install Sarbacane Chat in an Android app?](https://help.sarbacane.com/en/articles/364.md)
    
-   [How do I install Sarbacane Chat on my website?](https://help.sarbacane.com/en/articles/117.md)
    
-   [What is Sarbacane Chat and what is each menu for?](https://help.sarbacane.com/en/articles/118.md)
