SDK Version: 1.0.1
Website: http://startad.mobi
####Adding the SDK to your Project
- Download the StartAD SDK for iOS by clicking the Download Now link, above.
- Copy the libSADView.a to your project by performing the steps given below.
- Create a subdirectory named libs in the any directory of your project.
- Copy the libSADView.a into the libs directory.
- Import SADWebView.h file
- Link to project AdSupport.framework
####Adding a libSADView The five lines of code it takes to add a banner:
- Import SADWebView.h file
- Declare an SADView instance
- Create it, specifying the ad application ID
- Add the view to the UI
- Load it with an ad
The easiest place to do all this is in your app's Activity.
SADWebView* webView;
if (!webView) {
webView = [[SADWebView alloc]initWithId:APPLICATION_ID]; // creating instance of SASWebview
webView.sadDelegate = self; // adding the delegate
[webView loadAd:LANGUAGE_RU]; // loading data with params
}
####Ad lifecycle events You may optionally track ad lifecycle events like request failures or "click-through" by implementing SADWebViewDelegate.
-(void)onReceivedAd;
-(void)onShowedAd;
-(void)onError:(SADVIEW_ERROR)error;
-(void)onAdClicked;
-(void)noAdFound;
Sample
webView.sadDelegate = self; // or another ViewController
-(void)onReceivedAd
{
NSLog(@"SADView onReceivedAd");
}
-(void)onShowedAd
{
NSLog(@"SADView onShowedAd");
}
-(void)onError:(SADVIEW_ERROR)error
{
NSLog(@"SADView error: %d", error);
}
-(void)onAdClicked
{
NSLog(@"SADView onAdClicked");
}
-(void)noAdFound
{
NSLog(@"SADView noAdFound");
}
You must accept the terms and conditions on the StartAD.mobi website by registering in order to legally use the StartAD SDK.