Product Updates

Introducing the Native Swift SDK for PubNub

2 min read David Lin on Oct 21, 2019

In our quest to deliver a world-class developer experience, we’re pleased to introduce our new native PubNub Swift SDK.

While developers have been able to use the PubNub Objective-C SDK within a Swift application, the developer experience wasn’t where we wanted it to be. The native Swift SDK provides Swift developers a simplified and more streamlined experience to effectively develop their Swift application using PubNub with common best practice architecture patterns. This also allows developers to easily understand how to take advantage of PubNub’s features with predictable usage patterns that are familiar amongst Swift developers.

Solving Developer Problems

Apple has announced that Swift will be the new major language when writing applications for MacOS, iOS, TvOS and WatchOS, and upcoming new features for Swift may not be supported in Objective-C. For developers who have been using the Objective-C framework to code in Swift, this is clearly a problem.

In addition, Objective-C and Swift are not mutually intelligible and as you might expect, using an Objective-C library within Swift feels unnatural. Lastly, newer Swift developers want to follow patterns they’ve learned or can easily look up without requiring a depth of knowledge related to Objective-C and the nuances on how to make the two play nice.

A Better Developer Experience

Developers using the native Swift SDK can now quickly and easily onboard their application using PubNub without an intimate knowledge of Objective-C. There’s a number of ways this will create a better developer experience for you and your team:

  • Know that your application is working correctly using common patterns within the native Swift SDK.
  • Easily troubleshoot any issues that arise in your applications built with PubNub by using common best practice patterns instead of having to formulate your own custom solution.
  • Get up and running as quickly as possible and with as little problems as possible knowing that you can write your applications in Swift and maintain trust in the PubNub infrastructure you already know, and love.

And let’s not forget about being able to work with PubNub team members to build and maintain the perfect application. When working with PubNub, you’ll have access to our Solution Architects who can help to define and build your infrastructure while suggesting the common patterns that standard Swift applications already follow. If you need support, our Support Engineers will be able to help you achieve expected outcomes for applications built with the Swift SDK so that debugging and assisting any upcoming issues will be fairly clear.