Frequently Asked Questions
All platforms
-
How is handled the geolocation?
The geolocation is automatically retrieved by the Smart Display SDK following the restrictions of the current application. So, if the application blocks the geolocation, the Smart Display SDK will not be able to retrieve it, and if the application allow the geolocation, the Smart Display SDK will retrieve it depending if the automatic location is allowed. To enable/disable the automatic location:
On Android:
On iOS:SASConfiguration.getSharedInstance().setAutomaticLocationAllowed(true/false)
Please note: On both platforms, the automatic location is allowed by default.SASConfiguration.shared.allowAutomaticLocationDetection = true/false
[SASConfiguration sharedInstance].allowAutomaticLocationDetection = YES/NO
-
How can I check that the right geolocation coordinates are passed to the request?
You can check that the right values are passed by checking the body of the request using Fiddler (Windows) or Charles (macOS X), or any other Proxy. -
How viewability measurement is handled ?
Check Viewability Measurement page. -
Is prefetch mode still supported ?
Starting version 7.0.0, we splited the load and show phases for the Interstitial. Thanks to this API modification, prefetch mode is not relevant anymore and we removed it.
Android
-
Why does proguard obfuscation break ad display?
The SDK makes extensive use of the Android Javascript Interface mechanism to enable native method calls from javascript in WebViews. However, proguard's default configuration will allow the renaming of such methods , thus making them unreachable from javascript code, which breaks ad display.
To ensure that those methods do not get obfuscated, add this rule to the proguard-project.txt configuration file in your project:
-keepclassmembers class com.smartadserver.android.library.** { @android.webkit.JavascriptInterface <methods>; }
-
Why do I have
google_play_services_version
compilation error?If your project does not compile because of the following error:
It probably means that you have not properly installed and linked the required Google Play Services library project in your environment. Please refer to the installation guide.No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version')
-
Why does my application crash when trying to display video ads ?
If you do not declare the required Smart SDK dependencies in a transitive way (which pulls all needed dependencies without explicit declaration), recent Gradle plugin versions introduced an optimization when building the application that strips out some classes that are actually needed, leading to a class definition error at runtime, hence a crash. To avoid that, you must add a property to your gradle.properties file to disable that optimization :android.enableDexingArtifactTransform=false
iOS
-
How Apple's changes to IDFA in iOS 14 can impact our Smart Display SDK inapp integration?
Starting with iOS 14, a specific integration is needed in your app so the SDK can continue to use the IDFA. A dedicated topic is available here. -
I'm clicking on a banner but nothing happens. Why is my landing page not displayed?
This is likely that themodalParentViewController
property of theSASBannerView
is not correctly set. ThemodalParentViewController
must be the currentUIViewController
, otherwise most post-click will not be able to open. -
The ad loading fails with an 'Unsupported URL' error message. Any idea?
If the ad loading fails instantly with an 'unsupported URL' error message (no ad call is actually sent), it is likely that you have not set yourbaseURL
properly.
Check if thebaseURL
is correct: the protocol must be present (aka https://) and there should be no trailing slash.
For instance:is a validSASConfiguration.shared.configure(siteId: 123, baseURL: "https://mybaseurl.com")
[[SASConfiguration sharedInstance] configureWithSiteId:123 baseURL:@"https://mybaseurl.com"];
baseURL
but:will lead to ad loading failure.SASConfiguration.shared.configure(siteId: 123, baseURL: "mybaseurl.com/")
[[SASConfiguration sharedInstance] configureWithSiteId:123 baseURL:@"mybaseurl.com/"];
-
My app is crashing due to your SDK but the logs are obfuscated in Firebase Crashlytics, why?
Please refer to the corresponding troubleshooting on iOS section: Obfuscated crash reports and Firebase Crashlytics SDK.