Getting started

Requirements

The Newzulu Platform SDK for iOS has the following requirements:

  • Swift 3.0
  • iOS 8.0 or later
  • Xcode 8.2

Downloading the SDK

Integrating with Xcode

  1. Copy the Newzulu directory in your project.
  2. On your application targets’ “General” settings tab, in the “Linked Frameworks and Libraries” section, drag and drop NewzuluCore.framework and NewzuluPlatform.framework from the Newzulu/Build/iOS folder.
  3. On your application targets’ “Build Phases” settings tab, click the “+” icon and choose “New Run Script Phase”. Add the following contents to the script area below the shell:

sh "${SRCROOT}/Newzulu/Scripts/copy-frameworks"

and add the paths to the frameworks under “Input Files”:

$(SRCROOT)/Newzulu/Build/iOS/NewzuluCore.framework $(SRCROOT)/Newzulu/Build/iOS/NewzuluPlatform.framework

This script works around an App Store submission bug triggered by universal binaries and ensures that necessary bitcode-related files and dSYMs are copied when archiving.

Using the SDK

Get your server information

The first step is to get your Newzulu Platform server information.

You'll need:

  • The server region you want to use: It can be North America (mediafactory.fm), Europe (eu.mediafactory.fm) or Australia (au.mediafactory.fm).
  • The vhost of your project. You can find it easily looking at your dashboard url: https://eu.mediafactory.fm/dashboard?vid=98 means your vhost is 98.

Please contact us if you're having difficulties finding those information.

Create the PlatformClient

The SDK is easy to use: you only have one single object that deals with all your queries: PlatformClient.

This object should be instantiated only once per connection. Here's how to create it:

import NewzuluPlatform

let domain: Domain = .europe // Replace with your domain
let vhost: Int = 98          // Replace with your vhost
let platformClient = PlatformClient(domain: domain, vhost: vhost)

Replace:

  • domain with the actual domain you want to use (.northAmerica, .europe or .australia)
  • vhost with your vhost.

That's it, you are now ready to access Newzulu Platform.

Next steps