title: Method cannot be marked @objc because its result type cannot be represented in Objective-C
body: <p>am exposing swift API's in Objective-C and the Objective-C runtime.</p>
  
  <p>When i add "@objc" before the function throws an error "Method cannot be marked @objc because its result type cannot be represented in Objective-C"</p>
  
  <p>My code is here</p>
  
  <pre><code>@objc public static func logIn(_ userId: String) -&gt; User? { }
  </code></pre>
  
  <p>User is optional struct. how to solve this.</p>