{"id":5745,"date":"2022-02-04T16:42:31","date_gmt":"2022-02-04T08:42:31","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=5745"},"modified":"2025-04-09T15:41:15","modified_gmt":"2025-04-09T07:41:15","slug":"how-to-use","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/react-native-toolkit\/how-to-use\/","title":{"rendered":"How to use React Native SDK?"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<div class=\"wp-block-buttons\">\n<div class=\"wp-block-button is-style-fill\"><a class=\"wp-block-button__link\" href=\"https:\/\/www.npmjs.com\/package\/sfm-rtc-react-native\" target=\"_blank\" rel=\"noreferrer noopener\">Install through NPM<\/a><\/div>\n<\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>After installation completes successfully, Import&nbsp;<code>enx-rtc-react-native<\/code>&nbsp;in your class where you want to access the portal Capabilities. <\/p>\n\n\n\n<ul><li><strong>Step 1<\/strong> &#8211; Open terminal<\/li><li><strong>Step 2<\/strong> &#8211; Go to your React Native project directory<\/li><li><strong>Step-3<\/strong> &#8211; Run Command <code>npm install <code>sfm-rtc-react-native<\/code> --save<\/code><\/li><li><strong>Step 4<\/strong> &#8211; Run Command to link <code>react-native link <code>sfm-rtc-react-native<\/code><\/code> <\/li><\/ul>\n\n\n\n<p><em>For example:<\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import {Enx, EnxRoom, EnxStream, EnxPlayerView} from \"sfm-rtc-react-native\";   <\/pre>\n\n\n\n<a name=\"error-exceptions\"><\/a>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Error &amp; Exceptions<\/h2>\n\n\n\n<p>iOS SDK method call might face exception cases and fail. In such cases a JSON is returned through Callback. Example of JSON Object given below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{\n\t\"errorCode\": Number,\n\t\"msg\": \"String\",\n\t\"desc\": \"String\"\n}<\/pre>\n\n\n\n<ul><li><code>errorCode<\/code>\u2013 Number. Error Code.<\/li><li><code>msg<\/code>&nbsp;\u2013 String. Error Message.<\/li><li><code>desc<\/code>&nbsp;\u2013 String. Optional. Descriptive explanation of the error.<\/li><\/ul>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\"><\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p class=\"has-text-align-center\"><a href=\"..\/\">Index<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p class=\"has-text-align-right\"><a href=\"..\/get-devices\/\">Get Media Device Access<\/a> \u2192<a href=\"\/developer\/how-to-use\/\"><\/a><\/p>\n<\/div>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>After installation completes successfully, Import&nbsp;enx-rtc-react-native&nbsp;in your class where you want to access the portal Capabilities. Step 1 &#8211; Open terminal Step 2 &#8211; Go to your React Native project directory Step-3 &#8211; Run Command npm install sfm-rtc-react-native &#8211;save Step 4 &#8211; Run Command to link react-native link sfm-rtc-react-native For example: import {Enx, EnxRoom, EnxStream, EnxPlayerView} from &#8220;sfm-rtc-react-native&#8221;; Error &amp; Exceptions iOS SDK method call might face exception cases and fail.&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3747,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ub_ctt_via":""},"featured_image_src":null,"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"featured":false,"featured-large":false},"uagb_author_info":{"display_name":"vcxdevwpadmin","author_link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/author\/vcxdevwpadmin\/"},"uagb_comment_info":0,"uagb_excerpt":"After installation completes successfully, Import&nbsp;enx-rtc-react-native&nbsp;in your class where you want to access the portal Capabilities. Step 1 &#8211; Open terminal Step 2 &#8211; Go to your React Native project directory Step-3 &#8211; Run Command npm install sfm-rtc-react-native --save Step 4 &#8211; Run Command to link react-native link sfm-rtc-react-native For example: import {Enx, EnxRoom, EnxStream, EnxPlayerView}&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/5745"}],"collection":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/comments?post=5745"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/5745\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3747"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=5745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}