June 17, 2016 Philip Aston

Meet the Diffusion Apple API

Developing for iOS can be a lot of fun and potentially profitable.

Xcode provides a mature IDE that’s simple to use. You can rest easy in the knowledge that the majority of your users will be using the latest version of iOS. For example, on April 18th 2016, 84% of users were using iOS 9. Because of this, you can focus your time on making the best use of new API features and testing for a single version, rather than worrying about backwards compatibility.

iOS devices are popular for both business and personal use. Research has shown that users of Apple devices tend to spend more both on apps and through the apps on their mobile phones or tablets than users of other types of smartphone. So if you want to monetize your application or service, iOS is the place to be.

And Diffusion can be there with you.

Diffusion Apple API

Recently, we replaced our legacy iOS API with the new Apple API. The Apple API can be used to write applications for both iOS and OS X. It is written in Objective-C and is fully compatible with Swift development.

The iOS version of the SDK is provided as both a dynamically linked library for devices running iOS 8 and later. However, if your app needs to support devices running iOS 7 and older, you can use the statically linked library that is also provided in the SDK.

New features

Our Apple API benefits from dedicated development effort. Since the first release of the Apple API, we’ve been adding more and more new features and capabilities.

The latest Diffusion release, we added control capabilities, like the ability to create, update, and manage topics.

For example, here’s how you would create a single value topic with an initial value of ‘Hello World’:

NSData *const data = [@"Hello World" dataUsingEncoding:NSUTF8StringEncoding]; 
PTDiffusionContent *const initialValue = 
         [[PTDiffusionContent alloc] initWithData:data]; 
[session.topicControl addWithTopicPath:@"Example/SingleValue"       
                     completionHandler:^(NSError * _nullable error) 
    if (error) { 
        NSLog(@"Failed to add single value topic. Error: %@", error); 
    } else { 
        NSLog(@"Single value topic created."); 

The Apple API currently supports working with the new JSON and binary topic types through the generic Content API, but in an upcoming release the API will provide data-type specific methods that lower the overhead of data transfer on the wire.

Get started

Download the Diffusion Apple SDK for iOS or OS X now and bring the power of real-time messaging to your Apple applications. If you would like to find out more about Diffusion Cloud, check out our CTO Andy’s Piper’s latest blog or read about all the new features here.


Want to see how easy it is to get started with Diffusion Cloud? Sign up for a free demo here.



Enjoy the rich functionality of Diffusion 6.7 as part of your event-driven application.

Quick Start Guide

Step-by-step guide to getting started.

Diffusion Cloud

SaaS offering that focuses on business.

Diffusion On-Premise

A pub-sub platform for real-time applications.