title: How to call swift native function from react native?
body: <p>I have a swift class, which i am exposing to react-native, inside that i have a function that is also exposed to react-native. Now when react native calls that function it does a lot of this internally, but after some point of time it returns an object.</p>
  
  <p>Now it will call a specific function that will get the object. I cannot change the parameter to that function. But i have another function, to which i want to return to react native. How can i do it.</p>
  
  <pre><code>  func AckCallback(response:APIResponse) -&gt; Void
    {
      print(response)  
  
    }
  </code></pre>
  
  <p>for this function I cannot change the paremeter, becaused it had been used a lot of places, But I want to return that response from this function to react-native. If anybody know this issue, please let me know.</p>
  
  <pre><code>  @objc func sendEvent(_ response: APIResponse, callback: (NSObject) -&gt; ()) 
  -&gt; Void {
  
      callback( [[
        "responseCode" : "Working",
        ]] as NSObject)
  
    }
  </code></pre>
  
  <p>I just want to know how to use this sendEvent inside the AckCallback, or is there any other way to send that **</p>
  
  <blockquote>
    <p>response: APIResponse</p>
  </blockquote>
  
  <p>**</p>
  
  <p>to react-native.</p>