Coder Social home page Coder Social logo

Comments (18)

mobile-ads-github avatar mobile-ads-github commented on August 18, 2024

Попробуйте выставить BUILD_LIBRARY_FOR_DISTRIBUTION=NO для DivKit. Примеры можно посмотреть в #175 здесь и здесь.

from yandex-ads-sdk-ios.

mobile-ads-github avatar mobile-ads-github commented on August 18, 2024

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

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

from yandex-ads-sdk-ios.

canitakeyourecode avatar canitakeyourecode commented on August 18, 2024

#198 (comment)

Указывал в под файле при установке не помогло

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'DivKit' # Убедитесь, что это правильное имя фреймворка
      target.build_configurations.each do |config|
        config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'NO'
      end
    end
  end
end

Даже если выставляю руками ни чего не меняется.

И тут такое дело у меня скрипт есть и я собираю свой SDK в framework

from yandex-ads-sdk-ios.

mobile-ads-github avatar mobile-ads-github commented on August 18, 2024

Эта ошибка происходит не при компиляции DivKit, а при компиляции ее транзитивных зависимостей, а именно: VGSL_Fundamentals_tiny. Необходимо выключить BUILD_LIBRARY_FOR_DISTRIBUTION для его и зависимостей. В этом комментарии есть пример кода, который необходимо добавить.

Если интересует быстрый вариант, то

pod_targets_for_disable_build_for_distribution = [
     'VGSL_Fundamentals_tiny', # сюда необходимо будет добавлять имена тех библиотек, в которых появляется подобная ошибка
]

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

from yandex-ads-sdk-ios.

canitakeyourecode avatar canitakeyourecode commented on August 18, 2024

Добавил в pod

pod_targets_for_disable_build_for_distribution = [
  'VGSLBaseTiny-framework',
  'VGSL_Fundamentals_tiny',
  'VGSL_Fundamentals_Tiny-framework',
  'VGSLBase-framework',
  'VGSL_Fundamentals-framework'
# сюда необходимо будет добавлять имена тех библиотек, в которых появляется подобная ошибка
]

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

Вот что ловлю:

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 LayoutKitInterface.UIElementPath.__derived_struct_equals(LayoutKitInterface.UIElementPath, LayoutKitInterface.UIElementPath) -> Swift.Bool", referenced from:
generic specialization <serialized, LayoutKitInterface.UIElementPath> of Swift.__RawDictionaryStorage.find(_: A, hashValue: Swift.Int) -> (bucket: Swift.HashTable.Bucket, found: Swift.Bool) in YandexMobileAds[arm64]1238
generic specialization <serialized, LayoutKitInterface.UIElementPath> of Swift.__RawDictionaryStorage.find(
: A, hashValue: Swift.Int) -> (bucket: Swift.HashTable.Bucket, found: Swift.Bool) in YandexMobileAds[arm64]1238
generic specialization <serialized, LayoutKitInterface.UIElementPath> of Swift.__RawDictionaryStorage.find(
: A, hashValue: Swift.Int) -> (bucket: Swift._HashTable.Bucket, found: Swift.Bool) in YandexMobileAds[arm64]1238
"static LayoutKit.LayoutTrait.__derived_enum_equals(LayoutKit.LayoutTrait, LayoutKit.LayoutTrait) -> Swift.Bool", referenced from:
static MACDivKit.AdDivCustomBlock.== infix(MACDivKit.AdDivCustomBlock, MACDivKit.AdDivCustomBlock) -> Swift.Bool in YandexMobileAds[arm64]1228
static MACDivKit.AdDivCustomBlock.== infix(MACDivKit.AdDivCustomBlock, MACDivKit.AdDivCustomBlock) -> Swift.Bool in YandexMobileAds[arm64]1228
protocol witness for static Swift.Equatable.== infix(A, A) -> Swift.Bool in conformance MACDivKit.AdDivCustomBlockHeight : Swift.Equatable in MACDivKit in YandexMobileAds[arm64]1231
"LayoutKit.LayoutTrait.Weight.default.unsafeMutableAddressor : LayoutKit.LayoutTrait.Weight", referenced from:
MACDivKit.AdDivCustomBlock.weightOfVerticallyResizableBlock.getter : LayoutKit.LayoutTrait.Weight in YandexMobileAds[arm64]1228
MACDivKit.AdDivCustomBlockFactory.makeBlock(data: DivKit.DivCustomData, context: DivKit.DivBlockModelingContext) -> LayoutKit.Block in YandexMobileAds[arm64]1230
MACDivKit.AdDivMediaBlockProvider.customBlock(data: DivKit.DivCustomData, context: DivKit.DivBlockModelingContext) -> LayoutKit.Block in YandexMobileAds[arm64]1233
MACDivKit.AdDivMediaBlockProvider.(createAdDivMediaCustomBlockWithAspectRatio in _719DDAEF5CDAB47D91C118B7238F59F5)(adDivProperties: MACDivKit.AdDivProperties, data: [Swift.String : Any]) -> Swift.Result<MACDivKit.AdDivCustomBlock<MACDivKit.AdDivMediaBlockViewImpl>, MACDivKit.AdDivKitError> in YandexMobileAds[arm64]1233
MACDivKit.AdDivProgressBlockProvider.customBlock(data: DivKit.DivCustomData, context: DivKit.DivBlockModelingContext) -> LayoutKit.Block in YandexMobileAds[arm64]1235
"direct field offset for LayoutKit.UIActionEvent.uiAction : LayoutKitInterface.UserInterfaceAction", referenced from:
MACDivKit.DivKitViewActionHandlerImpl.(handleTrackAnalyticsAction in _055E83C6B5895B09B47CD531265F9EF8)(event: LayoutKit.UIActionEvent, actionUrl: Foundation.URL) -> () in YandexMobileAds[arm64]1254
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[arm64]1258
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

