Creating an Integrated iOS Sender Application
Was this article helpful?
Review the following content for information about creating an integrated Chromecast sender application using the Ooyala mobile SDK for iOS.
Important: This topic contains older information and has been deprecated. For the latest information about Ooyala integration with Chromecast, see Chromecast Integration.
- Download the Ooyala SDK for iOS from the Ooyala Mobile and Client SDKs Downloads Page.
- Download the Cast SDK for iOS.
- Download the ChromecastSampleApp from the Ooyala SDK for iOS Sample Apps repository.
- Install the iOS Sender API libraries for GoogleCastFramework 2.2.1 or later on your system (see https://developers.google.com/cast/docs/ios_sender).
- Your system must be running iOS version 6 or newer.
- Review the iOS sender application development details on the Google Developers portal.
The sender includes the following classes:
Use the following steps to integrate with the sender application UIViewController with OOOoyalaPlayer (where the UIViewController in the sender application contains a player).
|OOCastPlayer||The interface between chromecast device and sender app. It is the object that sends/receives messages. It listens to the action from Ooyala CoreSDK and send the action to the receiver app, and it also listens to the message from the receiver app and transfer it to Ooyala Core SDK.|
|OOCastManager||The interface between customer application/CoreSDK and the OOCastPlayer. It manages the switch between "cast mode" and "local playback mode" and all basic connections between sender app and chromecast device.|
Note: The following code is based on the PlayerViewController class in the ChromecastSampleApp.
Open the ChromecastSampleApp project in Xcode.
- Make sure you have -ObjC linker flag enabled.
Link the following libraries as static libraries:
OoyalaSDK.framework OoyalaCastSDK.framework GoogleCast.framework libz.dylib
Initializing the Cast Manager
Open OOCastManagerFetcher.m and specify your own NameSpace and App ID
App ID The ID you were given when you register the receiver app with which you are trying to connect. NameSpace The namespace to identify the protocol of the message being sent for the related receiver app.Note: The namespace should not be changed unless you modify the receiver app source code.
- Open OOCastManagerFetcher.m and specify your own NameSpace and App ID values: