yandex-ads-sdk-ios icon indicating copy to clipboard operation
yandex-ads-sdk-ios copied to clipboard

Duplicate interface definition for class 'AMAArrayIterator' in 7.0.1

Open Lerg opened this issue 10 months ago • 4 comments

I've tried the new version today to see if it builds with the Defold game engine. There is progress.

First of all, if I specify in the Podfile just pod 'YandexMobileAds', '7.0.1' the project wouldn't compile with an error

The abstract target Pods is not inherited by a concrete target, so the following dependencies won't make it into any targets in your project:
    - YandexMobileAds (= 7.0.1)

But that error disappears if I also add pod 'YandexMobileAdsMediation', '7.0.1' to the Podfile.

However there is a new issue during the compilation process about AMAArrayIterator:

In file included from CocoaPodsService/Pods/AppMetricaHostState/AppMetricaHostState/Sources/AMAHostStatePublisher.m:2:
In file included from CocoaPodsService/Pods/AppMetricaHostState/AppMetricaHostState/Sources/AMAHostStatePublisher.h:1:
In file included from CocoaPodsService/Pods/AppMetricaCoreUtils/AppMetricaCoreUtils/Sources/include/AppMetricaCoreUtils/AppMetricaCoreUtils.h:3:
CocoaPodsService/Pods/AppMetricaCoreUtils/AppMetricaCoreUtils/Sources/include/AppMetricaCoreUtils/AMAArrayIterator.h:8:1: error: duplicate interface definition for class 'AMAArrayIterator'
@interface AMAArrayIterator : NSObject <AMAResettableIterable>
^
CocoaPodsService/Pods/AppMetricaCoreUtils/AppMetricaCoreUtils/Sources/include/AppMetricaCoreUtils/AMAArrayIterator.h:8:12: note: previous definition is here
@interface AMAArrayIterator : NSObject <AMAResettableIterable>
           ^
1 error generated.

	at com.defold.extender.Extender.buildEngine(Extender.java:2173)
	at com.defold.extender.Extender.build(Extender.java:2552)
	at com.defold.extender.AsyncBuilder.asyncBuildEngine(AsyncBuilder.java:115)
	at com.defold.extender.AsyncBuilder$$FastClassBySpringCGLIB$$3a887347.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
	at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115)
	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.io.IOException: clang: warning: argument unused during compilation: '-stdlib=libc++' [-Wunused-command-line-argument]
In file included from CocoaPodsService/Pods/AppMetricaHostState/AppMetricaHostState/Sources/AMAHostStatePublisher.m:2:
In file included from CocoaPodsService/Pods/AppMetricaHostState/AppMetricaHostState/Sources/AMAHostStatePublisher.h:1:
In file included from CocoaPodsService/Pods/AppMetricaCoreUtils/AppMetricaCoreUtils/Sources/include/AppMetricaCoreUtils/AppMetricaCoreUtils.h:3:
CocoaPodsService/Pods/AppMetricaCoreUtils/AppMetricaCoreUtils/Sources/include/AppMetricaCoreUtils/AMAArrayIterator.h:8:1: error: duplicate interface definition for class 'AMAArrayIterator'
@interface AMAArrayIterator : NSObject <AMAResettableIterable>
^
CocoaPodsService/Pods/AppMetricaCoreUtils/AppMetricaCoreUtils/Sources/include/AppMetricaCoreUtils/AMAArrayIterator.h:8:12: note: previous definition is here
@interface AMAArrayIterator : NSObject <AMAResettableIterable>

Lerg avatar Apr 18 '24 18:04 Lerg

Спасибо за Ваше обращение, для разбора создана задача с номером PCODESUP-3161. Мы ознакомимся и вернемся с ответом в течение 2 дней, возможно запросим дополнительную информацию.

Thank you for your message, a task with the number PCODESUP-3161 has been created for analysis. We will get acquainted and return with the answer within 2 days, we may request additional information.

mobile-ads-github avatar Apr 18 '24 21:04 mobile-ads-github

Can you provide a sample of your Podfile?

mobile-ads-github avatar Apr 22 '24 12:04 mobile-ads-github

@mobile-ads-github Sure, here it is

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

Lerg avatar Apr 22 '24 13:04 Lerg

Can yoy try specifying the to exact target (not top level definition) with use_frameworks! :linkage => :static setting?

Something like:

target '<your_target>' do
  use_frameworks! :linkage => :static
  pod 'YandexMobileAds', '7.0.1'
  pod 'YandexMobileAdsMediation', '7.0.1'
end

mobile-ads-github avatar Apr 22 '24 13:04 mobile-ads-github

Turns out it's a problem with the game engine build system.

Lerg avatar Apr 27 '24 16:04 Lerg