---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/chat/ios/quickstart#article
headline: Programmable Chat iOS Quickstart
description: "Build a working Twilio Programmable Chat iOS app fast: gather account info, create a token-generating Twilio Function, and run the starter app."
url: https://www.twilio.com/docs/chat/ios/quickstart
inLanguage: en
dateModified: 2026-06-25T22:35:25.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# Programmable Chat iOS Quickstart

> \[!CAUTION]
>
> Programmable Chat has been deprecated and receives no support. Twilio has turned its focus to the next generation of chat: [Twilio Conversations][]. Find out more about the [EOL process][].
>
> * To start a project, see [Conversations][].
> * To switch from Programmable Chat, see the [Migration Guide][] to learn about how to switch.

[Twilio Conversations]: /docs/conversations

[EOL process]: https://www.twilio.com/en-us/changelog/programmable-chat-end-of-life-notice

[Conversations]: /docs/conversations-classic

[Migration Guide]: /docs/conversations-classic/migrating-chat-conversations

This quickstart gets you up and running with a sample iOS application you can build on as you learn more about Programmable Chat.

## Gather account information

To set up your back-end for Chat, you need five pieces of configuration from your Twilio account:

| Config Value               | Description                                                                                                                                                                                                                       |
| :------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Service Instance SID       | Like a database for your Chat data - [generate one in the console here](https://www.twilio.com/console/chat/services)                                                                                                             |
| Account SID                | Your primary Twilio account identifier - find this [in the console here](https://www.twilio.com/console/chat/getting-started).                                                                                                    |
| API Key                    | Used to authenticate - [generate one here](https://www.twilio.com/console/chat/dev-tools/api-keys).                                                                                                                               |
| API Secret                 | Used to authenticate - [just like the above, you'll get one here](https://www.twilio.com/console/chat/dev-tools/api-keys).                                                                                                        |
| Mobile Push Credential SID | Used to send notifications from Chat to your app - [create one in the console here](https://www.twilio.com/console/chat/credentials) or learn more about [Chat Push Notifications in iOS](/docs/chat/ios/push-notifications-ios). |

## Create a Twilio Function

When you build your application with Twilio Chat, you will need two pieces - the client (this iOS app) and a server that returns access tokens. If you don't want to set up your
own server, you can use [Twilio Functions](/docs/serverless/functions-assets/functions) to create this part of your solution.

Functions are a way to
run your Node.js code in Twilio's environment. You can create new functions on the Twilio Console's [Manage Functions Page](https://www.twilio.com/console/runtime/functions/manage).

You will need to choose the "Programmable Chat Access Token" template:

![New function template selection with Programmable Chat Token highlighted.](https://docs-resources.prod.twilio.com/22fb4a04933c11a3354c21d1d2446854ec22552bb0a46814386c21b3a0993616.png)

Select the Programmable Chat Token template and click Create on the above dialog box, and then fill in the account information you gathered above on the next screen.

![Form to configure programmable chat token with fields for app name, service SID, API key, API secret, and push credential.](https://docs-resources.prod.twilio.com/ab14d9b202ee478e785b99a22982741a961098212c8b2f95f0167ec14391b709.png)

After you do that, the Function will appear, and you can read through it. Save it, and it will immediately be published at the URL provided - go ahead and put that URL into a web browser, and you should see a token being returned from your Function. If you are getting an error, check to make sure that all of your account information is properly defined.

Want to learn more about the code in the Function template, or want to write your own server code? Checkout the [Twilio Chat Identity Guide](/docs/chat/identity) for the underlying concepts.

Now that the Twilio Function is set up, let's get the starter iOS app up and running.

> \[!CAUTION]
>
> **NOTE:** You should not use Twilio Functions to generate access tokens for your app in production. Each function has a publicly accessible URL which a malicious actor could use to obtain tokens for your app and abuse them.
>
> [Read more about access tokens here](/docs/chat/identity) to learn how to generate access tokens in your own C#, Java, Node.js, PHP, Python, or Ruby application.

## Download and explore the mobile app

To get going quickly, there are starter apps built as stand-alone Xcode
projects written in both Swift and Objective-C. Download one of them now:

* [Download for Swift](https://github.com/TwilioDevEd/chat-quickstart-swift/archive/master.zip)
* [Download for Objective-C](https://github.com/TwilioDevEd/chat-quickstart-objc/archive/master.zip)

Both applications are built using the [Cocoapods](https://cocoapods.org/) package
manager and are available on GitHub ([Objective-C](https://github.com/TwilioDevEd/chat-quickstart-objc),
[Swift](https://github.com/TwilioDevEd/chat-quickstart-swift)). With
Cocoapods installed, download and unzip your preferred application. Go to the
application's directory in the Terminal, and install dependencies with:

```bash
pod install
```

This will generate a new file called `ChatQuickstart.xcworkspace`, as with all
Cocoapods projects. Open this file from now on to use the project:

```bash
open ChatQuickstart.xcworkspace
```

You will need to go into `ViewController.m` or `ChatConstants.swift` and modify the URL for your
Twilio Function there - each Twilio user will have a different domain to use for
their Twilio Functions.

Objective-C:

```objectivec title="Set the token URL in ViewController.m"
const NSString* kTokenURL =  @"https://YOUR_DOMAIN_HERE.twil.io/chat-token";
```

Swift:

```swift title="Set the token URL in ChatConstants.swift"
let TOKEN_URL = "https://YOUR_TWILIO_FUNCTION_DOMAIN_HERE.twil.io/chat-token"
```

Start sending yourself a few messages - they should start appearing in a
`UITableView` in the starter app.

## Next steps

From here, you can start building your own application. To integrate the iOS SDK into your existing project, see the [iOS SDK download and install guide](/docs/chat/sdk-download-install). To learn how Programmable Chat works, see the [user identity guide](/docs/chat/identity), which explains the relationship between the mobile app and the server.

[Next: Managing User Identity and Access Tokens »](/docs/chat/identity)