from yandex-ads-sdk-ios.

canitakeyourecode avatar canitakeyourecode commented on August 18, 2024

А это с чем связано ?
Как я понимаю компилятор не может найти определения некоторых символов, используемых в коде

from yandex-ads-sdk-ios.

Kabudasay avatar Kabudasay commented on August 18, 2024

?

from yandex-ads-sdk-ios.

Kabudasay avatar Kabudasay commented on August 18, 2024

так а ответ будет ?

from yandex-ads-sdk-ios.

Kabudasay avatar Kabudasay commented on August 18, 2024

А тут есть кто ?

from yandex-ads-sdk-ios.

mobile-ads-github avatar mobile-ads-github commented on August 18, 2024

Попробуйте повторить ответ из этого комментария:

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

  • pod_targets_for_disable_build_for_distribution должны включать ВСЕ транзитивные зависимости DivKit
  • явно указать use_frameworks! :linkage => :static

Лучше всего иметь скрипт, который по имени пода будет собирать все его транзитивные зависимости - и уже для них отключать 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',
]

from yandex-ads-sdk-ios.

Kabudasay avatar Kabudasay commented on August 18, 2024

не понимаю зачем мне явно указывать
use_frameworks! :linkage => :static

Ну а pod_targets_for_disable_build_for_distribution это не сработает так как я просто тупо его выключал для всего, я ж скинул вам пример на github

from yandex-ads-sdk-ios.

mobile-ads-github avatar mobile-ads-github commented on August 18, 2024

use_frameworks! :linkage => :static для удаления дублирования таргетов про проекте Pods вида: <target_name>-framework <target_name>-library.

Именно с этими изменениями ваш пример и был успешно собран.

from yandex-ads-sdk-ios.

Kabudasay avatar Kabudasay commented on August 18, 2024

Так я после собираю в framework скриптом

from yandex-ads-sdk-ios.

mobile-ads-github avatar mobile-ads-github commented on August 18, 2024

В чем разница сборки скриптом и через UI в Xcode?

from yandex-ads-sdk-ios.

Kabudasay avatar Kabudasay commented on August 18, 2024

Разница в том что что я собираю fat либу

from yandex-ads-sdk-ios.

mobile-ads-github avatar mobile-ads-github commented on August 18, 2024

Что включено в fat либу? Динамическая/статическая версия фрэймворка либо разные типы таргетов?

from yandex-ads-sdk-ios.

Kabudasay avatar Kabudasay commented on August 18, 2024

не не я собираю под arm и x86

from yandex-ads-sdk-ios.

mobile-ads-github avatar mobile-ads-github commented on August 18, 2024

По-итогу получилось ли собрать?

from yandex-ads-sdk-ios.

Related Issues (20)

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.