extender icon indicating copy to clipboard operation
extender copied to clipboard

Can't build YandexMobileAds for iOS

Open Lerg opened this issue 1 year ago • 1 comments

Yandex released a new version of their SDK, plus Defold has been updated so I tried building again with Defold 1.9.1 beta and YandexMobileAds 7.1.1

It still doesn't build but the error message has changed, now it complains about iOS SDK version not being at least 13, however it is set to be so in the Podfile:

platform :ios, '13.0'
pod 'YandexMobileAds', '7.1.1'
pod 'YandexMobileAdsMediation', '7.1.1'

Thee new error:

/var/folders/pf/6r_png356xb4lby2dkvym42r0000gn/T/job9582903447976259256/CocoaPodsService/Pods/DivKit/DivKit/Views/DivBlockProvider.swift:77:5: error: concurrency is only available in iOS 13.0.0 or newer
  ) async {
    ^
/var/folders/pf/6r_png356xb4lby2dkvym42r0000gn/T/job9582903447976259256/CocoaPodsService/Pods/DivKit/DivKit/Views/DivBlockProvider.swift:74:8: note: add @available attribute to enclosing instance method
  func setSource(
       ^

Full build log log.txt.zip

The same result with bob.jar

Lerg avatar Jul 12 '24 11:07 Lerg

I really hope for a fix for this problem :( here my Podfile with updated version adapters for Yandex 7.2.0:

platform :ios, '13.0'
pod 'YandexMobileAds', '7.2.0'
pod 'AppLovinYandexMobileAdsAdapters', '12.5.0.2'
pod 'IronSourceYandexMobileAdsAdapters', '8.1.0.2'
pod 'MintegralYandexMobileAdsAdapters', '7.6.7.0'

and error logs: log.txt

TinyDobbins avatar Jul 23 '24 14:07 TinyDobbins

I'm looking into this again.

concurrency is only available in iOS 13.0.0 or newer

It seems like we have a hardcoded iOS min version of 11.0. We should override this somehow, possibly based on what is specified in the Podfile, or what individual Podspecs define, or what the user has in Info.plist

britzl avatar Aug 06 '24 10:08 britzl

I think it should work similar way it works on android: We specify it in game.project, it's end up in AndroidManifest.xml, when dependencies resolved it build and if version specified in game.project lower that requested by dependencies it throws an error.

AGulev avatar Aug 07 '24 10:08 AGulev

maybe I'm doing something wrong, but I'm getting this issue during building iOS: WARNING: Plist adding value for key 'MinimumOSVersion': '13.0'

simple project repo case: test_yandex.zip

log file: log.txt.zip

build in: image

also attach the podfiles: works, but very outdated version of YandexMobileAds 6.1.0:

platform :ios, '13.0'
pod 'YandexMobileAds', '6.1.0'
pod 'AppLovinYandexMobileAdsAdapters', '11.11.3.1'
pod 'IronSourceYandexMobileAdsAdapters', '7.5.0.1'
pod 'MintegralYandexMobileAdsAdapters', '7.4.7.0'

the next version that does not compile on is YandexMobileAds 6.2.0: (also in repo case project)

platform :ios, '13.0'
pod 'YandexMobileAds', '6.2.0'
pod 'AppLovinYandexMobileAdsAdapters', '11.11.4.0'
pod 'IronSourceYandexMobileAdsAdapters', '7.5.1.0'
pod 'MintegralYandexMobileAdsAdapters', '7.4.7.1'

the current version (it would be a magic if it worked) is YandexMobileAds 7.5.1:

platform :ios, '13.0'
pod 'YandexMobileAds', '7.5.1'
pod 'AppLovinYandexMobileAdsAdapters', '12.6.1.2'
pod 'IronSourceYandexMobileAdsAdapters', '8.3.0.2'
pod 'MintegralYandexMobileAdsAdapters', '7.6.9.3'

update: tested in build-stage.defold.com also

TinyDobbins avatar Sep 27 '24 07:09 TinyDobbins

Are you using a local extender and not the official one? The above fix has not been released yet.

britzl avatar Sep 27 '24 08:09 britzl

There is an error at the end of the log about duplicate PrivacyInfo.xcprivacy files:

com.defold.extender.ExtenderException: java.nio.file.FileAlreadyExistsException: /var/folders/2b/mpxyl1m54jvg2rcs2cnbsqxc0000gn/T/job11407296211102993347/build/resources/PrivacyInfo.xcprivacy
	at com.defold.extender.Extender.buildEngine(Extender.java:2219)
	at com.defold.extender.Extender.build(Extender.java:2587)
	at com.defold.extender.AsyncBuilder.asyncBuildEngine(AsyncBuilder.java:116)
	at jdk.internal.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:354)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
	at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:113)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.nio.file.FileAlreadyExistsException: /var/folders/2b/mpxyl1m54jvg2rcs2cnbsqxc0000gn/T/job11407296211102993347/build/resources/PrivacyInfo.xcprivacy
	at java.base/sun.nio.fs.UnixCopyFile.copy(UnixCopyFile.java:573)
	at java.base/sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:257)
	at java.base/java.nio.file.Files.copy(Files.java:1305)
	at com.defold.extender.Extender.buildPods(Extender.java:955)
	at com.defold.extender.Extender.buildEngine(Extender.java:2190)
	... 14 more

