pod spec lint编译时报error: include of non-modular header inside framework module

使用编译检查命令:pod spec lint BITBluetoothEntity.podspec --sources='http://192.168.1.156:8888/bitinfo_tech_ios/BitInfoTechSpec.git,https://github.com/CocoaPods/Specs.git' --verbose
BITBluetoothEntity.podspec文件依赖库:

s.frameworks = 'UIKit', 'Foundation'
s.dependency 'BITFDCategories'
s.dependency 'BITCommonUnitKeys'
s.dependency 'BITYYKit'
s.dependency 'YYCategories'
s.dependency 'FMDB'
s.dependency 'MJExtension'
s.dependency 'BITAESCryptUtils'
s.dependency 'ReactiveCocoa', '~> 2.5'

编译报错部分:

    - ERROR | [iOS] xcodebuild:  /Users/jiaguoshang/Library/Developer/Xcode/DerivedData/App-domhveplqxcmftbyroldcufbprbx/Build/Products/Release-iphonesimulator/BITBluetoothEntity/BITBluetoothEntity.framework/Headers/BITBluetoothReceive.h:18:9: error:
    - NOTE  | [iOS] xcodebuild:  error: include of non-modular header inside framework module 'BITBluetoothEntity.TimeRsp': '/Users/jiaguoshang/Library/Developer/Xcode/DerivedData/App-domhveplqxcmftbyroldcufbprbx/Build/Products/Release-iphonesimulator/BITAESCryptUtils/BITAESCryptUtils.framework/Headers/NSData+Add.h' [-Werror,-Wnon-modular-include-in-framework-module]
    - ERROR | xcodebuild:  /Users/jiaguoshang/Library/Developer/Xcode/DerivedData/App-domhveplqxcmftbyroldcufbprbx/Build/Products/Release-iphonesimulator/BITBluetoothEntity/BITBluetoothEntity.framework/Headers/RspResponse.h:13:9: error: include of non-modular header inside framework module 'BITBluetoothEntity.RspResponse': '/Users/jiaguoshang/Library/Developer/Xcode/DerivedData/App-domhveplqxcmftbyroldcufbprbx/Build/Products/Release-iphonesimulator/BITYYKit/BITYYKit.framework/Headers/YYThreadSafeDictionary.h' [-Werror,-Wnon-modular-include-in-framework-module]
    - ERROR | xcodebuild:  /Users/jiaguoshang/Library/Developer/Xcode/DerivedData/App-domhveplqxcmftbyroldcufbprbx/Build/Products/Release-iphonesimulator/BITBluetoothEntity/BITBluetoothEntity.framework/Headers/Transmission.h:11:9: error: include of non-modular header inside framework module 'BITBluetoothEntity.Transmission': '/Users/jiaguoshang/Library/Developer/Xcode/DerivedData/App-domhveplqxcmftbyroldcufbprbx/Build/Products/Release-iphonesimulator/BITYYKit/BITYYKit.framework/Headers/YYThreadSafeArray.h' [-Werror,-Wnon-modular-include-in-framework-module]
    - NOTE  | [iOS] xcodebuild:  fatal error: could not build module 'BITBluetoothEntity'
    - ERROR | [iOS] xcodebuild:  /Users/jiaguoshang/Library/Developer/Xcode/DerivedData/App-domhveplqxcmftbyroldcufbprbx/Build/Products/Release-iphonesimulator/BITBluetoothEntity/BITBluetoothEntity.framework/Headers/BITJsWebEntity.h:10:9: error: include of non-modular header inside framework module 'BITBluetoothEntity.BITJsWebEntity': '/Users/jiaguoshang/Library/Developer/Xcode/DerivedData/App-domhveplqxcmftbyroldcufbprbx/Build/Products/Release-iphonesimulator/BITCommonUnitKeys/BITCommonUnitKeys.framework/Headers/BITCommonUnitKeys.h' [-Werror,-Wnon-modular-include-in-framework-module]
    - ERROR | [iOS] xcodebuild:  /Users/jiaguoshang/Library/Developer/Xcode/DerivedData/App-domhveplqxcmftbyroldcufbprbx/Build/Products/Release-iphonesimulator/BITBluetoothEntity/BITBluetoothEntity.framework/Headers/BLELockInfo.h:12:9: error: include of non-modular header inside framework module 'BITBluetoothEntity.BLELockInfo': '/Users/jiaguoshang/Library/Developer/Xcode/DerivedData/App-domhveplqxcmftbyroldcufbprbx/Build/Products/Release-iphonesimulator/BITYYKit/BITYYKit.framework/Headers/YYThreadSafeArray.h' [-Werror,-Wnon-modular-include-in-framework-module]
    - ERROR | [iOS] xcodebuild:  /Users/jiaguoshang/Library/Developer/Xcode/DerivedData/App-domhveplqxcmftbyroldcufbprbx/Build/Products/Release-iphonesimulator/BITBluetoothEntity/BITBluetoothEntity.framework/Headers/MessageEntity.h:11:9: error: include of non-modular header inside framework module 'BITBluetoothEntity.MessageEntity': '/Users/jiaguoshang/Library/Developer/Xcode/DerivedData/App-domhveplqxcmftbyroldcufbprbx/Build/Products/Release-iphonesimulator/BITAESCryptUtils/BITAESCryptUtils.framework/Headers/NSString+Hex.h' [-Werror,-Wnon-modular-include-in-framework-module]
    - ERROR | [iOS] xcodebuild:  /Users/jiaguoshang/Library/Developer/Xcode/DerivedData/App-domhveplqxcmftbyroldcufbprbx/Build/Products/Release-iphonesimulator/BITBluetoothEntity/BITBluetoothEntity.framework/Headers/Rsp.h:11:9: error: include of non-modular header inside framework module 'BITBluetoothEntity.Rsp': '/Users/jiaguoshang/Library/Developer/Xcode/DerivedData/App-domhveplqxcmftbyroldcufbprbx/Build/Products/Release-iphonesimulator/BITAESCryptUtils/BITAESCryptUtils.framework/Headers/NSString+Hex.h' [-Werror,-Wnon-modular-include-in-framework-module]
    - ERROR | [iOS] xcodebuild:  /Users/jiaguoshang/Library/Developer/Xcode/DerivedData/App-domhveplqxcmftbyroldcufbprbx/Build/Products/Release-iphonesimulator/BITBluetoothEntity/BITBluetoothEntity.framework/Headers/BITBluetoothReceive.h:18:9: error: include of non-modular header inside framework module 'BITBluetoothEntity.BITBluetoothReceive': '/Users/jiaguoshang/Library/Developer/Xcode/DerivedData/App-domhveplqxcmftbyroldcufbprbx/Build/Products/Release-iphonesimulator/BITCommonUnitKeys/BITCommonUnitKeys.framework/Headers/BITCommonUnitKeys.h' [-Werror,-Wnon-modular-include-in-framework-module]
    - ERROR | [iOS] xcodebuild:  /Users/jiaguoshang/Library/Developer/Xcode/DerivedData/App-domhveplqxcmftbyroldcufbprbx/Build/Products/Release-iphonesimulator/BITBluetoothEntity/BITBluetoothEntity.framework/Headers/TimeRsp.h:10:9: error: include of non-modular header inside framework module 'BITBluetoothEntity.TimeRsp': '/Users/jiaguoshang/Library/Developer/Xcode/DerivedData/App-domhveplqxcmftbyroldcufbprbx/Build/Products/Release-iphonesimulator/BITAESCryptUtils/BITAESCryptUtils.framework/Headers/NSData+Add.h' [-Werror,-Wnon-modular-include-in-framework-module]
    - NOTE  | [iOS] xcodebuild:  /var/folders/4y/m9ckznh17111xdfwvn7xg0w40000gn/T/CocoaPods-Lint-20190228-23879-ihbwb1-BITBluetoothEntity/App/main.m:3:9: fatal error: could not build module 'BITBluetoothEntity'

Analyzed 1 podspec.

[!] The spec did not pass validation, due to 10 errors and 44 warnings.

原因很简单在后面加上--use-libraries在执行就可以了。完整的命令是:BITBluetoothEntity.podspec --sources='http://192.168.1.156:8888/bitinfo_tech_ios/BitInfoTechSpec.git,https://github.com/CocoaPods/Specs.git' --verbose --use-libraries
有告警可以使用-allow-warnings忽略。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值