{"id":273497,"date":"2025-09-08T06:52:58","date_gmt":"2025-09-08T06:52:58","guid":{"rendered":"https:\/\/www.revechat.com\/?post_type=help-center&#038;p=273497"},"modified":"2026-04-29T06:46:47","modified_gmt":"2026-04-29T06:46:47","slug":"flutter-ios-sdk","status":"publish","type":"help-center","link":"https:\/\/www.revechat.com\/help-center\/flutter-ios-sdk\/","title":{"rendered":"Flutter iOS SDK"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>REVE Chat\u2019s Flutter 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 Flutter iOS SDK<\/h2>\n\n\n\n<p>This tutorial shows you how to add Flutter iOS and get started in a few minutes. Necessary or minimum requirements:<\/p>\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>Installation<\/strong>: <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\">Flutter iOS SDK integration process<\/h2>\n\n\n\n<p>To integrate Flutter 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 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\">Update Appdelegate.swift<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Add <strong>import Flutter<\/strong> and <strong>import ReveChatSDK<\/strong> at the beginning of your file<\/li>\n\n\n\n<li>Write bellow code in <strong>didFinishLaunchingWithOptions<\/strong> function<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">\/\/ Some code\nlet flutterVC = FlutterViewController()\nlet navVC = UINavigationController(rootViewController: flutterVC)\nself.window?.rootViewController = navVC\nnavVC.navigationBar.isHidden = true\nlet batteryChannel = FlutterMethodChannel(name: &quot;com.revechat.sdk\/sdkchannel&quot;,\n                                                binaryMessenger: flutterVC.binaryMessenger)\n\nbatteryChannel.setMethodCallHandler({\n          (call: FlutterMethodCall, result: @escaping FlutterResult) -&gt; Void in\n          let reveChatManager = ReveChatManager()\n          reveChatManager.setupAccount(with: &quot;account_number&quot;) \/\/ put your account_number here\n          \n          switch call.method {\n          case &quot;StartREVEChat&quot;:\n              print(&quot;success&quot;)\n              \n              guard let args = call.arguments as? [String:String] else {\n                  print(&quot;failed fetching&quot;)\n                  return\n              }\nlet name = args[&quot;name&quot;]!\n              let email = args[&quot;email&quot;]!\n              let phone = args[&quot;phone&quot;]!\n              \n              reveChatManager.initiateReveChat(with: name,\n                                               visitorEmail: email,\n                                               visitorMobile: phone,\n                                               onNavigationViewController: flutterVC.navigationController)\n              break\n          default:\n              break\n          }          \n      })<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Update main.dart<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Write startActivity function as like bellow<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">Future&lt;void&gt; _startActivity() async {\n    try {\n      const platform = MethodChannel(&#039;com.revechat.sdk\/sdkchannel&#039;);\n      \n      final String result = await platform.invokeMethod(&#039;StartREVEChat&#039;,{\n        &#039;email&#039;:&#039;netzaintest@gmail.com&#039;, \/\/ put your email here\n        &#039;name&#039;:&#039;netzaintest&#039;, \/\/put your name here\n        &#039;phone&#039;:&#039;01409404444&#039;, \/\/put your mobile number her\n      });\n\n      debugPrint(&#039;Result: $result &#039;);\n    } on PlatformException catch (e) {\n      debugPrint(&quot;Error: &#039;${e.message}&#039;.&quot;);\n    }\n}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Call this start activity from a button action<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">floatingActionButton: FloatingActionButton(\n        onPressed: _startActivity,\n        tooltip: &#039;Increment&#039;,\n        child: const Icon(Icons.add),\n )<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Import ReveChat headers<\/h3>\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><em>Setup Account ID<\/em><\/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<p><strong><em>Initiate ReveChat<\/em><\/strong><\/p>\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<p><strong><em>Enable Notification<\/em><\/strong><\/p>\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-\">var backgroundUpdateTask: UIBackgroundTaskIdentifier = UIBackgroundTaskIdentifier(rawValue: 0)\n\n\n\nMethod name : \u201csceneDidBecomeActive\u201d or \u201capplicationDidBecomeActive\u201d\nself.endBackgroundUpdateTask()\n\n\n\nMethod name \u201csceneWillResignActive\u201d or \u201capplicationWillResignActive\u201d\nself.backgroundUpdateTask = UIApplication.shared.beginBackgroundTask(expirationHandler: {\n                self.endBackgroundUpdateTask()\n            })\n\n\nfunc endBackgroundUpdateTask() {\n        UIApplication.shared.endBackgroundTask(self.backgroundUpdateTask)\n        self.backgroundUpdateTask = UIBackgroundTaskIdentifier.invalid\n    }<\/code><\/pre>\n\n\n\n<p><strong><em>Additional changes(optional)<\/em><\/strong><\/p>\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. <em><strong>Solution: Uncomment use_frameworks!<\/strong><\/em> 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><em>solution<\/em><\/strong>: run \u2018<strong><em>pod update<\/em><\/strong>\u2018 in the terminal on your project path<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>REVE Chat\u2019s Flutter 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 Flutter iOS SDK This tutorial shows you how to add Flutter iOS and get started in a few minutes. Necessary or minimum [&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-273497","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\/273497","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\/273497\/revisions"}],"predecessor-version":[{"id":302896,"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/help-center\/273497\/revisions\/302896"}],"wp:attachment":[{"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/media?parent=273497"}],"wp:term":[{"taxonomy":"help_center_type","embeddable":true,"href":"https:\/\/www.revechat.com\/wp-json\/wp\/v2\/help_center_type?post=273497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}