{"id":273523,"date":"2025-09-09T05:34:27","date_gmt":"2025-09-09T05:34:27","guid":{"rendered":"https:\/\/www.revechat.com\/?post_type=help-center&#038;p=273523"},"modified":"2026-04-29T06:46:11","modified_gmt":"2026-04-29T06:46:11","slug":"react-native-ios-sdk","status":"publish","type":"help-center","link":"https:\/\/www.revechat.com\/help-center\/react-native-ios-sdk\/","title":{"rendered":"React Native iOS SDK"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>REVE Chat\u2019s iOS SDK can be seamlessly integrated with your mobile apps and enable your team deliver in-app messaging to your app users for better engagement and customer support.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Getting Started with React Native iOS SDK<\/h2>\n\n\n\n<p>This documentation shows you how to embed REVE Chat iOS SDK in an React Native application and get started in a few minutes. Necessary or minimum requirements:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Xcode 7 or above<\/li>\n\n\n\n<li>iOS 8 or above<\/li>\n\n\n\n<li>React-native environment setup<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">React Native iOS SDK integration process<\/h2>\n\n\n\n<p>To integrate React Native iOS SDK with your iOS mobile app, please follow the below mentioned steps:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step1: Update podfile<\/h3>\n\n\n\n<p>Go to your projects iOS folder. There you have to update podfile as bellow.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Write use_frameworks! at the beginning of your podfile.<\/li>\n\n\n\n<li>Write pod &#8216;ReveChatSDK&#8217; inside your projects target<\/li>\n\n\n\n<li>At the end of your target add the bellow code<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">dynamic_frameworks = [&#039;ReveChatSDK&#039;,&#039;SocketRocket&#039;,&#039;AFNetworking&#039;,&#039;GoogleWebRTC&#039;]\npre_install do |installer|\n  installer.pod_targets.each do |pod|\n    if !dynamic_frameworks.include?(pod.name)\n      puts &quot;Overriding the static_framework? method for #{pod.name}&quot;\n      def pod.static_framework?;\n        true\n      end\n      def pod.build_type;\n        Pod::BuildType.static_library\n      end\n    end\n  end\nending&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Now run pod install in the iOS directory from command line. So, an example of your Podfile would eventually look like bellow.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">require_relative &#039;..\/node_modules\/react-native\/scripts\/react_native_pods&#039;\nrequire_relative &#039;..\/node_modules\/@react-native-community\/cli-platform-ios\/native_modules&#039;\nplatform :ios, min_ios_version_supported\nprepare_react_native_project!\nuse_frameworks!\n\nflipper_config = ENV[&#039;NO_FLIPPER&#039;] == &quot;1&quot; ? FlipperConfiguration.disabled : FlipperConfiguration.enabled\n\ntarget &#039;AwesomeProject2&#039; do\n  config = use_native_modules!\n\n  flags = get_default_flags()\n\n  use_react_native!(\n    :path =&gt; config[:reactNativePath],\n    :hermes_enabled =&gt; flags[:hermes_enabled],\n    :fabric_enabled =&gt; flags[:fabric_enabled],\n    :flipper_configuration =&gt; flipper_config,\n    :app_path =&gt; &quot;#{Pod::Config.instance.installation_root}\/..&quot;\n  )\n  \n  pod &#039;ReveChatSDK&#039;\nend\n\ndynamic_frameworks = [&#039;ReveChatSDK&#039;,&#039;SocketRocket&#039;,&#039;AFNetworking&#039;,&#039;GoogleWebRTC&#039;]\npre_install do |installer|\n  installer.pod_targets.each do |pod|\n    if !dynamic_frameworks.include?(pod.name)\n      puts &quot;Overriding the static_framework? method for #{pod.name}&quot;\n      def pod.static_framework?;\n        true\n      end\n      def pod.build_type;\n        Pod::BuildType.static_library\n      end\n    end\n  end\nend<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step2: Update your plist<\/h3>\n\n\n\n<p>The iOS SDK uses the camera and photo library in iOS.<\/p>\n\n\n\n<p>If your app does not already request permissions for these features, you should update your info.plist file with a usage description for NSPhotoLibraryUsageDescription and NSCameraUsageDescription.<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">\/* You can do this by adding the following lines in your plist source code *\/\n&lt;key&gt;NSPhotoLibraryUsageDescription&lt;\/key&gt;\n&lt;string&gt;&lt;description to use photo library&gt;&lt;\/string&gt;\n&lt;key&gt;NSCameraUsageDescription&lt;\/key&gt;\n&lt;string&gt;&lt;description to use camera&gt;&lt;\/string&gt; \n&lt;key&gt;NSAppTransportSecurity&lt;\/key&gt;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;dict&gt;\n&lt;key&gt;NSAllowsArbitraryLoads&lt;\/key&gt;\n&lt;true\/&gt;&lt;\/dict&gt;\n&lt;key&gt;NSMicrophoneUsageDescription&lt;\/key&gt;\n&lt;string&gt;&lt;Add your description here&gt;&lt;\/string&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step3: Update Appdelegate.h<\/h3>\n\n\n\n<p>You have to add this two function definitions in Appdelegate.h<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">- (void) setInitialViewController;\n- (void) goToReveChatSDK:(NSString *)accountId userName:(NSString *)userName userEmail:(NSString*)userEmail phone:(NSString*)phone;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step4: Update Appdelegate.m<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add #import <code>&lt;strong&gt;&lt;ReveChatSDK\/ReveChatSDK.h&gt;&lt;\/strong&gt;<\/code> at the beginning of your file.<\/li>\n\n\n\n<li>Add implementation of setInitialViewController function<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">- (void) setInitialViewController {\n\n  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];\n  self.window.rootViewController = [[UIViewController alloc] init];\n\n  [self.window makeKeyAndVisible];\n}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add implementation of goToReveChatSDK function<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">- (void) goToReveChatSDK:(NSString *)accountId userName:(NSString *)userName userEmail:(NSString*)userEmail phone:(NSString*)phone {\n  UIViewController* uvc = [[UIViewController alloc]init];\n  uvc.view.backgroundColor = [UIColor whiteColor];\n  \n  UINavigationController* navVC = [[UINavigationController alloc]initWithRootViewController:uvc];\n  [self.window.rootViewController presentViewController:navVC animated:false completion:NULL];\n  [[ReveChatManager sharedManager] setupAccountWith:accountId];\n\n   [[ReveChatManager sharedManager]\n    initiateReveChatWith:userName\n    visitorEmail:userEmail\n    visitorMobile:phone\n    onNavigationViewController:navVC];\n}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Call setInitialViewController from didFinishLaunchingWithOptions function<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n{\n  \n  [self setInitialViewController];\n  \n  return [super application:application didFinishLaunchingWithOptions:launchOptions];\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step5: Create REVEChatSDKModule.h<\/h3>\n\n\n\n<p>Create REVEChatSDKModule.h file and write bellow code:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">#import &lt;React\/RCTBridgeModule.h&gt;\n@interface REVEChatSDKModule : NSObject &lt;RCTBridgeModule&gt;\n\n\n@end<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step6: Create REVEChatSDKModule.m<\/h3>\n\n\n\n<p>Create REVEChatSDKModule.m and write bellow code:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">#import &quot;REVEChatSDKModule.h&quot;\n#import &lt;React\/RCTLog.h&gt;\n#import &quot;AppDelegate.h&quot;\n\n@implementation REVEChatSDKModule\n\nRCT_EXPORT_MODULE();\nRCT_EXPORT_METHOD(startChat:(NSString *)accountId :(NSString *)userName :(NSString*)userEmail :(NSString*)phone)\n{\n RCTLogInfo(@&quot;accountId %@, userName %@, userEmail %@, phone %@&quot;,accountId, userName, userEmail,phone);\n  \n  AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;\n  \n  dispatch_async(dispatch_get_main_queue(), ^{\n    [appDelegate goToReveChatSDK:accountId userName:userName userEmail:userEmail phone:phone];\n  });\n}\n\n@end<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step7: Code for JavaScript<\/h3>\n\n\n\n<p>Add following lines from where you want to start the chat (App.tsx file). In this line <strong>REVEChatSDKModule.startChat(&#8216;account_id&#8217;, &#8216;user_name&#8217;, &#8216;user@email&#8217;, &#8216;user_phone_number&#8217;);<\/strong> change account_id, user_name, user@email and &#8216;user_phone_number&#8217; to your preferred one.<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">import React from &#039;react&#039;;\n\nimport {\n  NativeModules\n} from &#039;react-native&#039;;\n\nconst {REVEChatSDKModule} = NativeModules;\n\n&lt;Button\ntitle=&quot;Chat With Us&quot;\nonPress={() =&gt; {\n   REVEChatSDKModule.startChat(&#039;account_id&#039;, &#039;user_name&#039;, &#039;user@email&#039;, &#039;user_phone_number&#039;); \n}\n} \/&gt;\n\n\nexport default App;<\/code><\/pre>\n\n\n\n<p><strong>Import ReveChat headers<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">* Objective c\n#import &lt; ReveChatSDK\/ReveChatSDK.h&gt;\n* swift\nimport ReveChatSDK<\/code><\/pre>\n\n\n\n<p><strong>Setup Account ID<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">* Objective c\n[[ReveChatManager sharedManager]\nsetupAccountWith:&lt;your account id&gt;];\n* swift\n\/* declare object for reve chat manager class*\/\nlet reveChatManager = ReveChatManager()\nreveChatManager.setupAccount(with: &lt;your account id   as string&gt; )<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step8: Initiate ReveChat<\/h3>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">* Obj c\n[[ReveChatManager sharedManager]\n initiateReveChatWith:&lt;visitor name&gt;\n visitorEmail:&lt;visitor email&gt;\n visitorMobile:&lt;visitor mobile&gt;\n onNavigationViewController:&lt;your navigation\n controller&gt;];\n* Swift\n\/* initiate the class with name, email , mobile and parent controller of the sdk as parameters*\/\nreveChatManager.initiateReveChat(with: &lt;visitor name&gt;,\nvisitorEmail: &lt;visitor email&gt;,\nvisitorMobile: &lt;visitor mobile&gt;,\nonNavigationViewController: &lt;UINavigationController on which you want it to load&gt;)\n*To initiate video call.The audio parameter should be false<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step9: Enable Notification<\/h3>\n\n\n\n<p>You can enable the notification when the app is in background mode. Use the below code:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">* Objective-c\n\/\/ In Scenedelegate.h add the following property:\n@property (nonatomic,assign) UIBackgroundTaskIdentifier backgroundUpdateTask;\n\n\/\/ In Scenedelegate.m add the following function:\n-(void) endBackgroundUpdateTask {\n    [UIApplication.sharedApplication endBackgroundTask:self.backgroundUpdateTask];\n    self.backgroundUpdateTask = UIBackgroundTaskInvalid;\n}\n\n\/\/ In Scenedelegate.m\u2019s willConnectToSession function add the bellow line:\nself.backgroundUpdateTask = UIBackgroundTaskInvalid;\n\n\/\/ In Scenedelegate.m\u2019s sceneDidBecomeActive function add the bellow line:\n[self endBackgroundUpdateTask];\n\n\/\/ In Scenedelegate.m\u2019s sceneWillResignActive function add the bellow line:\nself.backgroundUpdateTask = [UIApplication.sharedApplication beginBackgroundTaskWithExpirationHandler:^{\n        [self endBackgroundUpdateTask];\n}];\n\n\/\/ In Scenedelegate.m\u2019s sceneWillEnterForeground function add the bellow line: \n[UIApplication sharedApplication].applicationIconBadgeNumber = 0;\n\n* Swift \n\nvar backgroundUpdateTask: UIBackgroundTaskIdentifier = UIBackgroundTaskIdentifier(rawValue: 0)\n\nMethod name : \u201csceneDidBecomeActive\u201d or \u201capplicationDidBecomeActive\u201d\nself.endBackgroundUpdateTask()\n\nMethod name \u201csceneWillResignActive\u201d or \u201capplicationWillResignActive\u201d\nself.backgroundUpdateTask = UIApplication.shared.beginBackgroundTask(expirationHandler: {\n                self.endBackgroundUpdateTask()\n            })\n\nfunc endBackgroundUpdateTask() {\n        UIApplication.shared.endBackgroundTask(self.backgroundUpdateTask)\n        self.backgroundUpdateTask = UIBackgroundTaskIdentifier.invalid\n    }\n\n\/\/ In applicationDidBecomeActive function\napplication.applicationIconBadgeNumber = 0<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Additional changes(optional)<\/h3>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">* Objective c\n\/* for title while chatting *\/\n[ReveChatManager sharedManager].title = @&quot;me talking&quot;;\n\/* for theme color while chatting *\/\n[ReveChatManager sharedManager].themeColor = [UIColor blueColor];\n\/* for background color *\/\n[ReveChatManager sharedManager].backgroundColor = [UIColor yellowColor];\n\/* for navigation bar color *\/\n[ReveChatManager sharedManager].navBarColor = [UIColor orangeColor];\n\/* for tint color of navigation bar while chatting *\/\n[ReveChatManager sharedManager].headerTintColor = [UIColor whiteColor];\n\/* for title color while chatting *\/\n[ReveChatManager sharedManager].headerTextColor = [UIColor whiteColor];\n\/* for incoming chat bubble color *\/\n[ReveChatManager sharedManager].incomingBubbleColor = [UIColor blueColor];\n\/* for outgoing chat bubble color *\/\n[ReveChatManager sharedManager].outgoingBubbleColor = [UIColor blueColor];\n* Swift\n\/* for title while chatting *\/\nreveChatManager.setChatTitle(&quot;Lets chat&quot;)\n\/* for theme color while chatting*\/\nreveChatManager.themeColor = UIColor.blue\n\/* for background color*\/\nreveChatManager.backgroundColor = UIColor.yellow\n\/* for navigation bar color*\/\nreveChatManager.navBarColor = UIColor.gray\n\/* for tint color of header *\/\nreveChatManager.headerTintColor = UIColor.red\n\/* for title color while chatting*\/\nreveChatManager.headerTextColor = UIColor.black\n\/* for incoming chat bubble color*\/\nreveChatManager.incomingBubbleColor = UIColor.blue\n\/* for outgoing chat bubble color*\/\nreveChatManager.outgoingBubbleColor = UIColor.yellow<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">FAQs (General issues faced while integrating)<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>I am facing the following error in console<strong><em> ld: library not found for -lAFNetworking Reason:<\/em><\/strong> in your pod file use_frameworks! line is commented. <strong>Solution: Uncomment use_frameworks!<\/strong> line and build again<\/li>\n\n\n\n<li>Getting Crash when initiating revechat sdk reason: the pod has been updated on the cocoa pods <strong>solution<\/strong>: run \u2018<strong>pod update<\/strong>\u2018 in the terminal on your project path<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>REVE Chat\u2019s iOS SDK can be seamlessly integrated with your mobile apps and enable your team deliver in-app messaging to your app users for better engagement and customer support. Getting Started with React Native iOS SDK This documentation shows you how to embed REVE Chat iOS SDK in an React Native application and get started [&hellip;]<\/p>\n","protected":false},"author":36,"featured_media":0,"menu_order":0,"template":"","meta":{"_acf_changed":false,"footnotes":""},"help_center_type":[1868],"class_list":["post-273523","help-center","type-help-center","status-publish","hentry","help_center_type-mobile-sdk"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/help-center\/273523","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/help-center"}],"about":[{"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/types\/help-center"}],"author":[{"embeddable":true,"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/users\/36"}],"version-history":[{"count":2,"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/help-center\/273523\/revisions"}],"predecessor-version":[{"id":302894,"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/help-center\/273523\/revisions\/302894"}],"wp:attachment":[{"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/media?parent=273523"}],"wp:term":[{"taxonomy":"help_center_type","embeddable":true,"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/help_center_type?post=273523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}