IOS
Contents |
Publishers
Download iOS SDK
Download the [iOS SDK for publishers]. Decompress the zip file and extract the files to your development mac.
The Ad4game iOS SDK is provided as a single framework file (A4GPub.framework), making it easy to include in your iOS project.
Include the A4GPub.framework
To include the A4GPub.framework to your xcode project, you need to select your target project, and then go to Build Phases → Link Binary With Libraries,
then click on the + sign → Add Other, and select the A4GPub.framework saved on your mac as shown below:
Include the AdSupport.framework
You need to include the AdSupport.framework to your project target to enable the Advertiser Identifier functionality. Go to Build Phases → Link Binary With
Libraries, then click on the + sign to add the AdSupport.framework as shown below:
Then, change the value of AdSupport.framework from Required to Optional.
Include the SystemConfiguration.framework
You need to include the SystemConfiguration.framework to your project target to enable detection of the connection type. Go to Build Phases → Link Binary With Libraries, then click on the + sign to add the SystemConfiguration.framework.
Include the QuartzCore.framework
You need to include the QuartzCore.framework to your project target to customize the interface.
Go to Build Phases → Link Binary With Libraries, then click on the + sign to add the QuartzCore.framework.
Display Android Editorials
To display Android Editorials inside your android application, you need to instantiate the A4GEditorial class to allow you to call the functions from the AndroidSDKPublisher.
You need to use one of the three methods (you can use all of them) bellow:
1- showA4GEdito : If you want to display the editorials once the activity's started.
2- showA4GEditoWithStartTime : If you want to display the editorials after certain time.
3- showA4GEditoWithStartAndEndTime : If you want to display the editorials after certain time and close them automatically after certain time.
4- showA4GEditoOnClick : If you want to display the editorials when the user click on a button.
valid from android 2.3 or above.
To use one of the three methods mentioned above, you need to define a View and assign it to the A4GEditorial object like shown bellow:
To use showA4GEditoOnClick function, you need to define a button and assign it to the A4GEditorial object like shown below: