MAX - Unity

Based on AppLovin MAX Unity Demo App: https://github.com/AppLovin/AppLovin-MAX-Unity-Plugin you can test the Nefta Custom adapter integration through MAX SDK https://github.com/Nefta-io/NeftaMAXAdapter-Unity:

Include the SDK

The most convenient way to include the Nefta Custom Adapter for both Android and iOS is to download the Unity package: https://github.com/Nefta-io/NeftaMAXAdapter-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.

Code integration

To complete the integration, you have to init the SDK on app start or shortly after, to ensure proper behavior of game events:

#if UNITY_IOS
NeftaAdapterEvents.Init("your iOS AppId");
#else
NeftaAdapterEvents.Init("your Android AppId");
#endif

After this, you can create events whenever you like, for example:

 NeftaAdapterEvents.Record(new ProgressionEvent() {
	_status = Status.Start,
  _type = Type.Achievement,
  _source = Source.OptionalContent,
  _name = "area-69",
  _value = 23,
  _customString = "abc"
 });

Validating integration:

Android:

Things should work if you have NeftaPlugin-release.aar or NeftaPlugin-debug in the Plugins/Android folder with either one having the flag that it's included for the Android platform, but not both!

iOS:

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

Unity versions bellow 2022.3.3:

Unity versions above 2022.3.3:

This should result in the exported XCode project to look something like this:

Switching between Development and Production:

To access additional configuration go to menu: AppLovin > Select Nefta Configuration:

First time accessing this object might take a bit more time because it needs to be created first.

Android:

By default debug plugin is selected (with logging present). To change this, toggle the Is Logging Enabled property off or manually exclude debug and enable the release plugin (with logging stripped out) like this:

iOS:

To enable logging on iOS call this function anytime during runtime:

NeftaAdapterEvents.EnableLogging(true);

Backend Configuration

After configuring the Nefta mediation network for your placements you will start seeing and earning with Nefta ads.