Comments (5)
Вышла сборка YandexMobileAds динамическим фреймворком. Можно пробовать s.dependency 'YandexMobileAds/Dynamic'
. Если будут проблемы, просьба переоткрыть Issue.
from yandex-ads-sdk-ios.
В ближайших планах есть поддержка дистрибуции в качестве динамического фреймворка, мы работаем над этим.
from yandex-ads-sdk-ios.
В качестве временного решения я вручную сбилдил динамический фрэймворк YandexMobileAds
и подключил его как локальный под. Podspec пода:
Pod::Spec.new do |s|
s.name = "YandexMobileAds"
s.version = "2.5.0"
s.summary = "The Yandex Mobile Ads SDK provides mobile interfaces for Yandex Advertising Network"
s.homepage = "https://tech.yandex.ru/mobile-ads/"
s.license = { :type => 'PROPRIETARY', :file => 'LICENSE.txt' }
s.authors = { "Andrey Shender" => "[email protected]", "Kanstantsin Charnukha" => "[email protected]" }
s.platform = :ios, '6.0'
s.source = { :git => "https://github.com/yandexmobile/yandex-ads-sdk-ios.git", :tag => s.version.to_s}
s.ios.vendored_frameworks = 'YandexMobileAds.framework'
s.libraries = 'xml2'
s.dependency 'YandexMobileMetrica', '>= 2.5.1', '< 3.0.0'
s.frameworks = 'UIKit', 'Foundation', 'CoreTelephony', 'CoreLocation', 'CoreGraphics', 'CoreTelephony', 'AdSupport'
s.weak_frameworks = 'SafariServices'
s.requires_arc = true
end
Чтобы компилятор не ругался на импорты, также пришлось добавить в podfile основного проекта пост-инсталл хук:
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "MyPodThatDependsOnYandexMobileAds"
target.build_configurations.each do |config|
config.build_settings['FRAMEWORK_SEARCH_PATHS'] = '$(inherited) "${PROJECT_DIR}/../../YandexMobileAds"'
end
end
end
end
pod install
и компиляция проходят успешно, однако при запуске приложения выдается рантайм ошибка о том, что не найден фреймворк YandexMobileMetrica
.
dyld: Library not loaded: @rpath/YandexMobileMetrica.framework/YandexMobileMetrica
Referenced from: /Users/user/Library/Developer/CoreSimulator/Devices/3427651F-8BAB-4D05-98C4-A605DEE264E5/data/Containers/Bundle/Application/D6EB8CE9-4D4A-44AD-8E98-0C7B1F0CA3D6/MyApp.app/Frameworks/YandexMobileAds.framework/YandexMobileAds
Reason: image not found
Если просмотреть содержимое package приложения, то его там действительно нет.
При этом если на данном этапе добавить YandexMobileMetrica
как embedded framework в основное приложение, в рантайме возникает куча новых ошибок про дублирующиеся символы:
objc[69366]: Class PodYandexMobileMetrica_PodsDummy_YXStartupParameters is implemented in both /Users/user/Library/Developer/CoreSimulator/Devices/3427651F-8BAB-4D05-98C4-A605DEE264E5/data/Containers/Bundle/Application/32F9AAB4-7ECF-4FAA-8357-0CF5B0810354/MyApp.app/Frameworks/YandexMobileMetrica.framework/YandexMobileMetrica (0x1221b49b0) and /Users/user/Library/Developer/CoreSimulator/Devices/3427651F-8BAB-4D05-98C4-A605DEE264E5/data/Containers/Bundle/Application/32F9AAB4-7ECF-4FAA-8357-0CF5B0810354/MyApp.app/MyApp (0x10c5ece10). One of the two will be used. Which one is undefined.
Может быть, у вас есть какие-то идеи относительно того, как это победить и нормально настроить зависимости?
from yandex-ads-sdk-ios.
Для решения проблемы из первого сообщения можно попробовать что-то такое:
pre_install do |installer|
def installer.verify_no_static_framework_transitive_dependencies; end
end
Однако проблема дублирования в рантайме может сохраниться.
Попробуйте в Вашей кастомной спеке указать динамический фреймворк AppMetrica:
s.dependency 'YandexMobileMetrica/Dynamic', '>= 2.6.5', '< 3.0.0'
И можно подробнее, как Вы собрали динамический фреймворк из статической библиотеки?
from yandex-ads-sdk-ios.
Указание динамической версии YandexMobileMetrica
помогло.
Фрэймворк собирал вторым методом, описанным здесь: https://pewpewthespells.com/blog/convert_static_to_dynamic.html. Любопытно, что я Яндексом это сработало, а с GoogleMobileAds — нет, все так же ругается на transitive dependencies that include static binaries.
from yandex-ads-sdk-ios.
Related Issues (20)
- YandexMobileAds 6.2.0 SPM integration. Не работает показ interstitial ad, всегда падает в ошибку "Incorrect fullscreen view." HOT 3
- 6.3.0 fails to build with Objective-C. HOT 6
- Прерывается воспроизведение аудио из-за видеорекламы HOT 4
- Interstitial ad error to show. HOT 4
- Креши из-за использования UIGraphicsBeginImageContext в iOS 17 HOT 6
- Multiple commands produce 'PrivacyInfo.xcprivacy' HOT 2
- При установке сразу же ошибка! Zip3Sequence HOT 18
- Проблема сборки на не ARM машинах. HOT 5
- SwiftUI Support HOT 3
- When the AD is displayed, the console reports an error (interstitial,banner) HOT 2
- Добрый день, куча ошибок HOT 1
- Добрый день, куча ошибок HOT 13
- Upload Archive Error HOT 4
- Не отрабатывают методы делегата YMANativeAdDelegate HOT 3
- Ограничение рекламы по возрасту HOT 2
- YMANativeBulkAdLoader возвращает массив одинаковых YMANativeAd HOT 3
- Как интегрировать в SwiftUI проект ? HOT 2
- В Package.swift дважды дублируется linkedFramework("WebKit") HOT 2
- На версии 7.0.0 при вызове loadImages() у NativeAd краш HOT 2
- Duplicate interface definition for class 'AMAArrayIterator' in 7.0.1 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yandex-ads-sdk-ios.