SimpleBanner-iOS provides a basic example of how to use the CommuteStream SDK for iOS apps.
- iOS SDK 7.1 or higher
- Google AdMob Ads SDK for iOS
- CommuteStream SDK for iOS
- Working AdMob Ad ID
- Xcode 5.0
- https://github.com/CommuteStream/SimpleBanner-iOS
- Double-click the SimpleBanner.xcodeproj file
- Click on the SimpleBanner Project Icon in Project Navigator
- Select the SimpleBanner Target
- Under General set your Deployment Target to at least 6.0
- Under Build Settings set your Base SDK to 'Latest 7.1 iOS (7.1)'
- Download the latest Google Ad Mobs SDK
- Add the files to your project
- Download the Static Library files from http://commutestream.com/downloads/iOS_CommuteStream_SDK.zip
- Add the 'include' folder and the 'libCommuteStream.a' file to the project
- Select the SimpleBanner target
- In Build Settings, go to Header Search Paths and add '$SOURCE_ROOT/include'
- Also in your target's Build Settings, go to Other Linker Flags and add '-ObjC'
- Log into the AdMob interface (https://apps.admob.com/).
- Setup a new + New ad unit or find an Ad Unit ID that you already have setup.
- In CSViewController.m, replace "INSERT_YOUR_ADMOB_AD_UNIT_ID_HERE" with the valid Ad unit ID.
-
Go to http://commutestream.com/publisherinterface/app. After signing in you will be provided with a CommuteStream Ad Unit ID. Leave the browser window open, as we will need this ID in step 8 below.
-
Log into the AdMob interface (https://apps.admob.com/).
-
Click on Monetize tab of main menu.
-
Click on All apps in left column, then select the app that contains the ad unit you are using.
-
On the right side of the screen click Edit mediation link next to the ad unit you are using.
-
Click + New ad network
-
Click + Custom Event, then enter the following in the three fields that pop up, and click Continue:
Class Name: CSCustomBanner Label: CommuteStream Parameter: <Your Ad Unit ID>
-
Adjust the Default eCPM for CommuteStream to be the largest amount. Since we pay you the most you will want our ads to have first priority.