How to install GoCoder SDK for iOS

This article describes how to install Wowza GoCoder™ SDK for iOS.

Contents


Minimum requirements
Add the Wowza GoCoder SDK framework to your project
About the SDK sample apps

Minimum requirements


  • iOS SDK 8.01 or later
  • Xcode 7 or later

Note: Running and debugging apps that use the GoCoder SDK using a device emulator isn't recommended due to the wide variance in functionality between the software-based audio and video codecs used by the emulator and the hardware-based codecs installed on most devices.

Download the Wowza GoCoder SDK for iOS. The SDK is distributed as a .zip file that contains the following files and folders:

WowzaGoCoderSDK.framework

The dynamic framework version of the GoCoder SDK library. This is the preferred method of usage because it supports both Objective-C and Swift-based applications.

wowzagocoder_static_lib

This folder contains a static library version of the GoCoder SDK library for Objective-C applications.

docs

The SDK API reference documentation in HTML format. Open index.html in this folder to view the documentation.

sample-apps

A set of Xcode projects that demonstrate many of the SDK's capabilities. For more information, see About the SDK sample apps.

You can install the SDK by adding the Wowza GoCoder SDK framework to your project.

Add the Wowza GoCoder SDK framework to your project


  1. Copy WowzaGoCoderSDK.framework from the SDK distribution folder to your project folder.
  2. Drag WowzaGoCoderSDK.framework that you just copied into your Xcode project's Project navigator.
  3. In the dialog box that appears, select Copy items if needed.
  4. Select your project in the Project navigator, and click General at the top of the project editor.
  5. Under Embedded Binaries, click the + (add) button, select WowzaGoCoderSDK.framework, and then click Add.
  6. Add the SDK umbrella header to the source files you'll be referencing the SDK classes.

    Objective-C:  #import <WowzaGoCoderSDK/WowzaGoCoderSDK.h>

    Swift:  import WowzaGoCoderSDK

  7. (Optional) WowzaGoCoderSDK.framework contains both ARM and x86 code, which allows you to use it on a device or in the simulator. If you intend to submit your app to the App Store, run the following script to strip the inactive code from the binary.
    1. Select your target in the Project navigator, and click Build Phases at the top of the project editor.
    2. From the Editor menu, select Add Build Phase, then Add Run Script Build Phase (or click the + button in the upper-left corner of the Build Phases editor).
    3. Expand the disclosure triangle next to the new Run Script build phase that was just added. In the script editor box, paste the following:
      bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/WowzaGoCoderSDK.framework/strip-frameworks.sh"

About the SDK sample apps


To build and run the sample applications included with the SDK, try any of these Xcode projects included in the SDK sample-apps folder.

Notes:

  • An Xcode workspace called AllSampleApps.xcworkspace includes the sample projects.
  • The relevant GoCoder-related sources (.h and .m or .swift files) are listed first in the Project navigator.
WowzaGoCoderSDKSampleApp.xcodeproj An Objective-C application that demonstrates how to use the SDK to capture and broadcast video using the device's internal cameras. The Settings screen in the app allows you to modify various video, audio, capture, and broadcast settings.
WowzaGoCoderSDKSampleApp.swift.xcodeproj A Swift application that demonstrates how to use the SDK to capture and broadcast video using the device's internal cameras. The Settings screen in the app allows you to modify various video, audio, capture, and broadcast settings.
WowzaGoCoderMP4PlayerSample.swift.xcodeproj A Swift application that demonstrates how to broadcast the frames from a local MP4 file using the WZBroadcast, WZBroadcastComponent, and related classes and protocols, which provide lower-level access to the various components of a Wowza broadcast.
WowzaGoCoder.SceneKitReel.xcodeproj An Apple SceneKitReel application modified to support broadcasting the SceneKit app's frame buffer to a Wowza Streaming Engine server. Most of the code is written by Apple; search for #pragma mark - WowzaGoCoder to find Wowza GoCoder code. This application uses WZBroadcast, WZBroadcastComponent, and related classes and protocols, which provide lower-level access to the various components involved in a Wowza broadcast.

If you're having problems or want to discuss this article, post in our forum.