Insights

We Now Officially Support Swift and Mac OS X

2 min read PubNub 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

Top Trends to Engage Your App Users
InsightsSep 27, 20224 min read

Top Trends to Engage Your App Users

Take a look at the top trends that are the most effective in attracting customers and reducing churn, and how you can incorporate...

PubNub Staff

PubNub Staff

Comparing Game Engines: Unity vs Unreal vs the Rest
Real-Time Gaming BlogSep 21, 20225 min read

Comparing Game Engines: Unity vs Unreal vs the Rest

Comparing the major game engines: Unity vs Unreal Engine vs Corona SDK vs GameMaker Studio, including the benefits and cons of...

PubNub Staff

PubNub Staff

Python Socket Programming: Client, Server and Peer Libraries
BuildSep 21, 20226 min read

Python Socket Programming: Client, Server and Peer Libraries

Sockets (aka socket programming) enable programs to send and receive data, bi-directionally, at any given moment. This tutorial...

PubNub Staff

PubNub Staff