How to install GoCoder SDK for iOS

Start building apps with the Wowza GoCoder™ SDK for iOS in an Xcode development environment.

Note: Developing apps with the Wowza GoCoder SDK for iOS requires iOS SDK 8.01 or later and Xcode 7 or later. Video playback in GoCoder SDK apps requires iOS 10 or later.

Contents


Download and install the tools
Configure an Xcode project to use the Wowza GoCoder SDK
Remove inactive code from the project
Practice with the SDK sample apps
More resources

Download and install the tools


  1. Download and install the current version of Xcode.

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.

  1. Download the current release of Wowza GoCoder SDK for iOS.
  2. Expand the downloaded .zip file, which contains the following files and folders:
/docs

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

/ModuleGoCoderSDKSample

Sample code that demonstrates integration between Wowza Streaming Engine™ media server software and the SDK.

ReleaseNotes.md

A markdown file that contains these release notes.

/sample-apps

A set of Xcode projects that demonstrate many of the SDK's capabilities.

/wowzagocoder_static_lib

A static library version of the GoCoder SDK library for Objective-C applications.

WowzaGoCoderSDK.framework

A dynamic framework version of the GoCoder SDK library that supports both Objective-C and Swift-based application development.

Note: Using WowzaGoCoderSDK.framework is recommended over wowzagocoder_static_lib.

Configure an Xcode project to use the Wowza GoCoder SDK


To develop iOS apps with the GoCoder SDK, you must configure an Xcode project to recognize the GoCoder SDK framework and add the SDK umbrella header to the  project's source files.

  1. In Xcode, create a project. See Create an app project.
  2. With the project selected in the navigator area of the Xcode main window, click the File menu and choose Add Files to [project name].
  3. Navigate to and select WowzaGoCoderSDK.framework in the expanded .zip that you downloaded.
  4. Under Destination, select Copy items if needed.
  5. Under Add to targets, select your project.
  6. Click Add.
  7. In the editor area of the main window, under the General tab, scroll down to Embedded Binaries and click the + (add) button.
  8. Select WowzaGoCoderSDK.framework, and then click Add.

    Finally, add an umbrella statement to your project's .h or .swift source files so they can reference GoCoder SDK classes. 
  9. In the navigator area, locate your project's AppDelegate and ViewController .h or .swift files.
  10. Copy one of the following statements into the top of the files, below the commented-out copyright information:

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

Swift:  import WowzaGoCoderSDK

Remove inactive code from the project


The Wowza GoCoder SDK 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 Apple App Store, run the following script to strip the inactive code from the binary.

  1. In the editor area of the project's main window, click Build Phases.
  2. Click the + (add) button in the upper-left corner of the Build Phases editor.

Xcode adds a Run Script build phase to the list.

  1. Expand the Run Script build phase and paste the following into the script editor field:

bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/WowzaGoCoderSDK.framework/strip-frameworks.sh"

Practice with the SDK sample apps


Try any of these Xcode projects included in the SDK sample-apps folder to learn more about what you can do with the GoCoder SDK.

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.
App Description
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.
WowzaGoCoderSDKSampleAppPlayer.objc.xcodeproj An Objective-C application that demonstrates how to use the SDK to play a live stream, including an ultra low latency stream from the Wowza Streaming Cloud™ service. This application uses WOWZBroadcast and WOWZPlayer, which decompresses audio and video, and supports HLS fallback when the primary connection fails.
WowzaGoCoderMP4PlayerSample.swift.xcodeproj A Swift application that demonstrates how to broadcast the frames from a local MP4 file using WOWZBroadcast, WOWZBroadcastComponent, WOWZPlayer, and related classes and protocols.
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 GoCoder code. This application uses WOWZBroadcast, WOWZBroadcastComponent, and related classes and protocols.

More resources



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