Test the SDK
Test the SDK is integrated correctly
To observe the SDK behavior you can enable the logs and verify that integration is complete
Unity
Direct integration
By default, logging is enabled. You can change this setting in NeftaConfiguration object:
If Is Logging Enabled is enabled:
- iOS & Unity Editor plugin: Before the NeftaPlugin is initialized the logs are turned on.
- Android plugin: The Debug version of NeftaPlugin is included in the build with logging.
- Unity: The NEFTA_SDK_DBG symbol is added so that conditional logs in C# are present.
If Is Logging Enabled is disabled:
- iOS & Unity Editor plugin: Logs are disabled by default.
- Android plugin: The Release version of NeftaPlugin is included in the build with logs stripped out.
- Unity: The NEFTA_SDK_DBG symbol is not present so the conditional logs in C# are stripped out.
Custom adapter
-
iOS: You toggle the logging on and off at any time with the following function:
NeftaAdapterEvents.EnableLogging(true);
-
Android:
-
With the debug version of the plugin, the logs are included:
-
With the release version of the plugin, the logs are stripped out:
-
iOS
Before Initializing the SDK, call this static function:
NeftaPlugin_iOS.EnableLogging(enable: true)
[NeftaPlugin_iOS EnableLogging: true];
With this, you can observe the SDK behavior:
// Date Time Thread_Number [Tag] Message
2023-12-11 10:02:40.401 1 [NeftaPlugin] Core initialized d23c4561-38be-42fc-8d2c-d900b306ba81 n:1 s:1 // After initializaiton; player behaviour uuid; current event counter; current session number
2023-12-11 10:02:40.412 1 [NeftaPlugin] OnResume 1702285352439 1702285360411 7972 // Called after app resumes/comes from background; timestamp of previous pause; current timestamp; pauseDuration
2023-12-11 10:02:40.412 1 [NeftaPlugin] EnableAds: true // Logged when ads are enabled; prepared renderer, started ad logic and start loading configuration
2023-12-11 10:02:41.785 5 [NeftaPlugin] InitConfiguration https://rtb.nefta.app/sdk/init success // ad configuration received
2023-12-11 10:02:41.786 5 [NeftaPlugin] Placements loaded: 3 // number of ad parsed adUnits configured in your dashboard
Android
In the downloaded zip, there are two Android Archive files, one -debug and one -release. In the example integration project, the -release variant is included. If you want to check SDK behavior through logs, include the -debug variant in your build.gradle project file:
dependencies {
...
//implementation files('libs/NeftaPlugin-release-3.1.8.aar')
implementation files('libs/NeftaPlugin-debug-3.1.8.aar')
With this, you can observe the SDK behavior:
// Date Time ProcessId-ThreadId Tag ProjectPackagName Level ThreadName Message
2023-12-12 08:01:14.455 13693-13693 NeftaPlugin com.nefta.neftatestbed I main Core initialized 11a91af9-d30d-4ff9-879f-4c76eba5c3e0 n:1 s:1 // After initializaiton; player behaviour uuid; current event counter; current session number
2023-12-12 08:01:14.455 13693-13693 NeftaPlugin com.nefta.neftatestbed I main OnResume 1702019521871 1702364474455 344952584 // Called after app resumes/comes from background; timestamp of previous pause; current timestamp; pauseDuration
2023-12-12 08:01:14.457 13693-13693 NeftaPlugin com.nefta.neftatestbed I main EnableAds: true // Logged when ads are enabled; prepared renderer, started ad logic and start loading configuration
2023-12-12 08:01:15.564 13693-13735 NeftaPlugin com.nefta.neftatestbed I pool-2-thread-1 POST request: https:\/\/rtb.nefta.app/sdk/init: {"app_id":"5070114386870272","nuid":"11a91af9-d30d-4ff9-879f-4c76eba5c3e0"} // Request for ad configuration
2023-12-12 08:01:15.768 13693-13735 NeftaPlugin com.nefta.neftatestbed I pool-2-thread-1 POST request success 200 // Ad configuration received
2023-12-12 08:01:15.769 13693-13735 NeftaPlugin com.nefta.neftatestbed I pool-2-thread-1 Placements loaded: 3 // Number of ad parsed adUnits configured in your dashboard
Updated 9 months ago