[iOS] fix "user_lang" param in mopub ad request

This commit is contained in:
Aleksey Belouosv 2018-10-03 17:53:20 +03:00 committed by Daria Volvenkova
parent a7aa8e2f2d
commit 3d97cc514e

View file

@ -149,7 +149,7 @@ final class MopubBanner: NSObject, Banner {
let config = MPStaticNativeAdRenderer.rendererConfiguration(with: settings)!
request = MPNativeAdRequest(adUnitIdentifier: placementID, rendererConfigurations: [config])
let targeting = MPNativeAdRequestTargeting()
targeting.keywords = "user_lang:\(AppInfo.shared().twoLetterLanguageId)"
targeting.keywords = "user_lang:\(AppInfo.shared().twoLetterLanguageId ?? "")"
targeting.desiredAssets = [kAdTitleKey, kAdTextKey, kAdIconImageKey, kAdCTATextKey]
if let location = MWMLocationManager.lastLocation() {
targeting.location = location