{"id":4382,"date":"2021-11-18T15:25:55","date_gmt":"2021-11-18T07:25:55","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4382"},"modified":"2025-02-21T18:19:52","modified_gmt":"2025-02-21T10:19:52","slug":"custom-signalling","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/ios-toolkit\/custom-signalling\/","title":{"rendered":"Custom Signalling: iOS SDK &#8211; Video API"},"content":{"rendered":"\n<p>The <code>EnxRoom.sendUserData()<\/code> method allows you to send customized data adhering to a structure not bound by the portal message structure, to one or more users connected in a session. This allows your application to send not just messages but also structured instructions, polls, or any data that requires a customized data structure as per your business requirement.<\/p>\n\n\n\n<p><strong>Class:<\/strong> EnxRoom<\/p>\n\n\n\n<p><strong>Method:&nbsp;<\/strong><code>-(void)sendUserData:(NSDictionary *)Message isBroadCast:(BOOL)broadcast recipientIDs:(NSArray *)clientIds;<\/code><\/p>\n\n\n\n<p><strong>Parameters<\/strong>:<\/p>\n\n\n\n<ul><li><code>Message&nbsp;<\/code>\u2013 Dictionary containing custom keys. This object is passed to the Recipients without any structure enforcement. Be advised to define keys effectively for signaling needs.<\/li><li><code>isBroadCast&nbsp;<\/code>\u2013 BOOL. Set to&nbsp;<em>true&nbsp;<\/em>for Public Broadcast and <em>false&nbsp;<\/em>for signaling to one or more recipients.<\/li><li><code>recipientIDs<\/code>&nbsp;\u2013 Array of Client IDs of recipients of the message when not broadcasting.<\/li><\/ul>\n\n\n\n<p><strong>Delegate Method<\/strong>:&nbsp;<\/p>\n\n\n\n<ul><li><code style=\"background-color: rgb(255, 255, 255);\">- room:didUserDataReceived:<\/code> \u2013 Receives signaling in JSONObject. Available from iOS SDk v1.5.3 onwards.<\/li><\/ul>\n\n\n\n<p><strong>Message Dictionary Sample<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ Example: You can put important information with custom keys\n\/\/ You may define the JSONObject as per your business needs\n\nNSDictionary* message = @{\n    \"sender\": \"Sender's Name\",\n    \"message\": \"Message body\",\n    \"custom_key\": \"Data\"\n}<\/pre>\n\n\n\n<p><strong>To send &amp; receive Custom Signaling<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">NSArray *clientArray = [NSArray arrayWithObjects:@\"xxx\",@\"xxx\", nil]\n\n\/\/ Signaling to one or selected Recipients\n[room sendUserData: message broadCast:false recipientIDs:clientArray]; \n\n\/\/ Users receive Signal through Callback \n\/\/ Available till v1.5.2. Deprecated in v1.5.3\n- (void)room:(EnxRoom *)room didReceiveChatDataAtRoom:(NSArray *)data {\n    \/\/ data contains incoming message\n}\n\n\/\/ Users receive Signal through Callback \n\/\/ Available from v1.5.3.\n- (void)room:(EnxRoom *)room didUserDataReceived:(NSArray *)data {\n    \/\/ data contains incoming message\n}<\/pre>\n\n\n\n<p><strong>Error Codes \/ Exceptions<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Code<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>5127<\/td><td>Exceeding maximum allowed data transfer rate of 100Kb.<\/td><\/tr><\/tbody><\/table><\/figure>\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\">\n<p>\u2190 <a href=\"..\/chat\/\">Send Message<\/a><\/p>\n<\/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=\"..\/file-share\/\">File Sharing<\/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>The EnxRoom.sendUserData() method allows you to send customized data adhering to a structure not bound by the portal message structure, to one or more users connected in a session. This allows your application to send not just messages but also structured instructions, polls, or any data that requires a customized data structure as per your business requirement. Class: EnxRoom Method:&nbsp;-(void)sendUserData:(NSDictionary *)Message isBroadCast:(BOOL)broadcast recipientIDs:(NSArray *)clientIds; Parameters: Message&nbsp;\u2013 Dictionary containing custom keys.&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3732,"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":"The EnxRoom.sendUserData() method allows you to send customized data adhering to a structure not bound by the portal message structure, to one or more users connected in a session. This allows your application to send not just messages but also structured instructions, polls, or any data that requires a customized data structure as per your&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4382"}],"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=4382"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4382\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3732"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=4382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}