Facebook today is announcing the launch of a new software development kit (SDK) for integrating with Facebook services while using the Swift programming language. It’s becoming available on GitHub under an open-source license.
Apple first introduced Swift as a successor to Objective-C in 2014. Developers can use it to build for Apple’s four platforms: iOS, macOS (formerly OS X), tvOS, and watchOS. Since its introduction Swift has become the 22nd most starred project on source code repository hosting site GitHub, and in this year’s Stack Overflow developer survey, Swift was ranked as the second-most-loved programming language, behind only Mozilla’s Rust.
“We believe it is important for us to grow and diversify our developer ecosystem by extending our platform capabilities to Swift app developers on iOS, watchOS, tvOS, and macOS,” Facebook mobile software engineer Nikita Lutsenko wrote in a blog post. The SDK includes components for Facebook Analytics for Apps, the Facebook Graph application programming interface (API), Facebook Login, and Share to Facebook.
This should be a valuable addition for people who are beginning their programming lives with Swift, and there are likely to be more of those people now that Apple is actively pushing Swift education through the Swift Playgrounds app for iPad.
This isn’t the first time Facebook has open-sourced Swift code. The company released an implementation of its mobile app development framework Bolts in Swift earlier this year.