yandexmobile / yandex-ads-sdk-ios

Yandex Mobile Ads SDK iOS
https://yandex.com/dev/mobile-ads/
Other
37 stars 8 forks source link

Добрый день, куча ошибок #205

Closed canitakeyourecode closed 2 months ago

canitakeyourecode commented 3 months ago

https://github.com/canitakeyourecode/myproject

Цепляю вашу библиотеку в мой framework

Выношу поды за таргеты Предположим таргет YandexMobileAdsInstream Это фреймворк который подцеплен к таргету ProjectForYandexAdsDemo который является своего рода песочницей для фреймворка

pod 'GoogleAds-IMA-iOS-SDK' pod 'YandexMobileAdsInstream' target 'ProjectForYandexAdsDemo' do use_frameworks! end

target 'ProjectForYandexAds' do use_frameworks! end

Делаю pod install

Ловлю на сборке

Monosnap ProjectForYandexAds — ProjectForYandexAds xcworkspace 2024-03-18 16-37-11
ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
ld: warning: Could not find or use auto-linked framework 'MACAVPlayer': framework 'MACAVPlayer' not found
ld: warning: Could not find or use auto-linked framework 'MACAnalytics': framework 'MACAnalytics' not found
ld: warning: Could not find or use auto-linked framework 'MACBase': framework 'MACBase' not found
ld: warning: Could not find or use auto-linked framework 'MACBaseUI': framework 'MACBaseUI' not found
ld: warning: Could not find or use auto-linked framework 'MACCAChallengeHandler': framework 'MACCAChallengeHandler' not found
ld: warning: Could not find or use auto-linked framework 'MACConsent': framework 'MACConsent' not found
ld: warning: Could not find or use auto-linked framework 'MACConstants': framework 'MACConstants' not found
ld: warning: Could not find or use auto-linked framework 'MACDependenciesUmbrella': framework 'MACDependenciesUmbrella' not found
ld: warning: Could not find or use auto-linked framework 'MACDivKit': framework 'MACDivKit' not found
ld: warning: Could not find or use auto-linked framework 'MACEncryption': framework 'MACEncryption' not found
ld: warning: Could not find or use auto-linked framework 'MACEventTracking': framework 'MACEventTracking' not found
ld: warning: Could not find or use auto-linked framework 'MACFalseClickKit': framework 'MACFalseClickKit' not found
ld: warning: Could not find or use auto-linked framework 'MACFeatureFlags': framework 'MACFeatureFlags' not found
ld: warning: Could not find or use auto-linked framework 'MACHeaderBidding': framework 'MACHeaderBidding' not found
ld: warning: Could not find or use auto-linked framework 'MACLogging': framework 'MACLogging' not found
ld: warning: Could not find or use auto-linked framework 'MACMediation': framework 'MACMediation' not found
ld: warning: Could not find or use auto-linked framework 'MACMraid': framework 'MACMraid' not found
ld: warning: Could not find or use auto-linked framework 'MACNative': framework 'MACNative' not found
ld: warning: Could not find or use auto-linked framework 'MACNetworking': framework 'MACNetworking' not found
ld: warning: Could not find or use auto-linked framework 'MACPlatformDescription': framework 'MACPlatformDescription' not found
ld: warning: Could not find or use auto-linked framework 'MACSDKConfiguration': framework 'MACSDKConfiguration' not found
ld: warning: Could not find or use auto-linked framework 'MACStoreKit': framework 'MACStoreKit' not found
ld: warning: Could not find or use auto-linked framework 'MACTimeTracking': framework 'MACTimeTracking' not found
ld: warning: Could not find or use auto-linked framework 'MACVASTKit': framework 'MACVASTKit' not found
ld: warning: Could not find or use auto-linked framework 'MobileAdsCore': framework 'MobileAdsCore' not found
ld: warning: Could not find or use auto-linked framework 'YandexMobileAds_Private': framework 'YandexMobileAds_Private' not found
Undefined symbols for architecture arm64:
  "static LayoutKit.LayoutTrait.__derived_enum_equals(LayoutKit.LayoutTrait, LayoutKit.LayoutTrait) -> Swift.Bool", referenced from:
      static MACDivKit.AdDivCustomBlock.== infix(MACDivKit.AdDivCustomBlock<A>, MACDivKit.AdDivCustomBlock<A>) -> Swift.Bool in YandexMobileAds[1228](AdDivCustomBlock.o)
      static MACDivKit.AdDivCustomBlock.== infix(MACDivKit.AdDivCustomBlock<A>, MACDivKit.AdDivCustomBlock<A>) -> Swift.Bool in YandexMobileAds[1228](AdDivCustomBlock.o)
      protocol witness for static Swift.Equatable.== infix(A, A) -> Swift.Bool in conformance MACDivKit.AdDivCustomBlockHeight : Swift.Equatable in MACDivKit in YandexMobileAds[1231](AdDivCustomBlockHeight.o)
  "LayoutKit.LayoutTrait.Weight.default.unsafeMutableAddressor : LayoutKit.LayoutTrait.Weight", referenced from:
      MACDivKit.AdDivCustomBlock.weightOfVerticallyResizableBlock.getter : LayoutKit.LayoutTrait.Weight in YandexMobileAds[1228](AdDivCustomBlock.o)
      MACDivKit.AdDivCustomBlockFactory.makeBlock(data: DivKit.DivCustomData, context: DivKit.DivBlockModelingContext) -> LayoutKit.Block in YandexMobileAds[1230](AdDivCustomBlockFactory.o)
      MACDivKit.AdDivMediaBlockProvider.customBlock(data: DivKit.DivCustomData, context: DivKit.DivBlockModelingContext) -> LayoutKit.Block in YandexMobileAds[1233](AdDivMediaBlockProvider.o)
      MACDivKit.AdDivMediaBlockProvider.(createAdDivMediaCustomBlockWithAspectRatio in _719DDAEF5CDAB47D91C118B7238F59F5)(adDivProperties: MACDivKit.AdDivProperties, data: [Swift.String : Any]) -> Swift.Result<MACDivKit.AdDivCustomBlock<MACDivKit.AdDivMediaBlockViewImpl>, MACDivKit.AdDivKitError> in YandexMobileAds[1233](AdDivMediaBlockProvider.o)
      MACDivKit.AdDivProgressBlockProvider.customBlock(data: DivKit.DivCustomData, context: DivKit.DivBlockModelingContext) -> LayoutKit.Block in YandexMobileAds[1235](AdDivProgressBlockProvider.o)
  "direct field offset for LayoutKit.UIActionEvent.uiAction : LayoutKitInterface.UserInterfaceAction", referenced from:
      MACDivKit.DivKitViewActionHandlerImpl.(handleTrackAnalyticsAction in _055E83C6B5895B09B47CD531265F9EF8)(event: LayoutKit.UIActionEvent, actionUrl: Foundation.URL) -> () in YandexMobileAds[1254](DivKitViewActionHandler.o)
      generic specialization <MACDivKit.DivKitViewImpl> of function signature specialization <Arg[1] = Existential To Protocol Constrained Generic> of MACDivKit.DivKitViewActionHandlerImpl.handle(event: LayoutKit.UIActionEvent, divKitView: MACDivKit.DivKitView) -> () in YandexMobileAds[1258](DivViewWrapper.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Showing All Messages
Undefined symbol: static LayoutKit.LayoutTrait.__derived_enum_equals(LayoutKit.LayoutTrait, LayoutKit.LayoutTrait) -> Swift.Bool

Undefined symbol: LayoutKit.LayoutTrait.Weight.default.unsafeMutableAddressor : LayoutKit.LayoutTrait.Weight

Undefined symbol: direct field offset for LayoutKit.UIActionEvent.uiAction : LayoutKitInterface.UserInterfaceAction

Linker command failed with exit code 1 (use -v to see invocation)
canitakeyourecode commented 3 months ago

Так я уже пробывал не помогает !

pod_targets_for_disable_build_for_distribution = [
  'VGSLBaseTiny-framework',
  'VGSL_Fundamentals_tiny',
  'VGSL_Fundamentals_Tiny-framework',
  'VGSLBase-framework',
  'VGSL_Fundamentals-framework',
  'DivKit_LayoutKit-library',
  'DivKit_LayoutKitInterface-framework',
  'DivKit_LayoutKitInterface-library'
]

post_install do |installer|
  installer.pods_project.targets.each do |target|

    if pod_targets_for_disable_build_for_distribution.include?(target.name)
      target.build_configurations.each do |config|
        config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'NO'
      end
    end
  end

  installer.generated_projects.each do |project|
    project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = deployment_target
      end
    end

    project.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = deployment_target
    end

  end
end

Подскажите пути решения, тестовый проект я закинул на git что бы было проще разобраться https://github.com/canitakeyourecode/myproject

mobile-ads-github commented 3 months ago

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

Thank you for your message, a task with the number PCODESUP-3042 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 commented 3 months ago

В предоставленном примере отсувствует .xcodeproj файл, из-за чего не выполняется pod install

canitakeyourecode commented 3 months ago

Прошу прощения, поправил залил

canitakeyourecode commented 3 months ago

Подскажите получилось собрать ?

Kabudasay commented 2 months ago

?? сколько ждать ответа ?

mobile-ads-github commented 2 months ago

Добрый день! Мы изучаем проблему, вернемся с ответом на следующей неделе.

Kabudasay commented 2 months ago

О, спасибо ... ! Мне это тоже актуально

canitakeyourecode commented 2 months ago

Добрый вечер неделя уже вторая пошла

mobile-ads-github commented 2 months ago

Добрый вечер! Мы продолжаем работать над решением проблемы и обязательно сообщим вам, как только оно будет найдено.

mobile-ads-github commented 2 months ago

В Podfile необходимо указывать поды для тех таргетов, в которых их будете непосредственно использовать, а также:

Лучше всего иметь скрипт, который по имени пода будет собирать все его транзитивные зависимости - и уже для них отключать BUILD_LIBRARY_FOR_DISTRIBUTION, но как временное решение, можно указать все явно:

pod_targets_for_disable_build_for_distribution = [
  'DivKit',
  'DivKit_LayoutKit',
  'DivKit_LayoutKitInterface',
  'DivKit_Serialization',
  'VGSL_Fundamentals',
  'VGSL_Fundamentals_Tiny',
  'VGSLBase',
  'VGSLBaseTiny',
  'VGSLBaseUI',
  'VGSLCommonCore',
  'VGSLNetworking',
]
Полный дифф Podfile ```diff diff --git a/Podfile b/Podfile index 8872dc0..f057a42 100644 --- a/Podfile +++ b/Podfile @@ -7,26 +7,24 @@ deployment_target = '13.0' # This is work wersion ! #pod 'YandexMobileAdsInstream', '~> 0.11.0' -pod 'GoogleAds-IMA-iOS-SDK' -pod 'YandexMobileAdsInstream' - -target 'ProjectForYandexAdsDemo' do - use_frameworks! -end - target 'ProjectForYandexAds' do - use_frameworks! + use_frameworks! :linkage => :static + pod 'GoogleAds-IMA-iOS-SDK' + pod 'YandexMobileAdsInstream' end pod_targets_for_disable_build_for_distribution = [ - 'VGSLBaseTiny-framework', - 'VGSL_Fundamentals_tiny', - 'VGSL_Fundamentals_Tiny-framework', - 'VGSLBase-framework', - 'VGSL_Fundamentals-framework', - 'DivKit_LayoutKit-library', - 'DivKit_LayoutKitInterface-framework', - 'DivKit_LayoutKitInterface-library' + 'DivKit', + 'DivKit_LayoutKit', + 'DivKit_LayoutKitInterface', + 'DivKit_Serialization', + 'VGSL_Fundamentals', + 'VGSL_Fundamentals_Tiny', + 'VGSLBase', + 'VGSLBaseTiny', + 'VGSLBaseUI', + 'VGSLCommonCore', + 'VGSLNetworking', ] post_install do |installer| ```
Kabudasay commented 2 months ago

я сейчас это затестил вроде работает, но мне не понятно почему мы их уводим в статику

use_frameworks! :linkage => :static

mobile-ads-github commented 2 months ago

Из-за того, что в некоторых подспеках явно не указано static_framework, то будет использоваться разные типы. Сейчас у нас поддержан только static_framework, а у каких-то транзитивных зависимостей, возможно, dynamic.