Meet the Diffusion Apple API

17 Jun 16

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"       
                                  type:PTDiffusionTopicType_SingleValue 
                               content:initialValue 
                     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.

free-demo


The Diffusion Intelligent Data Platform manages, optimizes, and integrates data among devices, systems, and applications. Push Technology pioneered and is the sole provider of real-time delta-data streaming™ technology that powers mission-critical business applications worldwide. Leading brands use Push Technology to fuel revenue growth, customer engagement, and business operations. The products, Diffusion® and Diffusion Cloud™, are available on-premise, in-the-cloud, or in a hybrid configuration, to fit the specific business and infrastructure requirements of the applications operating in today’s mobile obsessed, everything connected world. Learn how Push Technology can reduce infrastructure costs, and increase speed, efficiency, and reliability, of your web, mobile, and IoT application.

LEARN MORE: Case Studies and Developer Resources