最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

frameworks - objc[65200]: Class GoogleMobileAdsClass is implemented in both pathtolibrary and pathtoapp. One of the two will be

programmeradmin2浏览0评论

Getting this warning in the logs while importing my framework from Coocapods in a test app. The framework is with Google Mobile Ads dependency. When importing my framework through SPM it is working fine.

I have added this in the podsepc file.
spec.dependency 'Google-Mobile-Ads-SDK'

On removing this I am getting google mobile ads missing on building the test app after importing my framework. On inlcuding this in the podsepc getting the Duplicate warnings in the logs.

I have tried these three methods to import the google mobile ads dependency.
used swift package manager to import the google ads dependency. used Cocoapods to import the google ads dependency. used the GoogleMobileAds.xcframework file to import the dependency.

In the framework and libraries I have set the google dependency to “Do not embed”.

These are the commands I am using to create the build and .xcframework file of the framework.

xcodebuild archive -scheme "MyFramework" -destination "generic/platform=iOS" -configuration Release -archivePath "./build/iOS" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
xcodebuild archive -scheme "MyFramework" -destination "generic/platform=iOS Simulator" -configuration Release -archivePath "./build/iOSSimulator" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
xcodebuild -create-xcframework -framework "./build/iOS.xcarchive/Products/Library/Frameworks/MyFramework.framework" -framework "./build/iOSSimulator.xcarchive/Products/Library/Frameworks/MyFramework.framework" -output "./build/MyFramework.xcframework"

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论