Create and set up a PhoneGap application.
Clone from a sample OpenTok iOS app:
git clone --recursive https://github.com/opentok/OpenTok-iOS-Hello-World.git
Add the the OpenTok Framework, the OpenTok bundle file, and other frameworks that the OpenTok SDK requires. For details, see full instructions at the OpenTok PhoneGap Plugin page at GitHub.
Under Build Settings, change Architectures and valid Architectures to use only arm7.
The OpenTok PhoneGap plugin is at https://github.com/opentok/PhoneGap-Plugin.
Clone the OpenTok PhoneGap plugin:
git clone https://github.com/opentok/PhoneGap-Plugin.git
From the src directory, copy the OpenTokPlugin.h and OpenTokPlugin.m files into your project's Plugin directory.
Copy the OpenTok.js file into your www/js folder.
In the Resources folder of your project, in the Cordova.plist file, add a Plugins key named TokBox and set its value to OpenTokPlugin
In the Cordova.plist file, add an ExternalHosts key (the default name is Item 0), and set its value to *
In the index.html file for your project, add a script tag to include the js/OpenTok.js file.
Save and run!
Watch your video being published between your iOS device and the getting started web page!