IronSource - Unity

Based on the IronSource demo project:https://github.com/ironsource-mobile/Mediation-Demo-Apps you can test the Nefta Custom adapter for Unity through IronSource SDK https://github.com/Nefta-io/NeftaISAdapter-Unity.

Include the SDK

The most convenient way to include the Nefta Custom Adapter for both Android and iOS is to download Unity package: https://github.com/Nefta-io/NeftaISAdapter-Unity/releases. Which you import through Assets > Import Package > Custom Package...

After which you will be presented with the following dialog:

Feel free to customize this as much as you want, based on the needs of your project.

Android

As long as you have NeftaPlugin-release-x.y.z.aar in the Plugins/Android folder things should work.

If you are using custom proguard file, add the following into proguard-user.txt:

-keep public class com.nefta.sdk.NeftaPlugin { *; }
-keep public interface com.nefta.sdk.AdapterCallback { *; }

iOS

Similarly, here, the Unity build process should automatically include NeftaSDK by itself. As long as the Add to Embedded Binaries is checked:


Code integration

You should initialize the plugin as soon as possible (for session tracking) with:

#if UNITY_IOS
   private const string _neftaAppId = "5661184053215232";
#else // UNITY_ANDROID
   private const string _neftaAppId = "5643649824063488";
#endif

Adapter.InitWithAppId(_neftaAppId, config => {
   Debug.Log($"[NeftaPluginIS] Nefta initialized nuid: {config._nuid}");
});

Testing

To enable logging call this function anytime during runtime:

Adapter.EnableLogging(true);

To get the nuid (player install identifier) with which you can modify Nefta behaviour and verify integration on the dashboard:

Adapter.GetNuid(false); // or true to show is in popup window

The easiest way to view SDK version is through menu: Window > Nefta > Inspect: