Getting Started with the ironSource Adobe Air Plugin
Adobe 4.0+ and the AIR SDK 23.0 are required to be able to use the ironSource SDK. If you are using Flash Builder, you’ll need to download Air SDK 23.0 and overlay it into Flash Builder.
We support Adobe 4.0+ and Air SDK 23.0 on Android operating systems versions 3.0 (API 11) and up as well as iOS versions 7.0 and up.
Step 1. Add the ironSource AIR Plugin to your Project
- Make sure you have integrated the latest version of our Adobe Air Plugin. Find it here.
- If you are upgrading from a previous version of the ironSource SDK, you must completely remove it from your project, otherwise it will cause issues with the update. We also recommend erasing older builds from test devices and making a new build.
Download the ironSource AIR ANE, then complete the following steps to include it in your project:
- In Flash Builder, right click your project and go to Properties ➣ Flex Build Path ➣ Native Extensions.
- Click “Add ANE...” and add the ironSource Air Plugin ANE file.
- Right click on your project and go to Properties ➣ Flex Build Packaging ➣ Android/iOS ➣ Native Extensions and make sure that the ironSource Air Plugin ANE file is marked as “Package”.
If you are using Flash Professional in your project, go to:
File ➣ ActionScript Settings ➣ Library Path and add ironSource’s Air Plugin ANE file.
Step 2. Add onPause/onResume & SDK Imports
- During the Flex Application Lifecycle, listen for application activation and deactivation by adding onResume and onPause on the top of the file where you define all of the properties:
activate= "onResume()" deactivate="onPause()"
- Implement the two functions as follows:
function onResume():void { IronSource.instance.onResume(); } function onPause():void { IronSource.instance.onPause(); }
You should call onPause/onResume each time the app is activated or deactivated.
- Implement the two functions as follows:
- Import the following in your scripts to use the ironSource SDK:
com.ironsource.adobeair.IronSource
Step 3. Update AndroidManifest.xml & Google Play Services (For Android Only)
To use the ironSource SDK on Android, add relevant code to the AndroidManifest.xml and integrate Google Play Services:
- Add the following to your AndroidManifest.xml:
- Manifest Permissions:
Add the following permissions to your Application Descriptor.xml file inside the manifestAdditions tag but outside the <application> tag:<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
- Manifest Activities:
Add the following activities inside the <application> tag on your manifestAdditions:
<activity android:name=“com.ironsource.sdk.controller.ControllerActivity” android:configChanges=“orientation|screenSize” android:hardwareAccelerated=“true” /> <activity android:name=“com.ironsource.sdk.controller.InterstitialActivity” android:configChanges=“orientation|screenSize” android:hardwareAccelerated=“true” android:theme=“@android:style/Theme.Translucent” /> <activity android:name=“com.ironsource.sdk.controller.OpenUrlActivity” android:configChanges=“orientation|screenSize” android:hardwareAccelerated=“true” android:theme=“@android:style/Theme.Translucent” />
- Download the support-v4-[version].ane Add the jar to your project under App/Libs.
- Google Play Services
The ironSource Plugin requires Google Play Services to make use of the Android Advertising Identifier. The easiest way to do this is to include ironSource’s Google play services ANE. Make sure to add Google Play Services info to your manifestAdditions:<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
- Manifest Permissions:
Step 4. Apply iOS 10 App Transport Security Settings (iOS Only)
Important! In iOS 9+, Apple has added in controls around ‘ATS’. In order to ensure uninterrupted support for ironSource Ad delivery across all Mediation Networks, it’s important to add the following changes in your *-app.xml file:
<iPhone> <InfoAdditions> <![CDATA[ <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true /> </dict> ]]> </InfoAdditions> </iPhone>
Step 5. Initialize the Ad Units
You can initialize the SDK in two ways. We recommend the first method as it will fetch the specific ad units you define.
This method will init the specific ad units mentioned in the adUnits parameter as an Array:
IronSource.instance.init(YOUR_APP_KEY, [IronSource.REWARDED_VIDEO, IronSource.INTERSTITIAL, IronSource.OFFERWALL]);
New! When using this init approach, you can now initialize each ad unit separately at different touchpoints in your app flow in one session.
//To init Rewarded Video IronSource.instance.init(YOUR_APP_KEY, [IronSource.REWARDED_VIDEO]); //To init Interstitial IronSource.instance.init(YOUR_APP_KEY, [IronSource.INTERSTITIAL]); //To init Offerwall IronSource.instance.init(YOUR_APP_KEY, [IronSource.OFFERWALL]);
Alternatively, you can init the SDK as detailed below and the SDK will init the ad units you’ve configured on the ironSource platform:
IronSource.instance.init(YOUR_APP_KEY);
The default of this function is False; in the case you’d like to utilize it, you can activate it in the Init with the following string:
IronSource.instance.shouldTrackNetworkState(true);
Step 6. Verify Your Integration
The ironSource SDK provides an easy way to verify that your Rewarded Video Mediation integration was completed successfully. To verify your ironSource SDK integration as well as any additional Ad Networks you may have implemented, navigate to this article.
Done!
You are now ready to start working with the ironSource Ad Units and Mediation Tools.
What’s Next?
Once you’ve verified your integration with the Integration Helper, follow our integration guides and implement our Ad Units:
Interested in Mediation? Integrate our Rewarded Video or Interstitial Ads in your app and follow our Mediation Docs.