Insights

We Now Officially Support Swift and Mac OS X

2 min readPubNub Staff on Nov 20, 2015
Try PubNub Today

Free up to 1MM monthly messages. No credit card required.

Subscribe to our newsletter

By submitting this form, you are agreeing to our Terms and Conditions and Privacy Policy.

The hyper-intelligent pan-dimensional mice who write our SDKs just meeped me (a meep is the telepathic equivalent of a tweet) to remind you that our iOS SDK now supports Swift. Technically the SDK has...

The hyper-intelligent pan-dimensional mice who write our SDKs just meeped me (a meep is the telepathic equivalent of a tweet) to remind you that our iOS SDK now supports Swift. Technically the SDK has worked with Swift for a while but we didn’t blog about it … until now. If you use CocoaPods (and really, why wouldn’t you) then you can install the PubNub SDK in three easy steps.

Step one: Add the module to your Podfile and install it with pod install.

source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
pod "PubNub", "~> 4.0"

Step Two: Import the module in your code.

import PubNub

Step Three: There is no step three. Just enjoy some Swifty goodness.

Oh, and there’s one more thing.

The PubNub SDK supports now Mac OS X too! Even better, you don’t have to do anything special to get it. Add the same Podfile to your Mac Xcode project and import the module. The SDK will automatically adapt to your target platform.

Technically the SDK has supported Mac for a while, but until now we didn’t have the unit and integration tests written. Since we believe testing leads to high quality software we didn’t want to advertise Mac support until we knew it works properly. Now we know, and knowing is half the battle. (The other half is shooting lasers)

You can read the update Swift docs and install it with Cocoapods. If, for some crazy reason, you can’t use Cocoapods we also provide the complete source on GitHub with a variety of ways to build it. Code on!

Now if you’ll excuse me, I have to go find some pan-dimensional cheese.

More from PubNub

Can Empathy Exist in the Metaverse
News May 16, 20221 min read

Can Empathy Exist in the Metaverse

A roundtable discussion led by PubNub’s COO, Casey Clegg, exploring the topics of what it means to be human in a virtual world.

PubNub Staff

PubNub Staff

How to Advance Telehealth and Virtual Care Technologies
News May 2, 20221 min read

How to Advance Telehealth and Virtual Care Technologies

Dr. Joe Kvedar, Chair of the Board for the American Telemedicine Association, joins our COO, Casey Clegg, to discuss why...

PubNub Staff

PubNub Staff

Another Step Towards Data Security: ISO-27001 Implementation
BuildMay 2, 20221 min read

Another Step Towards Data Security: ISO-27001 Implementation

Today, we are glad to announce that we are currently in the process of implementing ISO-27001 security standards.

PubNub Staff

PubNub Staff