britzl avatar Sep 27 '24 08:09 britzl

oh, I saw the issue is “closed,” so I thought I'd test it. I use only official build.defold.com and build-stage.defold.com servers.

TinyDobbins avatar Sep 27 '24 08:09 TinyDobbins

oh, I saw the issue is “closed,” so I thought I'd test it. I use only official build.defold.com and build-stage.defold.com servers.

I understand. But the duplicate PrivacyInfo.xcprivacy is new.

britzl avatar Sep 30 '24 09:09 britzl

Also note that from YandexMobileAds 6.2.0 you need an updated ext.manifest with Swift enabled:

name: "YandexSdkAds"

platforms:
    android:
        context:
            aaptExtraPackages: ['com.yandex.android', 'com.yandex.android.mobileads', 'com.yandex.mobile', 'com.yandex.mobile.ads', 'com.yandex.mobile.ads.imp', 'androidx.viewpager2', 'androidx.annotation', 'androidx.core', 'androidx.recyclerview', 'androidx.appcompat', 'androidx.transition', 'androidx.collection', 'androidx.appcompat.resources']

    ios:
        context:
            flags: ['-fcxx-modules', '-fmodules', '-fobjc-weak', '-Wno-module-import-in-extern-c']
            linkFlags:  ['-ObjC', '-Wl,-rpath,/usr/lib/swift', '-Wl,-rpath,@executable_path/Frameworks']
            libs:       ['swiftCompatibility51', 'swiftCompatibility50']

britzl avatar Oct 17 '24 07:10 britzl

@britzl thanks a lot for this fix!

for all other users of this extension: it is now possible to use a fresh version YandexMobileAds 7.2.0 !

platform :ios, '13.0'
pod 'YandexMobileAds', '7.2.0'
pod 'YandexMobileAdsAdMobAdapters'
pod 'AppLovinYandexMobileAdsAdapters'
pod 'IronSourceYandexMobileAdsAdapters'
pod 'MintegralYandexMobileAdsAdapters'

TinyDobbins avatar Oct 17 '24 07:10 TinyDobbins

Defold 1.9.5 not building IOS

ERROR: defold-spine/ext.manifest:42: 'AM com.defold.manifestmergetool.InfoPlistMerger mergePlists
WARNING: Plist adding value for key 'MinimumOSVersion': '13.0''

ERROR: defold-spine/ext.manifest:1: '1 duplicate symbols'

ERROR: defold-spine/ext.manifest:42: 'AM com.defold.manifestmergetool.InfoPlistMerger mergePlists
WARNING: Plist adding value for key 'MinimumOSVersion': '13.0''

ext.manifest podfile log.zip

osov avatar Dec 13 '24 10:12 osov

this is old closed issue if you have a new problem - open a new issue

AGulev avatar Dec 13 '24 16:12 AGulev