Is Swift ready for making SDK yet?

due to Swift (currently) not binary compatibility, almost all commercial SDK or iOS frameworks, especially closed source ones, are made by Objective-C.
Swift 5 is going to bring binary compatibility, but how long will it take to come default on Xcode? (last time Swift 4.2 took 7 months).
Should we create new iOS frameworks with Swift yet?
Can anyone or any core team member address my concern?

It’s totally possible to write and ship a closed source SDK in Swift today, you just need to make sure that you provide a version of your library compiled with every compiler version you want to support (e.g. the one that comes with Xcode 9.4 and Xcode 10)


Unless I am forced I would fight tooth and nail to either get source code access or an SDK built in Objective-C that can be safely shoppers as a binary only one. I do not think it was a wise choice for the developer of the binary only SDK to choose an SDK path that effectively ties down the customers of the SDK to the update schedule and internal practices of the library provers because of internal choice by the library developers to jump on a new trend. Sorry, not trying to be offensive to you or anyone else, but customers first.



Ya, you can use Swift to create new iOS frameworks. The Facebook Swift SDK is an example that using Swift to create a SDK.

1 Like

You have source code access in that case. Having your own internal or public CocoaPod pod is I think a decently understood science at this point, but if you need to distribute a binary only SDK, switching to Swift before the runtime is shipped with the OS and the ABI is stable is premature and a bit anti-consumer.

There are two prerequisites for a Swift SDK (without requiring you and your clients to use identical Swift versions, as described by other replies):

  1. ABI stability. This allows your SDK's compiled code to work with different versions of the Swift runtime.
  2. Module stability. This allows your SDK's interface to be understood by different versions of the Swift compiler.

Swift 5 will provide ABI stability. Module stability may not be done for Swift 5; it has previously been described as a "stretch goal" there.

Terms of Service

Privacy Policy

Cookie Policy