IronSource - iOS

Based on the IronSource demo project: https://github.com/ironsource-mobile/Mediation-Demo-Apps/tree/master/iOS/Swift you can check the Nefta custom adapter integration example here: https://github.com/Nefta-io/NeftaISAdapter.

Include the SDK

CocoaPods

To integrate Nefta SDK for IronSource Mediation add the following to your Podfile:

  pod 'NeftaISAdapter'

Run the following command:

pod install --repo-update

Manually

Or you can integrate it manually: https://docs.nefta.io/update/docs/manual-integration#/


Code integration

If your initialization source code is in swift add custom adapter ObjectiveC header file to your bridging header, or create it if you don't have it yet:

#import "ISNeftaCustomAdapter.h"

The plugin has to be manually initialized, so that game events work correctly:

import NeftaSDK

let plugin = ISNeftaCustomAdapter.initWithAppId("5661184053215232")
#import "NeftaAdapter.h"

NeftaPlugin *plugin = [NeftaPlugin InitWithAppId: @"5661184053215232"];

In the dashboard you can access the AppId which you need to enter in the code above.

Additional parameters

For additional configuration, for example for configuring external test group, use:

NeftaPlugin.SetExtraParameter(key: NeftaPlugin.ExtParam_TestGroup, value: "split-direct")
[NeftaPlugin SetExtraParameterWithKey: NeftaPlugin.ExtParam_TestGroup value: @"split-direct"];

Events

Game events can be then recorded as follows:

plugin.Events.AddSpendEvent(category: NeftaEvents.ResourceCategory.PremiumCurrency,
                           method: NeftaEvents.SpendMethod.Upgrade)

plugin.Events.AddProgressionEvent(status: NeftaEvents.ProgressionStatus.Start,
                                         type: NeftaEvents.ProgressionType.GameplayUnit,
                                         source: NeftaEvents.ProgressionSource.CoreContent,
                                         name: "area-4",
                                         value: 21)
[plugin.Events AddSpendEventWithCategory: ResourceCategoryPremiumCurrency
                                       method: SpendMethodUpgrade];

[plugin.Events AddProgressionEventWithStatus: ProgressionStatusStart
                                             type: ProgressionTypeGameplayUnit
                                           source: ProgressionSourceCoreContent
                                             name: "area-4"
                                            value: 21];

Testing

To put the adapter in test mode and enable logs:

NeftaPlugin.EnableLogging(enable: true)
[NeftaPlugin EnableLogging: true];

For testing ads, you can retrieve the Nefta identifier from the device with:

let nuid = plugin.ShowNuid()
NSString *nuid = [plugin ShowNuid];

With this, you can set custom ad behavior in the dashboard.


All done

With this technical part, make sure you have Nefta mediation enabled in your LevelPlay configuration.


Additional Features

List of additional features: https://docs.nefta.io/update/docs/advanced-features#/