Coder Social home page Coder Social logo

yandex-ads-sdk-ios's Introduction

Yandex Advertising Network Mobile

This package contains Yandex Advertising Network Mobile SDK and source code of samples of SDK usage.

Documentation

Documentation could be found at the official website

License

EULA is available at EULA website

Quick start

Cocoapods

  1. Install CocoaPods to manage project dependencies, if you haven't done it yet.

  2. Go to Examples/YandexMobileAdsExample

  3. Install dependencies: pod install --repo-update

  4. Open the YandexMobileAdsExample.xcworkspace file with Xcode.

  5. Build and run.

Swift Package Manager

  1. Add package to your project

  2. Add -ObjC to OTHER_LDFLAGS

  3. Ensure that your target is linked binary with YandexMobileAdsPackge (Your target -> Build Phases -> Link Binary With Libraries)

  4. Add MobileAdsBundle.bundle from YandexMobileAds (Package Dependencies -> YandexMobileAdsPackage -> Referenced Binaries -> YandexMobileAds) to Copy Bundle Resource phase (Your target -> Build Phases -> Copy Bundle Resource)

  5. Build and run.

SKAdNetwork

File with a list of SKAdNetwork identifiers

yandex-ads-sdk-ios's People

Contributors

kried avatar mobile-ads-github avatar satsakul avatar yndx-anamak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yandex-ads-sdk-ios's Issues

Чёрный экран после жалобы на рекламу

Если во время показа YMARewardedAd кликнуть на (...) и на открывшемся экране "Пожаловаться на рекламу" указать причину, то на экране остаётся UITransitionView с YMARotatingFullscreenViewController и чёрным YMAMraidWebView внутри. При этом UI полностью блокируется.
Снимок экрана 2020-11-03 в 12 00 30
Simulator Screen Shot - iPhone SE (2nd generation) - 2020-11-03 at 11 57 51

Required assets "media" is not visible in ad view

При показе рекламы в режиме отладки появляется вот такое предупрежение, хотя по данным которые приходят в YMANativeAdAssets media = nil

assets YMANativeAdAssets 0x000000028085ee20
baseNSObject@0 NSObject
_feedbackAvailable bool true
_age id 0x0 0x0000000000000000
_body __NSCFString * "Онлайн премьера нового Audi Q7 в Ауди Центр Восток. Оставьте заявку." 0x0000000280b492c0
_callToAction id 0x0 0x0000000000000000
_closeButton id 0x0 0x0000000000000000
_domain __NSCFString * "stock.audi-vostok.ru" 0x00000002834be430
_favicon id 0x0 0x0000000000000000
_icon id 0x0 0x0000000000000000
_image YMANativeAdImage? 0x00000002834b8ed0
_media id 0x0 0x0000000000000000
_price id 0x0 0x0000000000000000
_rating id 0x0 0x0000000000000000
_reviewCount id 0x0 0x0000000000000000
_sponsored __NSCFString * "Яндекс.Директ" 0x0000000282f91f00
_title __NSCFString * "Audi Q7 в Ауди Центре Восток" 0x0000000281979450
_warning id 0x0 0x0000000000000000

При отображении другой рекламы такого же формата, но если есть warning предупреждения нет. Совпадение ?

Как понять и исправить Required assets "media" is not visible in ad view ?

No BitCode support in 2.8.3

