[Rhythm Ad SDK]

This package includes the Rhythm Ad SDK version 5.1.6 (build 53568).

-----------------
TABLE OF CONTENTS
-----------------
1. Installation
2. Usage - Display Ads
3. Usage - Video Ads


---------------
1. INSTALLATION
---------------

The following installation steps are for Xcode 3.2.4

 1. Copy the SDK headers and library file into your project directory wherever
    you would like them. The files are:
    - RhythmAd.h
    - RhythmAdDelegate.h
    - RhythmVideoController.h
    - RhythmVideoDataSource.h
    - RhythmVideoAdDelegate.h
    - RhythmVideoDelegate.h
    - libRhythmSDK.a

 2. In Xcode, add the headers and library file to your project

 3. Add the following frameworks to your project:
    - MediaPlayer
    - SystemConfiguration
    - MessageUI
    - CoreLocation
    - QuartzCore
    
----------------------
2. USAGE - DISPLAY ADS
----------------------

These are the minimal steps you will need to take to display advertisements
using the Rhythm Ad SDK:

1. implement the required RhythmAdDelegate protocol method appId
 
 #import "RhythmAd.h"
 #import "RhythmAdDelegate.h"
 
 -(NSString *)appId;    // required - contact Rhythm for your app ID

2. initiate an ad request with that delegate (see RhythmAd.h for
   additional adUnit values beyond kBanner)
 
 UIView<RhythmAd> *adView = 
         [RhythmAdFactory displayAdViewWithDelegate:adDelegate
                                             adUnit:kBanner];

3. add the ad view to your view hierarchy

 [yourView addSubview:adView];


The adDelegate is not retained by the adView, so if there is any chance that 
the adDelegate will be deallocated during ad retrieval, you must call the
[adView cancel] method to stop ad processing and remove the adDelegate 
reference from the adView.

In practice, this means you will very likely want to retain the adView and 
release it when appropriate.

You will also very likely want to implement additional delegate callback 
methods, most notably:

 -(void)didReceiveAdForAdView:(UIView<RhythmAd> *)adView;

Once this method has been called, the passed adView will contain a rendered
 ad ready for insertion into your view hierarchy (or ready for a takeover in
 the case of an interstitial).

A note on memory management: following Apple's object ownership policy,
 the object returned by the factory methods is not necessarily retained
 (technically it's released once either of the didReceiveAdForAdView: or 
 didNotReceiveAdForAdView:error: methods is called). If you would like
 to control the RhythmAd object lifecycle, you'll need to retain the result
 of the factory methods, and release it when appropriate for your usage.

Further details can be found in the code documentation within RhythmAd.h, 
 and RhythmAdDelegate.h. Various usage examples can be found in the sample
 application.


--------------------
3. USAGE - VIDEO ADS
--------------------

These are the minimal steps you will need to take to play video using the
Rhythm Video SDK:

1. implement the required RhythmVideoAdDelegate protocol method appId:
 
 #import "RhythmVideoAdDelegate.h"
 
 -(NSString *)appId;    // required - contact Rhythm for your app ID

2. create a video controller to play your content, add its view to your
   view heirarchy, and initiate playback:

 #import "RhythmVideoController.h"
 UIViewController<RhythmVideoController> *videoController = 
          [RhythmVideoControllerFactory newVideoControllerWithAdDelegate:self
                                                           videoDelegate:self
                                                              contentURL:url];
 videoController.view.frame = CGRectInset(self.view.bounds, 20, 20);
 [self.view addSubview:videoController.view];
 [videoController play];

3. implement the shutdown callback to release the video controller when done:

 -(void)playerShutdown:(NSObject<RhythmVideoController> *)videoController
 {
     [[videoController view] removeFromSuperview];
     [videoController release];
 }

In practice, you may want to implement RhythmVideoDelegate and pass 
 your implementation to the factory method. Callbacks include methods
 to obtain video usage, to control the views that appear between
 videos, and others.
 
There are additional factory methods to allow you to play multiple 
 content URLs as a playlist, and to provide titles for your content.

The Rhythm SDK automatically detects the network type (wifi vs cellular)
 to provide the best video experience. If not explicitly started, network
 detection will begin once the first video is played. In practice, you will
 likely want to start this detection early in your app lifecycle by calling
 the following method:
 
 [RhythmVideoControllerFactory startNetworkDetection];

Further details can be found in the code documentation within the header
 files. Various usage examples can be found in the sample application.

