I'm not an iOS developer but aren't Swift and Objective C files interchangeable?
I'm not an iOS developer but aren't Swift and Objective C files interchangeable?
There are multiple Swift constructs that cannot be exposed to Objective-C, such as enums with associated values, structs, and global variables and functions. So if you implement your API in Swift, you have to be careful if you want it to be usable from Objective-C.
Another problem with writing your API in Swift is that the Swift ABI isn't stable yet. It changes between compiler versions. This means that your API (if written in Swift) must be compiled with the same Swift compiler as the user's code. If you want to distribute your API as a binary-only library, you'll have to release a new version every time Apple releases a new version of Xcode, and your user will have to be sure to get the correct version of your library for their version of Xcode.
Sort of doable with generics, but only from Swift code:
<ViewController: UIViewController where ViewController: UIPickerViewDataSource>