All of a sudden :(

ld: bitcode bundle could not be generated because '-/Pods/YandexMobileAds/dynamic/YandexMobileAds.framework/YandexMobileAds' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '-/Pods/YandexMobileAds/dynamic/YandexMobileAds.framework/YandexMobileAds' for architecture arm64

ERROR ITMS-90535: Unexpected CFBundleExecutable Key

ERROR ITMS-90535: "Unexpected CFBundleExecutable Key. The bundle at 'Payload/xxx.app/YandexMobileAdsBundle.bundle' does not contain a bundle executable. If this bundle intentionally does not contain an executable, consider removing the CFBundleExecutable key from its Info.plist and using a CFBundlePackageType of BNDL. If this bundle is part of a third-party framework, consider contacting the developer of the framework for an update to address this issue."
Return status of iTunes Transporter was 1: ERROR ITMS-90535: "Unexpected CFBundleExecutable Key. The bundle at 'Payload/xxx.app/YandexMobileAdsBundle.bundle' does not contain a bundle executable. If this bundle intentionally does not contain an executable, consider removing the CFBundleExecutable key from its Info.plist and using a CFBundlePackageType of BNDL. If this bundle is part of a third-party framework, consider contacting the developer of the framework for an update to address this issue."
The call to the iTMSTransporter completed with a non-zero exit status: 1. This indicates a failure.

Началось после перехода с pod 'YandexMobileAds', '2.20.0' на '3.1.0'

Вопрос: Планируется ли сделать универсальный View/Binder для YMANativeGenericAd?

Привет
Я вижу в Android Yandex Ads SDK есть NativeAdViewBinder.Builder с помощью которого можно избавиться от NativeAppInstallAdView и NativeContentAdView.
В iOS есть YMANativeGenericAd но судя по примерам в репозитории, нужно все еще использовать YMANativeAppInstallAdView и YMANativeContentAdView. Планируется ли универсальный подход чтобы отказаться от конкретных view как уже сделано в Android SDK?

Не останавливаются запросы геолокации после удаления рекламного баннера

Предусловие:
разрешен доступ к геолокации при использовании приложения

Тесткейс:

  1. Отобразить экран с рекламой, появляется индикатор запросов геолокации в статус баре.
  2. Скрыть экран(удалить инстансы NativeContentAdView, NativeAppInstallAdView, YMANativeAdLoader), индикатор не исчезает.

Результат: геолокация запрашивается постоянно при работе приложения, даже если реклама уже не показывается.

Если засвизлить методы startUpdatingLocation и stopUpdatingLocation у CLLocationManger-а, то заметно, что stopUpdatingLocation не вызывается после деинита рекламы. В MemoryGraph видно, что существуют два инстанса CLLocationManger, но активно слушает геопозицию инстанс со следующим графом:

screen shot 2018-04-25 at 12 29 53

Также, метод startUpdatingLocation не является энергоэфеективным и, если на экране будет много рекламы(или она будет на всех экранах), то мы получим очень много запросов геолокации(это бесит пользователей). Возможно стоит перейти на метод startMonitoringSignificantLocationChanges или обновлять геолокацию по таймауту.

Label with NSAttributedStrings

Здравствуйте, ребят. Подскажите пожалуйста, мы используем нативную интеграцию SDK и судя по всему, bindContentAdToView:delegate:error: мапинтся на UILabel, и перезаписывает свойство text. А мы по дизайну используем attributeString. Посоветуйте, пожалуйста, наиболее легальную интеграцию.

Интеграция как статической библиотеки через CocoaPods

CocoaPods добавили возможность собирать поды на Swift не как фреймворки, а как статические библиотеки, что уменьшает время запуска приложения.
Для этого надо убрать use_frameworks! из podfile.

Но после этого возникают ошибки импорта библиотеки как модуля (import YandexMobileAds в swift файле). Could not build Objective-C module.
Причина - набор ошибок в umbrella заголовке типа Include of non-modular header inside framework module.
На мой взгляд, возможная причина - наличие в файлах YandexMobileAds.h, YandexMobileNativeAds.h, YandexMobileVASTAds.h импортов, которые уже добавлены ниже в в umbrella заголовке. К тому же импорты там идут через <>.

Workaround пока - импортировать под через bridging header главного проекта:

#pragma mark - YandexMobileAds

#import <YandexMobileAds/YandexMobileAds.h>
#import <YandexMobileAds/YandexMobileNativeAds.h>

Однако, хотелось бы использовать swift импорт как у остальных библиотек.

Ads in TableView (Impression could not be tracked)

Добрый день. Я использую стандартный пример YandexMobileAds для таблицы.
Если метод
[[YMANativeAdLoaderConfiguration alloc] initWithBlockID:@"R-M-DEMO-native-c" imageSizes:@[ kYMANativeImageSizeLarge ] loadImagesAutomatically:NO];
вызывается с параметром loadImagesAutomatically:NO то я вижу предупреждение:
com.yandex.mobile.ads.sdk[40598] <Warning>: Impression could not be tracked. Will attempt to track impression later. Error: Required asset is not visible in ad view: (null)

Насколько я понимаю, в таблицах не желательно использовать автоматическую загрузку имиджей. Загрузка происходит при показе ячейки.

Как сделать чтобы указанное сообщение не появлялось, либо можно ли его игнорировать без опасения, что показы не будут защитаны ?
Заранее спасибо!

yandexmobileads

Unable to parse constraint format exception

Fatal Exception: NSInvalidArgumentException
Unable to parse constraint format: Unable to interpret '|' character, because the related view doesn't have a superview V:[adView]| ^

Я понимаю, что возможно, мой navigationController.view в тот момент оказался nil, но ведь необязательно тогда крашить аппу.

ru.gdeposylka.delta_issue_30_crash_17b2c58b0f9f402eacbd568718b44e0d_ee1082e3684641c7b3d013923a848b08_0_v1.txt

class MenuController: UITableViewController {
    var bottomAdView: YMAAdView?
    private func setupAd() {
            let adSize = YMAAdSize.flexible()
            self.bottomAdView = YMAAdView(blockID: "R-M-201970-1", adSize: adSize, delegate: self)
            self.bottomAdView?.loadAd()
    }
}

extension MenuController: YMAAdViewDelegate {
    func adViewDidLoad(_ adView: YMAAdView!) {
       // log.debug("adViewDidLoad")
        if (adView == self.bottomAdView) {
            self.bottomAdView?.displayAtBottom(in: self.navigationController?.view)
        }
    }
    
    func adViewDidFailLoading(_ adView: YMAAdView!, error: Error!) {
      //  log.debug("Ad failed loading. Error: \(error.localizedDescription)")
    }
    
    func adViewWillLeaveApplication(_ adView: YMAAdView!) {
      //  log.debug("Ad will leave application")
    }
    
    func adViewWillPresentScreen(_ viewController: UIViewController!) {
      //  log.debug("Ad will present screen")
    }
    
    func adViewDidDismissScreen(_ viewController: UIViewController!) {
      //  log.debug("adViewDidAd did dismiss screenLoad")
    }
}

Будет ли засчиитан показ при таком рендере рекламы?

@kanstantsin Здравствуй, Костя.
Подскажи, пожалуйста, будет ли засчитан показ нативки при таком рендере, как на скине.
Так как тех.долг. не позволяет сделать ресайз ячейки под контент, а рекламное место бывает нужно больше. Можно ли сделать трункейт текста дабы уместить его в 2 строчки?

img_5746

SDK Release 5.0.0 dynamic

на текущий момент в SDK Release 5.0.0 есть папка static, а в релизе 4.2.2 есть папки и static и dynamic
можете для релиза 5.0.0 сделать также, очень нужно для биндирования к robovm
спасибо!

onShow callback

Добавьте, пожалуйста, коллбэк onShow() для YMAAdViewDelegate и YMANativeAdDelegate
Он нужен нам для медиации, чтобы вызвать соответствующий наш коллбэк в момент начала показа рекламы.

iOS 15 memory leak

I'm not sure if I'm right but I guess we have a memory leak on iOS 15

Screen Shot 2021-10-02 at 3 49 22 PM

"Banner returned by server is invalid" в VideoExample

Запускаем VideoExample.
В BlockViewController выпадаем в loaderDidFailLoadingVideoAdsWithError с ошибкой

VideoExample[20413:1070597] Failed loading. Error: Error Domain=com.yandex.mobile.YandexMobileAds Code=5 "Banner returned by server is invalid" UserInfo={NSLocalizedDescription=Banner returned by server is invalid}

Что-то где-то не так, или VideoExample не предполагает возврата реального YMAVASTAd объекта?

[YMANativeAdLoader loadAdWithRequestConfiguration] : невозможно указать значения age/ gender/ location в запросе

При попытке запросить нативную рекламу через [YMANativeAdLoader loadAdWithRequestConfiguration] невозможно указать age/ gender/ location/ parameters, тк. соответствующие проперти в YMANativeAdRequestConfiguration имеют тип 'readonly'.

Есть ли другие способы запросить Native рекламу/ передать вышеописанные параметры в рекламный запрос ?
Спасибо.

Target has transitive dependencies that include static binaries

Пытаюсь создать под (назовем его Foo), который должен зависеть от YandexMobileAds. В podspec указываю зависимость:

s.dependency 'YandexMobileAds'

Затем подключаю под к приложению:

pod 'Foo', :path => '../LocalPods/Foo'

При попытке сделать pod install возникает ошибка:

[!] The 'Pods-FooDemo' target has transitive dependencies that include static binaries: (<path-to-yandex>/YandexMobileAds/SDK/libYandexMobileAds.a)

Пытался обернуть либу в динамический фреймворк, как описано тут http://mrdekk.ru/2016/04/30/cocoapods-static-transitive-binary-dependencies/, но, видимо, делаю что-то не так. pod install проходит, но сам под Foo не билдится, жалуясь на то, что No such module YandexMobileAds

-adViewDidFailLoading:error: not called!

Method from YMAAdViewDelegate protocol adViewDidFailLoading: error: never called. I double check my integration. If banner is successfully loaded i get callback adViewDidLoad:, but if ad server return no content (see it in Charles) nothing happened.
Also I reproduce it on your demo app (from this repository)

Просмотры не засчитываются при отображении рекламы в списках, построенных на библиотеке IGListKit

IGListKit - open-source библиотека от Instagram для построения списков и коллекций в Swift. При интеграции Yandex Mobile Ads в список IGListKit в консоли отображается предупреждение:

<Warning>: Impression could not be tracked. Will attempt to track impression later. Error: Ad view is not visible for required percent

При этом реклама отображается корректно и полностью, сообщение "Ad binding successful" в логах не появляется.

Проект для воспроизведения проблемы:
yandex-iglistkit.zip

Размер YMAAdView

Возможно программно поменять размер(подогнать под размер ячейки) YMAAdView?

YMAInterstitialAd.load() UI API called on a background thread: WKUserScript

Здравствуйте. Хочу сообщить о ошибке вызова UI API.
Я тестирую:

  • Yandex Mobile Ads iOS SDK 4.1.2
  • Yandex Mobile Metrica 3.16.0
  • Xcode version 12.5
  • Device iPhone X iOS 14.5.1.

Во время вызова следующего кода из главного потока.

let view = YMAInterstitialAd(blockID: "R-M-DEMO-video-interstitial")
view.delegate = self
view.load()

Присходит ошибка:

=================================================================
Main Thread Checker: UI API called on a background thread: -[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]
PID: 5396, TID: 1438522, Thread name: (none), Queue name: com.yandex.mobile.ads.loading.scheduler, QoS: 0
Backtrace:
4   CASTestApp                          0x0000000103aa9f7c -[YMMJsInterfaceInitializer initWithExecutor:] + 116
5   CASTestApp                          0x0000000103a64df8 -[YMMYandexMetricaImpl initWithHostStateProvider:executor:] + 788
6   CASTestApp                          0x0000000103a41b34 __30+[YMMYandexMetrica sharedImpl]_block_invoke + 108
7   libdispatch.dylib                   0x0000000107ee5d90 _dispatch_client_callout + 20
8   libdispatch.dylib                   0x0000000107ee7948 _dispatch_once_callout + 136
9   CASTestApp                          0x0000000103a41ac4 +[YMMYandexMetrica sharedImpl] + 112
10  CASTestApp                          0x0000000103a45708 +[YMMYandexMetrica requestStartupIdentifiersWithCompletionQueue:completionBlock:] + 68
11  CASTestApp                          0x0000000103a0b700 -[YMAYandexMetricaWrapper requestIdentifiersWithCompletionQueue:completion:] + 56
12  CASTestApp                          0x0000000103977678 -[YMAMetricaIdentifiersProvider requestIdentifiersWithCompletionQueue:completion:] + 100
13  CASTestApp                          0x000000010395f590 -[YMAIdentifiersLoader loadIdentifiersWithCompletionQueue:completion:] + 316
14  CASTestApp                          0x00000001039ccf94 -[YMAPrefetchedRequestParametersProvider prefetchParametersWithCompletionQueue:completion:] + 208
15  CASTestApp                          0x000000010393ae10 -[YMAAdLoader requestIdentifiersWithHandler:builder:parser:validator:loadingPolicy:analyticsProvider:] + 416
16  CASTestApp                          0x000000010393ac04 __94-[YMAAdLoader runRequestWithBuilder:parser:validator:loadingPolicy:analyticsProvider:handler:]_block_invoke + 112
17  libdispatch.dylib                   0x0000000107ee4064 _dispatch_call_block_and_release + 32
18  libdispatch.dylib                   0x0000000107ee5d90 _dispatch_client_callout + 20
19  libdispatch.dylib                   0x0000000107eedea0 _dispatch_lane_serial_drain + 788
20  libdispatch.dylib                   0x0000000107eeecc4 _dispatch_lane_invoke + 444
21  libdispatch.dylib                   0x0000000107efba00 _dispatch_workloop_worker_thread + 1600
22  libsystem_pthread.dylib             0x00000001eb84a7a4 _pthread_wqthread + 276
23  libsystem_pthread.dylib             0x00000001eb85174c start_wqthread + 8
2021-05-28 14:11:59.903469+0300 CASTestApp[5396:1438522] [reports] Main Thread Checker: UI API called on a background thread: -[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]
PID: 5396, TID: 1438522, Thread name: (none), Queue name: com.yandex.mobile.ads.loading.scheduler, QoS: 0
Backtrace:
4   CASTestApp                          0x0000000103aa9f7c -[YMMJsInterfaceInitializer initWithExecutor:] + 116
5   CASTestApp                          0x0000000103a64df8 -[YMMYandexMetricaImpl initWithHostStateProvider:executor:] + 788
6   CASTestApp                          0x0000000103a41b34 __30+[YMMYandexMetrica sharedImpl]_block_invoke + 108
7   libdispatch.dylib                   0x0000000107ee5d90 _dispatch_client_callout + 20
8   libdispatch.dylib                   0x0000000107ee7948 _dispatch_once_callout + 136
9   CASTestApp                          0x0000000103a41ac4 +[YMMYandexMetrica sharedImpl] + 112
10  CASTestApp                          0x0000000103a45708 +[YMMYandexMetrica requestStartupIdentifiersWithCompletionQueue:completionBlock:] + 68
11  CASTestApp                          0x0000000103a0b700 -[YMAYandexMetricaWrapper requestIdentifiersWithCompletionQueue:completion:] + 56
12  CASTestApp                          0x0000000103977678 -[YMAMetricaIdentifiersProvider requestIdentifiersWithCompletionQueue:completion:] + 100
13  CASTestApp                          0x000000010395f590 -[YMAIdentifiersLoader loadIdentifiersWithCompletionQueue:completion:] + 316
14  CASTestApp                          0x00000001039ccf94 -[YMAPrefetchedRequestParametersProvider prefetchParametersWithCompletionQueue:completion:] + 208
15  CASTestApp                          0x000000010393ae10 -[YMAAdLoader requestIdentifiersWithHandler:builder:parser:validator:loadingPolicy:analyticsProvider:] + 416
16  CASTestApp                          0x000000010393ac04 __94-[YMAAdLoader runRequestWithBuilder:parser:validator:loadingPolicy:analyticsProvider:handler:]_block_invoke + 112
17  libdispatch.dylib                   0x0000000107ee4064 _dispatch_call_block_and_release + 32
18  libdispatch.dylib                   0x0000000107ee5d90 _dispatch_client_callout + 20
19  libdispatch.dylib                   0x0000000107eedea0 _dispatch_lane_serial_drain + 788
20  libdispatch.dylib                   0x0000000107eeecc4 _dispatch_lane_invoke + 444
21  libdispatch.dylib                   0x0000000107efba00 _dispatch_workloop_worker_thread + 1600
22  libsystem_pthread.dylib             0x00000001eb84a7a4 _pthread_wqthread + 276
23  libsystem_pthread.dylib             0x00000001eb85174c start_wqthread + 8

При этом экран зависает на несколько секунд.
После этого реклама успешно загружается и показывается.
Однако при нажатии по рекламе, для перехода их приложения к информации, ничего оне происходит. Возможно это только для тестового рекламного блока "R-M-DEMO-video-interstitial"

Podfile.lock file:

  - YandexMobileAds (4.1.2):
    - YandexMobileAds/Static (= 4.1.2)
  - YandexMobileAds/Static (4.1.2):
    - YandexMobileMetrica (< 4.0.0, >= 3.14.1)
  - YandexMobileMetrica (3.16.0):
    - YandexMobileMetrica/Static (= 3.16.0)
  - YandexMobileMetrica/Static (3.16.0):
    - YandexMobileMetrica/Static/Core (= 3.16.0)
    - YandexMobileMetrica/Static/Crashes (= 3.16.0)
  - YandexMobileMetrica/Static/Core (3.16.0)
  - YandexMobileMetrica/Static/Crashes (3.16.0):
    - YandexMobileMetrica/Static/Core

Случайный переход в сафари к st.yandexadexchange.net

Иногда рандомно открывается в сафари линк на st.yandexadexchange.net. На версии 1.9 обычно сопровождалось крашем вебкита

*** WebKit discarded an uncaught exception in the webView:didFinishLoadForFrame: delegate: <NSInternalInconsistencyException> NSDictionaryOfVariableBindings failed because either one of the values is nil, or there's something wrong with the way the macro is being invoked. Cannot assign value nil for key "webView". Keys:( webView )

на текущей beta1 краша в консоле уже вроде нет, но в сафари кидает

M1 Simulator support

Hello, are you planning to support M1 arm simulator in the future? Right now we can't run simulator builds on M1 Macs.

Macbook Air M1, Xcode 12.5, YandexMobileAds/Dynamic (4.3.0)

Screenshot 2021-08-01 at 16 13 03

YMANativeImageAd problem

Приходит реклама типа YMANativeImageAd, дальше идет кусок кода:

2017-11-07 12 05 43

YMANativeImageAdView добавляется на нужное место, в визуальном дебагинге в слоях видно что такая вьюха есть, но при этом на ней нет нужной картинки.

Так же проверил, что у YMANativeImageAdView imageView не пустой, как и image.
После того как срабатывает метод loadImages() метод делегата YMANativeAdImageLoadingObserver так же отлавливает завершение загрузки картинок, но картинка не появляется, сама вьюха YMANativeImageAdView не отлавливает тапы.
Вся нужная информация приходит, картинка и тестовый текст.
Binding с вьюхой проходит без ошибки, все ок.

Так же если просто добавить на экран imageView, который присвоили для YMANativeImageAdView, то нужная картинка рекламы отображается...

Подскажите пожалуйста, в чем может быть проблема?

YMAVisibilityErrorInfoView and MainThreadChecker issues

Hello.

Thanks for your awesome library. not so long ago we updated to latest (2.8.0) yandex-ads-sdk-ios version and gets following Main Thread Chekek warnings:

Main Thread Checker: UI API called on a background thread: -[UIView init]
Backtrace:
4   YandexMobileAds                     0x000000010b4cfb78 -[YMAVisibilityErrorViewFactory infoView] + 44
5   YandexMobileAds                     0x000000010b4cfdc8 -[YMAVisibilityErrorViewRenderer infoView] + 76
6   YandexMobileAds                     0x000000010b4d01b0 -[YMAVisibilityErrorViewRenderer hideView] + 36
7   YandexMobileAds                     0x000000010b4cf31c -[YMAVisibilityErrorIndicatorPresenter hideErrorIndicator] + 48
8   YandexMobileAds                     0x000000010b47f864 -[YMANativeAdPresenter unbind] + 264
9   YandexMobileAds                     0x000000010b47ef7c -[YMANativeAdPresenter dealloc] + 32
10  YandexMobileAds                     0x000000010b4997cc -[YMANativeContentAdBinder .cxx_destruct] + 56
Main Thread Checker: UI API called on a background thread: -[UIView initWithFrame:]
Backtrace:
4   YandexMobileAds                     0x000000010b4cf71c -[YMAVisibilityErrorInfoView initWithFrame:] + 44
5   YandexMobileAds                     0x000000010b4cfb78 -[YMAVisibilityErrorViewFactory infoView] + 44
6   YandexMobileAds                     0x000000010b4cfdc8 -[YMAVisibilityErrorViewRenderer infoView] + 76
7   YandexMobileAds                     0x000000010b4d01b0 -[YMAVisibilityErrorViewRenderer hideView] + 36
8   YandexMobileAds                     0x000000010b4cf31c -[YMAVisibilityErrorIndicatorPresenter hideErrorIndicator] + 48
9   YandexMobileAds                     0x000000010b47f864 -[YMANativeAdPresenter unbind] + 264
10  YandexMobileAds                     0x000000010b47ef7c -[YMANativeAdPresenter dealloc] + 32
11  YandexMobileAds                     0x000000010b4997cc -[YMANativeContentAdBinder .cxx_destruct] + 56
Main Thread Checker: UI API called on a background thread: -[UIView setHidden:]
Backtrace:
4   YandexMobileAds                     0x000000010b4d01cc -[YMAVisibilityErrorViewRenderer hideView] + 64
5   YandexMobileAds                     0x000000010b4cf31c -[YMAVisibilityErrorIndicatorPresenter hideErrorIndicator] + 48
6   YandexMobileAds                     0x000000010b47f864 -[YMANativeAdPresenter unbind] + 264
7   YandexMobileAds                     0x000000010b47ef7c -[YMANativeAdPresenter dealloc] + 32
8   YandexMobileAds                     0x000000010b4997cc -[YMANativeContentAdBinder .cxx_destruct] + 56
Main Thread Checker: UI API called on a background thread: -[UIView removeFromSuperview]
Backtrace:
4   YandexMobileAds                     0x000000010b4d0200 -[YMAVisibilityErrorViewRenderer hideView] + 116
5   YandexMobileAds                     0x000000010b4cf31c -[YMAVisibilityErrorIndicatorPresenter hideErrorIndicator] + 48
6   YandexMobileAds                     0x000000010b47f864 -[YMANativeAdPresenter unbind] + 264
7   YandexMobileAds                     0x000000010b47ef7c -[YMANativeAdPresenter dealloc] + 32
8   YandexMobileAds                     0x000000010b4997cc -[YMANativeContentAdBinder .cxx_destruct] + 56

Please, fix the issues as soon as possible.
Thanks in advance!

Не открывается YMAInterstitialAd контроллер в iOS 14

В методе делегата interstitialAdDidLoad после вызова presentFromViewController ничего не происходит в iOS 14. Тот же код для iOS 12 отрабатывает без проблем.

- (void)interstitialAdDidLoad:(YMAInterstitialAd *)interstitialAd {
    WS(weakSelf);
    [interstitialAd presentFromViewController:self dismissalBlock:^{
        [weakSelf startApp];
    }];
}

YMAAdView not called delegate methods

Hi,
I tried to integrate Yandex banner ad in my app. For testing I'm using "R-M-DEMO-320x50" block id.
After I called loadAd() func nothing happens, YMAAdViewDelegate methods haven't called.
What problem can be in my situation? A interstitial ad works fine!

                  let size = YMAAdSize.flexibleSize(with: view.frame.size)
                   self.banner = YMAAdView(blockID: self.getYMABannerIdAd(),
                                          adSize: size,
                                          delegate: self)    
                   banner!.loadAd()

YMAAdView autorefresh

Можно как то отключить для баннеров autorefresh так же как в андроид -( setAutoRefreshEnabled ) ?

YandexMobileAds 4.4.1 blocks the use of the new version of YandexMobileMetrica 4.0+

In our project, we use our own analytical framework, one of the analytical adapters of which is YandexMobileMetrica. Also, our product uses one of the advertising mediation libraries, which in turn uses YandexMobileAds. In order to use the newer version of YandexMobileMetrica (4.0.0 or higher), you need to update YandexMobileAds, because the latest version 4.4.1 sets a hard limit in the subspec file for the version of the YandexMobileMetrica library used "<4.0.0".

"YandexMobileMetrica": [
          ">= 3.14.1",
          "< 4.0.0"
        ]

image
Any feedback and progress on this issue will be very grateful. Thank you in advance.

Отображение рекламы в ячейки таблицы

При попытке отображения рекламы как ячейки в таблице, в лог падает предупреждение:
: Impression could not be tracked. Will attempt to track impression later. Error: Ad view is not visible for required percent
Я так понимаю что показ засчитан не будет ?

Crash с причиной '[UIScreen yma_size]: unrecognized selector sent to instance ...'

После обновления библиотеки до версии 5.0 приложение стало вылетать, причина на скриншоте. Происходит после создания объекта рекламы, причем не важно что я пытаюсь загрузить - баннер, или рекламу с вознаграждением.
self.rewardedAd = YMARewardedAd(adUnitID: ...).
Использую библиотеки след.версий:

 pod 'YandexMobileMetrica/Dynamic', '4.2.0'
 pod 'YandexMobileAds/Dynamic', '5.0.0'
 pod 'AdMobYandexMobileAdsAdapters/Dynamic', '9.0.0.0'
 pod 'FacebookYandexMobileAdsAdapters/Dynamic', '6.9.0.0'
 pod 'UnityAdsYandexMobileAdsAdapters/Dynamic', '4.0.0.0'

Снимок экрана 2022-04-01 в 16 02 20
.

YMAInterstitialController cannot be hidden programmatically

Я использую таймер для показа YMAInterstitialController, который помещаю поверх нового создаваемого UIWindow, чтобы использовать таймер для скрытия рекламы. Будет ли возможность скрыть программно данный контроллер? Или же данная реализация не допустима.
Сейчас я имею несколько вариантов как скрыть контроллер, но в стеке Windows не удаляются новые window и с каждым новым показом количество UIWindow в стеке увеличивается на 1

Can't load adFox banner.

@kanstantsin Костя спасай!
Пытаемся загрузить adFox банер черз нandex Ads sdk. делаем все по инструкции, демо запросик из примеров робит ок.
Но наши данные подставляем и банер ругается

Error load yandex banner: Error Domain=NSURLErrorDomain Code=-1005 "Сетевое соединение потеряно. 
UserInfo={NSUnderlyingError=0x170a57460 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "Сетевое соединение потеряно."
UserInfo={NSErrorFailingURLStringKey=https://mobile.yandexadexchange.net/v3/ad, NSErrorFailingURLKey=https://mobile.yandexadexchange.net/v3/ad, _kCFStreamErrorCodeKey=-4, _kCFStreamErrorDomainKey=4, NSLocalizedDescription=Сетевое соединение потеряно.}}, 
NSErrorFailingURLStringKey=https://mobile.yandexadexchange.net/v3/ad, NSErrorFailingURLKey=https://mobile.yandexadexchange.net/v3/ad, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-4, NSLocalizedDescription=Сетевое соединение потеряно.}

Что то мы не до настроили?

YandexMobileAds SDK 4.1.0 does not comply with App Review Guidelines

I have received a notice from App Store Review that my app is not compatible with guidelines and that I must submit an update within 14 days to avoid removal.

Guideline 2.5.1 - Performance - Software Requirements

We discovered that your app contains obfuscated code, selector mangling, or features meant to subvert the App Review process by changing this app's concept after approval to the App Store.
...
The next submission of this app may require a longer review time, and this app will not be eligible for an expedited review until this issue is resolved.
...
Submitting apps designed to mislead or harm customers or evade the review process may result in the termination of your Apple Developer Program account.
...
Your app uses or references the following non-public APIs:

_snapshotRect:intoImageOfWidth:completionHandler: 

The use of non-public APIs is not permitted on the App Store because it can lead to a poor user experience should these APIs change. 

Pseudo-code with selector mangling found in the SDK:

-[YMASnapshotMaker takeWebKitViewSnapshot:completion:] {
  NSString *obfuscatedString = @"==gOyVGbk5WYI52bpRXZsBXbvNmOoRHZpdlZPV2Zh1WSvRnbppDdjVmU09GazBXYuN3X";
  NSString *reversedString = [obfuscatedString reversedString:obfuscatedString];
  NSString *selectorString = [reversedString decodedStringFromBase64String:reversedString];
  SEL selector = NSSelectorFromString(selectorString);
  -[YMASnapshotMaker callSnapshotSelector:webView:completion]
}

Similar issue already happened in 2018:

Guideline 2.5.1: Apps may only use public APIs.

Next Steps

To resolve this issue, please either remove the Yandex SDK entirely from your app, or revise your app to utilize version 2.9.8 or 3.1.2 of the Yandex SDK.
Once you have made one of those changes, resubmit your binary for review.

Please remove private APIs asap. A public statement from Yandex would be also useful to speed up resolution process.

Ошибка Ad request failed with network error

Для rewarded video получаю ошибку даже на тестовом блоке @"R-M-DEMO-rewarded-client-side-rtb"
Что это значит? Или просто нет рекламы для этого региона?

Error Domain=com.yandex.mobile.YandexMobileAds Code=4 "Ad request failed with network error" UserInfo={NSLocalizedDescription=Ad request failed with network error, NSUnderlyingError=0x281569920 {Error Domain=com.yandex.mobile.YandexMobileAds Code=4 "Incorrect data in server response" UserInfo={NSLocalizedDescription=Incorrect data in server response, NSLocalizedFailureReason=Expected array, got: (
)}}}

dSYM teamcity .pcm

При сборке проекта в релизной конфигурации (с dSYM), много вот таких ворнингов в логе:

(arm64) could not find object file symbol for symbol _$sSo16UIViewControllerC14CommonCoreTinyE9showAlertyyAC0G5ModelVF
(arm64) could not find object file symbol for symbol _$sSo17UIAlertControllerCML

/Users/teamcity/buildAgent/work/c7c4b5d20e671c26/YandexMobileAds/DerivedData-iphonesimulator/ModuleCache.noindex/Q2ON55N5OAE2/TemplatesSupport-20J3ZMVW3JJ64.pcm: No such file or directory
/Users/teamcity/buildAgent/work/c7c4b5d20e671c26/YandexMobileAds/DerivedData-iphonesimulator/ModuleCache.noindex/Q2ON55N5OAE2/CoreFoundation-1I3ZUZGX3ZAWD.pcm: No such file or directory

CoreFoundation CFStringCreateFromExternalRepresentation

Reproduces oniOS version 8, 10
First issue on the 23rd of December

Crashlog

Crashed: NSOperationQueue 0x1c31f3b80 :: NSOperation 0x15a22a460 (QOS: DEFAULT)
SIGABRT ABORT 0x00000001815a7014
0  libsystem_kernel.dylib         0x1815a7014 __pthread_kill + 8
1  libsystem_pthread.dylib        0x18166f450 pthread_kill + 112
2  libsystem_c.dylib              0x18151b400 abort + 140
3  libsystem_malloc.dylib         0x1815eba5c _nano_vet_and_size_of_live + 330
4  libsystem_malloc.dylib         0x1815ed028 nano_realloc + 648
5  libsystem_malloc.dylib         0x1815df240 malloc_zone_realloc + 180
6  CoreFoundation                 0x182597958 __CFStringCreateImmutableFunnel3 + 692
7  CoreFoundation                 0x18252181c CFStringCreateFromExternalRepresentation + 104
8  Foundation                     0x183007f64 -[NSPlaceholderString initWithData:encoding:] + 148
9  YandexMobileAds                0x104ee2e74 -[YMABase64DataParser parsedResponseData:parsedHeaders:request:] + 284
10 YandexMobileAds                0x104f2f8cc -[YMAStringAdResponseParser parseResponse:data:request:parsedHeaders:error:] + 124
11 YandexMobileAds                0x104f01ffc -[YMANativeAdResponseParser parseResponse:data:request:parsedHeaders:error:] + 168
12 YandexMobileAds                0x104ed4a1c -[YMAAdLoaderRequestRunner handleResponse:data:request:error:] + 360
13 YandexMobileAds                0x104ed47d8 __31-[YMAAdLoaderRequestRunner run]_block_invoke + 80
14 CFNetwork                      0x182cb843c __67+[NSURLConnection sendAsynchronousRequest:queue:completionHandler:]_block_invoke_2 + 180
15 Foundation                     0x1830c7fb0 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16
16 Foundation                     0x18300caa8 -[NSBlockOperation main] + 96
17 Foundation                     0x182ffd0a4 -[__NSOperationInternal _start:] + 620
18 Foundation                     0x1830ca35c __NSOQSchedule_f + 228
19 libdispatch.dylib              0x1814621bc _dispatch_client_callout + 16
20 libdispatch.dylib              0x1814703dc _dispatch_queue_serial_drain + 928
21 libdispatch.dylib              0x1814659a4 _dispatch_queue_invoke + 652
22 libdispatch.dylib              0x18147234c _dispatch_root_queue_drain + 572
23 libdispatch.dylib              0x1814720ac _dispatch_worker_thread3 + 124
24 libsystem_pthread.dylib        0x18166b2a0 _pthread_wqthread + 1288
25 libsystem_pthread.dylib        0x18166ad8c start_wqthread + 4

Fabric keys:

CRASH_INFO_ENTRY_1
*** error for object 0x17ea62e00: pointer being reallocated was not allocated
CRASH_INFO_ENTRY_0
abort() called

Please, fix this

Ошибка в нативке "Error: Ad view is nil"

Добрый день!

Имеем такую ошибочку:

Jan 31 16:49:57 com.yandex.mobile.ads.sdk[26416] : Impression could not be tracked. Will attempt to track impression later. Error: Ad view is nil

Хотя, само объявление отображается корректно:
screen shot 2017-01-31 at 16 57 59

При этом объявление "не кликабельно" по всей области.

Подскажите пожалуйста куда копать?

Сообщения "Ad binding success" так же нету ([YAMobileAds enableLogging] вызвано в аппделегате), кстати еще вопрос, является ли это признаком того, что binding не успешен и просмотр не будет засчитан?

Прикручивал все на основе yandex-ads-sdk-ios/Examples/NativeExample

self.contentAdView = [[NativeContentAdView alloc] initWithFrame:CGRectZero];
self.contentAdView.translatesAutoresizingMaskIntoConstraints = NO;
self.contentAdView.backgroundColor = [UIColor whiteColor];

NSError * __autoreleasing error = nil;
[ad bindContentAdToView:self.contentAdView delegate:self error:&error];
NSLog(@"Binding finished with error: %@", error);

[self.contentAdView prepareForDisplay];

[self addSubview:self.contentAdView];
[self addConstraintsToAdView:self.contentAdView];

Спасибо заранее!

App crashes after calling presentInterstitial

Swift 3.0
YMAVersion 2.7.1.0
iPhone 5, 5s, 6, 6s
iOS 10.3.3

calling

if fullScreenBannerYandex?.loaded == true { fullScreenBannerYandex?.presentInterstitial(from: rootVC) }

Stable crash

back trace

  • thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x9160c1b0)
    frame #0: 0x1a40c694 libobjc.A.dylibobjc_retain + 4 frame #1: 0x2065b3c8 UIKit__39-[UIWindow _noteOverlayInsetsDidChange]_block_invoke_2 + 92
    frame #2: 0x20cc8f92 UIKit__51-[FBSScene(UIApp) updateUIClientSettingsWithBlock:]_block_invoke + 214 frame #3: 0x1ca204fa FrontBoardServices__46-[FBSSceneImpl updateClientSettingsWithBlock:]_block_invoke + 10
    frame #4: 0x1ca20546 FrontBoardServices-[FBSSceneImpl updateClientSettingsWithTransitionBlock:] + 54 frame #5: 0x1ca204ec FrontBoardServices-[FBSSceneImpl updateClientSettingsWithBlock:] + 78
    frame #6: 0x20cc8e90 UIKit-[FBSScene(UIApp) updateUIClientSettingsWithBlock:] + 108 frame #7: 0x2065b356 UIKit__39-[UIWindow _noteOverlayInsetsDidChange]_block_invoke + 144
    frame #8: 0x2061c982 UIKit_runAfterCACommitDeferredBlocks + 276 frame #9: 0x2060fc92 UIKit_cleanUpAfterCAFlushAndRunDeferredBlocks + 524
    frame #10: 0x203918bc UIKit_afterCACommitHandler + 112 frame #11: 0x1b127802 CoreFoundationCFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 20
    frame #12: 0x1b125a54 CoreFoundation__CFRunLoopDoObservers + 282 frame #13: 0x1b126016 CoreFoundation__CFRunLoopRun + 1358
    frame #14: 0x1b0791ae CoreFoundationCFRunLoopRunSpecific + 470 frame #15: 0x1b078fd0 CoreFoundationCFRunLoopRunInMode + 104
    frame #16: 0x1c823b40 GraphicsServicesGSEventRunModal + 80 frame #17: 0x20401a52 UIKitUIApplicationMain + 150
    • frame #18: 0x002313f4 Sport-swiftmain at AppDelegate.swift:17 frame #19: 0x1a8664ea libdyld.dylibstart + 2

Импорт сдк

Просьба в файл YandexMobileAds.h добавить:
#import <YandexMobileAds/YMAGender.h>

И странно, что нативка отдельно импортируется через YandexMobileNativeAds.h

Main thread checker issue (v2.7.2, Xcode 9.0)

Hello!

We use the latest version of your awesome framework (currently 2.7.2) but face an annoying issue with a main thread checker, which was introduced with Xcode 9 pretty long time ago.

I did not find a similar issue (which was a surprise for me). Sorry if this one is a duplicate...

The following frame interacts with UIKit from a background thread, which is not good and makes use of your library pretty annoying:
[UIScreen(YMAAdditions) yma_sizeForOrientation]

I'm not sure whether this one is the only case, but I assume it isn't.

This situation is a bit sad =).

Please, fix the issue as soon as possible.
Thanks in advance!

Проблемы с загрузкой СДК в странах которые блокируют yandex.net

Добрый день.
Я разработчик приложений которые монетизируются с помощью Yandex Ads во всем мире.
Однако я нахожусь и собираю свои приложения в Украине, используя местных интернет провайдеров.
К сожалению в моей стране yandex.net считается запрещенным ресурсом в интернете.

YandexMobileAds framework хранится на storage.mds.yandex.net ресурсе который тоже попадает под ограничения.
По этому когда я пытаюсь скачать framework, используя Cocoapods, у меня происходит ошибка:

Error installing YandexMobileAds
Transient problem: timeout
Could not resolve host: storage.mds.yandex.net

Могу ли я просить вас распространять YandexMobileAds SDK на других ресурсах? Например Github Releases.
Для этого достаточно прикрепить архив с SDK к релизу и указать ссылку в Podspec для новой версии в Cocoapods:

s.source = { 
  :http => "https://github.com/yandexmobile/yandex-ads-sdk-ios/releases/download/#{s.version}/YandexMobileAds.zip" 
}

Спасибо за понимание.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.