While Apple provides mix-and-match between the 2 languages, it is not always possible that code can always be used between the 2.

I have a framework written in Swift, and the method is as such:

class func findAll(fetchLimit: Int? = nil) {...}

It turned out this is not possible to be used in Objective-C.

When I looked under the auto-generated swift umbrella header (MyModule-Swift.h), this method will be omitted.

This is because of the Optional Int. It is a feature of Swift, and not supported by Objective-C!

Just something this simpler and Swift code can’t be used.




Back to Home