Skip to content

Commit 5bb54d0

Browse files
authored
add swift installation instructions (#318)
* add swift installation instructions
1 parent a7c2fd4 commit 5bb54d0

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,27 @@ See [How to manually link IOS Intercom SDK](docs/IOS-MANUAL-LINKING.md)
365365
}
366366
```
367367
368+
**Swift Alternative:**
369+
370+
If you're using Swift, update your `AppDelegate.swift`:
371+
372+
- Add the import at the top:
373+
374+
```Swift
375+
import intercom_react_native
376+
```
377+
378+
- Inside `didFinishLaunchingWithOptions` before `return true`:
379+
380+
```Swift
381+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
382+
....
383+
Intercom.setApiKey("<Your iOS API Key>", forAppId: "<Your App ID>")
384+
....
385+
}
386+
387+
```
388+
368389
#### iOS: Permissions
369390

370391
Add this permission to your `Info.plist`

0 commit comments

Comments
 (0)