执行: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-libraries 和 pod 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