{"id":273348,"date":"2025-09-03T04:46:25","date_gmt":"2025-09-03T04:46:25","guid":{"rendered":"https:\/\/www.revechat.com\/?post_type=help-center&#038;p=273348"},"modified":"2026-04-29T06:47:00","modified_gmt":"2026-04-29T06:47:00","slug":"native-ios-sdk","status":"publish","type":"help-center","link":"https:\/\/www.revechat.com\/help-center\/native-ios-sdk\/","title":{"rendered":"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. This documentation shows you how to embed REVE Chat iOS SDK ( <strong>latest version 3.0.2.10<\/strong>) in an iOS application and get started in a few minutes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Minimum Requirements<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Xcode 7 or above<\/li>\n\n\n\n<li>iOS 8 or above<\/li>\n<\/ol>\n\n\n\n<p><strong><em>Installation:<\/em><\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/cocoapods.org\/\" target=\"_blank\" rel=\"noopener\">CocoaPods<\/a> (recommended)<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\"># For latest release in cocoapods\nuncomment the line  use_frameworks!\npod &#039;ReveChatSDK&#039;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">iOS SDK integration process<\/h2>\n\n\n\n<p>To integrate iOS SDK with your iOS mobile app, please follow the below mentioned steps:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">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 <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\"><strong>NSPhotoLibraryUsageDescription<\/strong><\/mark> and <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">NSCameraUsageDescription<\/mark><\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-javascript\">\/* You can do this by adding the following lines in your plist source code *\/\n\/* 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\">Import REVE Chat headers<\/h3>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-javascript\">* Objective c\n#import &lt; ReveChatSDK\/ReveChatSDK.h&gt;\n* swift\nimport ReveChatSDK<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Setup Account ID<\/h3>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-javascript\">* 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\">Initiate REVE Chat<\/h3>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-javascript\">* 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\">Pass login parameter while initiate ReveChatSDK<\/h3>\n\n\n\n<p>If you don&#8217;t want to show the pre-chat form when the visitor is logged in, then pass the info bellow:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-javascript\">\/\/ Some code\n* Obj c\n[[ReveChatManager sharedManager]\n                 initiateReveChatWith:&lt;visitor name&gt;\n                 visitorEmail:&lt;visitor email&gt;\n                 visitorMobile:&lt;visitor mobile&gt;\n                 loginState: LOGGED_IN\n                 onNavigationViewController:&lt;UINavigationController on which you want it to load&gt;];\n\n\n* Swift\nlet reveChatManager = ReveChatManager()\n            reveChatManager.initiateReveChat(with: &lt;visitor name&gt;,\n                                             visitorEmail:&lt;visitor email&gt;,\n                                             visitorMobile: &lt;visitor mobile&gt;,\n                                             loginState: LOGGED_IN,\n                                             onNavigationViewController: &lt;UINavigationController on which you want it to load&gt;)<\/code><\/pre>\n\n\n\n<p>If you want to show the pre-chat form when the visitor is logged in, then pass the info bellow:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-javascript\">\/\/ Some code\n* Obj c\n[[ReveChatManager sharedManager]\n                 initiateReveChatWith:&lt;visitor name&gt;\n                 visitorEmail:&lt;visitor email&gt;\n                 visitorMobile:&lt;visitor mobile&gt;\n                 loginState: LOGGED_OUT\n                 onNavigationViewController:&lt;UINavigationController on which you want it to load&gt;];\n\n\n* Swift\nlet reveChatManager = ReveChatManager()\n            reveChatManager.initiateReveChat(with: &lt;visitor name&gt;,\n                                             visitorEmail:&lt;visitor email&gt;,\n                                             visitorMobile: &lt;visitor mobile&gt;,\n                                             loginState: LOGGED_OUT,\n                                            onNavigationViewController: &lt;UINavigationController on which you want it to load&gt;)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">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-javascript\">* 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];\nself.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\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: {\nself.endBackgroundUpdateTask()\n})\n\nfunc endBackgroundUpdateTask() {\nUIApplication.shared.endBackgroundTask(self.backgroundUpdateTask)\nself.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-javascript\">* 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 Queries while Integrating)<\/h2>\n\n\n\n<p><strong><em>I am facing the following error in console<\/em><\/strong><\/p>\n\n\n\n<p><em>ld<\/em>: library not found for -lAFNetworking<br><em>Reason<\/em> : in your pod file use_frameworks! line is commented.<br><em>Solution<\/em> : Uncomment use_frameworks! line and build again<\/p>\n\n\n\n<p><strong><em>Getting Crash when initiating REVE Chat SDK<\/em><\/strong><\/p>\n\n\n\n<p><em>Reason<\/em> : the pod has been updated on the cocoa pods<br><em>solution<\/em> : run \u2018pod update\u2018 in the terminal on your project path<\/p>\n\n\n\n<p><em><strong>Git Link<\/strong><\/em>: <a href=\"https:\/\/github.com\/revechatofficial\/iOSREVEChatSDKTest\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/revechatofficial\/iOSREVEChatSDKTest<\/a><\/p>\n\n\n\n<p><\/p>\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. This documentation shows you how to embed REVE Chat iOS SDK ( latest version 3.0.2.10) in an iOS application and get started in a few minutes. [&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-273348","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\/273348","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":3,"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/help-center\/273348\/revisions"}],"predecessor-version":[{"id":302898,"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/help-center\/273348\/revisions\/302898"}],"wp:attachment":[{"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/media?parent=273348"}],"wp:term":[{"taxonomy":"help_center_type","embeddable":true,"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/help_center_type?post=273348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}