1

Trying to mix Swift code with Objective C, I noticed that Swift functions with optional parameters don't get exported in the umbrella header file (product-Swift.h) and so cannot be used inside ObjC code.

This for example:

func aFunc(number:Int?) {...}

does not show up in the umbrella header. But this function does, because the parameter is not optional:

func aFunc(number:Int) {...}

Why?

johnnyMac
  • 381
  • 2
  • 14
  • Related: http://stackoverflow.com/questions/24221407/can-a-swift-optional-int-int-be-exposed-to-objective-c-via-bridging – rmaddy Mar 08 '17 at 23:09

0 Answers0