From f65acff829c2a88c2e62faa2dd535a383607436c Mon Sep 17 00:00:00 2001 From: Jason Praful Date: Fri, 5 Sep 2025 16:27:41 +0100 Subject: [PATCH 1/3] add swift installation instructions --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index c42b50a7..6d0fb62b 100644 --- a/README.md +++ b/README.md @@ -365,6 +365,26 @@ See [How to manually link IOS Intercom SDK](docs/IOS-MANUAL-LINKING.md) } ``` +**Swift Alternative:** + +If you're using Swift, update your `AppDelegate.swift`: + +- Add the import at the top: + +```Swift +import intercom_react_native +``` + +- Inside `didFinishLaunchingWithOptions` before `return super.application(...)`: + +```Swift + // ... + + IntercomModule.initialize("ios_sdk-YOUR_IOS_API_KEY", withAppId: "YOUR_APP_ID") // <-- Add this (Remember to replace with your API keys) + + return super.application(application, didFinishLaunchingWithOptions: launchOptions) +``` + #### iOS: Permissions Add this permission to your `Info.plist` From f87ed6b25c809abd5e2897ec417b472c00f48616 Mon Sep 17 00:00:00 2001 From: Jason Praful Date: Fri, 5 Sep 2025 16:34:13 +0100 Subject: [PATCH 2/3] update --- README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6d0fb62b..d66b8047 100644 --- a/README.md +++ b/README.md @@ -372,18 +372,19 @@ If you're using Swift, update your `AppDelegate.swift`: - Add the import at the top: ```Swift -import intercom_react_native +import Intercom ``` -- Inside `didFinishLaunchingWithOptions` before `return super.application(...)`: +- Inside `didFinishLaunchingWithOptions` before `return true`: ```Swift - // ... - - IntercomModule.initialize("ios_sdk-YOUR_IOS_API_KEY", withAppId: "YOUR_APP_ID") // <-- Add this (Remember to replace with your API keys) - - return super.application(application, didFinishLaunchingWithOptions: launchOptions) -``` +func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + .... + Intercom.setApiKey("", forAppId: "") + .... +} + + ``` #### iOS: Permissions From 6a3e5ea21db85cf81b09934d89ece7caefff61f1 Mon Sep 17 00:00:00 2001 From: Jason Praful Date: Fri, 5 Sep 2025 16:58:34 +0100 Subject: [PATCH 3/3] change import --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d66b8047..7a80c73d 100644 --- a/README.md +++ b/README.md @@ -372,7 +372,7 @@ If you're using Swift, update your `AppDelegate.swift`: - Add the import at the top: ```Swift -import Intercom +import intercom_react_native ``` - Inside `didFinishLaunchingWithOptions` before `return true`: