Get Started with the ironSource Xamarin Plugin for iOS

Step 1. Add the ironSource Plugin to Your Project

ironSource Xamarin plugin requires adding two files.

  1. Download the ironSource Xamarin dll for iOS and add it to your app as follows:
    Download Xamarin dll for iOS

    1. In the Solution Explorer, under your project, right click on References > Edit References…
    2. Navigate to the .Net Assembly tab and click on Browse
    3. Select the dll that you just downloaded
  2. Download ironSource framework and add it to your app as follows:
    Download Xamarin Framework for iOS

    1. In the Solution Explorer, right-click on the project name and select Add > Add Native Reference
    2. Select the framework that you just downloaded

Step 2. Import the ironSource Files

Import the references to your ViewController:

using IronSourceiOS;

Then, set the following plugin data parameters:

ISConfigurations.Configurations.Plugin = “Xamarin”;
ISConfigurations.Configurations.PluginVersion = IronSource.SdkVersion;
//Insert your Visual Studio version 
ISConfigurations.Configurations.PluginFrameworkVersion = YOUR_XAMARIN_FRAMEWORK_VERSION;

Step 3. Initialize the Plugin

Init the Plugin and Rewarded Video:

IronSource.InitWithAppKey(txtAppKey.Text, new string[]{“rewardedvideo”});

Note: ironSource supports Network Change Status, which enables the Plugin to change its availability according to network modifications, i.e. in the case of no network connection, the availability will turn to FALSE.
The default of this function is False; in case you’d like to utilize it, you can activate it in the Init with the following string:

IronSource.ShouldTrackReachability(true);

Step 4. Verify Your Integration

The ironSource SDK provides an easy way to verify that your SDK and ad unit integration was completed successfully. Call this method to verify your integration:

ISIntegrationHelper.ValidateIntegration();

 

Done! You just integrated the ironSource Plugin in your app.
You are now ready to start working with ironSource’s Ad Units.


What’s Next?

For additional mediation networks, follow Xamarin iOS adapters guide.

For additional settings available to you through the SDK, follow Additional SDK Settings.

Once you’ve verified your integration with the Integration Helper, follow our Rewarded Video integration guide to implement the ad unit.