pod spec lint编译时报The 'Pods-App' target has transitive dependencies that include static binaries错误问题

本文解决了一个在使用CocoaPods编译检查私有组件时遇到的错误,该错误涉及到第三方静态库的依赖。通过增加--use-libraries参数,成功解决了目标依赖静态库的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

执行:pod spec lint BITPayManager.podspec --sources='http://192.168.1.156:8888/bitinfo_tech_ios/BitInfoTechSpec.git,https://github.com/CocoaPods/Specs.git' --verbose进行对BITPayManager.podspec进行编译检查时报错误:

-> Installing UMengUShare (6.4.8)
  > Copying UMengUShare from `/Users/jiaguoshang/Library/Caches/CocoaPods/Pods/Release/UMengUShare/6.4.8-7a0ab` to
  `../../../../../private/var/folders/4y/m9ckznh17111xdfwvn7xg0w40000gn/T/CocoaPods-Lint-20190124-26672-139s7ur-BITPayManager/Pods/UMengUShare`
  - Running pre install hooks
 -> BITPayManager (0.0.4)
    - ERROR | [iOS] unknown: Encountered an unknown error (The 'Pods-App' target has transitive dependencies that include static binaries: (/private/var/folders/4y/m9ckznh17111xdfwvn7xg0w40000gn/T/CocoaPods-Lint-20190124-26672-139s7ur-BITPayManager/Pods/BITPaylibraryManager/BITPaylibraryManager/aliPay/Frameworks/AlipaySDK.framework and /private/var/folders/4y/m9ckznh17111xdfwvn7xg0w40000gn/T/CocoaPods-Lint-20190124-26672-139s7ur-BITPayManager/Pods/BITPaylibraryManager/BITPaylibraryManager/llPay/Frameworks/libPaySdkColor.a)

它的意思是,你在做私有组件时使用了第三的静态库。
我遇到这个问题,瞎折腾了半天才搞定。
解决方案在编译或检查时增加:--use-libraries
如:pod spec lint BITPayManager.podspec --sources='http://192.168.1.156:8888/bitinfo_tech_ios/BitInfoTechSpec.git,https://github.com/CocoaPods/Specs.git' --allow-warnings --use-librariespod repo push BitInfoTechSpec BITPayManager.podspec --sources='http://192.168.1.156:8888/bitinfo_tech_ios/BitInfoTechSpec.git,https://github.com/CocoaPods/Specs.git' --allow-warnings --use-libraries

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值