Troubleshooting SDK Integration

Too many methods in Android

If your app has over 65536 methods, you could get an Android compile error which will prevent you from building your app. Our sdk contributes very little to the overall number of methods (approximately 1000 methods). But other sdks and libraries, such as the Google Play Services library (approximately 20,000 methods) can cause your app to reach the method limit.

There are two possible solutions to the issue:

  • Use proguard, which will remove methods that you are not actually using from your total number of methods.
  • Split the app between two dex files, primary and secondary, and load the secondary at runtime.

ARC in iOS

Our SDK uses ARC. If you want to use it in a non-ARC project, you will have to add the compiler flag -fobjc-arc to all of our files.

On Unity, this can be automated using a PostProcessor script. More details about ARC on Unity can be found here.

Enabling Logging

To receive the maximum possible amount of information from the SDK you can enable debug logging, increasing the amount of information provided by the SDK about its initialization and operations.

To ensure that all relevant logging information is produced, we suggest invoking the log enabling method before starting our SDK.

iOS

On iOS, you enable logging by calling the method [FyberSDK setLoggingLevel:FYBLogLevelDebug];.

You can then set the logging level to one of the following values:

Log Level Description Value
FYBLogLevelOff No Logs 0
FYBLogLevelDebug Log debug statements 10
FYBLogLevelInfo Log information about the SDK's behavior 20
FYBLogLevelWarn Log non-critical errors 30
FYBLogLevelError Log critical errors only 40

A good place to call this would be in the application:didFinishLaunchingWithOptions: method in your application delegate.

Note When sending builds to Fyber, please always use the Debug setting (FYBLogLevelDebug).

Android

On Android, you enable logging by calling the function:

import com.fyber.utils.FyberLogger;
FyberLogger.enableLogging(true);

A good place to call this would be on the onCreate method in your main activity.

Unity

On Unity, you enable logging by calling the function EnableLogging(true) on the SponsorPayMonoBehavior instance object and then setting the desired logging level using SetLogLevel(SPLogLevel logLevel):

sponsorPayPlugin.EnableLogging(true);
sponsorPayPlugin.SetLogLevel(SPLogLevel.Verbose);

When sending builds to Fyber, please always use the Verbose setting (SPLogLevel.Verbose).

What to look for in the logs?

Our logs should be easy to read. If you are using mediation, you probably want to check that the mediated SDK are initialized correctly. Our logs look like this:

02-18 14:53:52.335: D/SPMediationCoordinator(23075): Starting adapter FlurryAppCircleClips version 1.0.0
02-18 14:53:52.335: D/SPMediationCoordinator(23075): Adapter version is compatible with SDK. Proceeding...
02-18 14:53:52.340: D/FlurryAdapter(23075): Starting Flurry adapter - SDK version Flurry_Android_153_3.3.0
02-18 14:53:52.340: I/FlurryAdapter(23075): Using API key = [YOUR API KEY]
02-18 14:53:52.345: W/FlurryAgent(23075): Start session
02-18 14:53:52.355: D/SPMediationCoordinator(23075): Adapter has been started successfully

No Videos Available

One of the most common reasons for not receiving video fills, is when applications request them immediately after initializing our SDK.

As some of our mediation partners might still be caching videos at that point, this will result in a "no videos available" result, even though there are videos available. Instead, the request for videos instruction should be moved close to the point where the user will engage with a video.

Need more help?

Please get in touch! Report an issue to our Developer Support team, or contact the Developer Portal team directly, including details of your account if you are a registered Fyber Developer.