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
Manually
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.
Unity Package Manager
Or with UPM via: https://github.com/Nefta-io/nefta.max-adapter.git :
On Android 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 { *; }
Code integration
You initialize plugin with:
#if UNITY_IOS
private const string _neftaAppId = "5763106043068416";
#else // UNITY_ANDROID
private const string _neftaAppId = "5693275310653440";
#endif
NeftaAdapterEvents.InitWithAppId(_neftaAppId, (InitConfiguration config) =>
{
Debug.Log($"[NeftaPluginMAX] Nefta initialized, nuid: {config._nuid}");
} Testing
To enable logging call this function anytime during runtime:
NeftaAdapterEvents.EnableLogging(true);To get the nuid (player install identifier) with which you can modify Nefta behaviour and verify integration on the dashboard:
// if parameter is true it will also show the nuid in native pop up window
var nuid = NeftaAdapterEvents.GetNuid(false); // will return and log the nuidThe most convinient way to find the Nefta SDK version is through menu: Window > Nefta > Inspect:
Updated 5 days ago