微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

pod spec lint 验证失败:无法为当前构建架构找到匹配的 .xcframework 切片 (x86_64 i386)

如何解决pod spec lint 验证失败:无法为当前构建架构找到匹配的 .xcframework 切片 (x86_64 i386)

我已经在 cocoapod 中有我的框架,使用 xcframework 和里面的几个框架: ios-arm64 ios-arm64_x86_64-maccatalyst ios-arm64_x86_64-模拟器 tvos-arm64 tvos-arm64_x86_64-模拟器

在我第一次推送时,我只将 s.ios.deployment_target 放在了 podspec 中,但忘记了 s.tvos.deployment_target。我编辑 podspec 文件(更新的 s.version 旧为 1.0.0,新为 1.0.0-tvOS,添加 s.tvos.deployment_target),提交并推送到 github,并创建一个与版本同名的标签

Pod::Spec.new do |s|
s.name             = 'projectSwift'
s.version          = '1.0.0-tvOS'
s.summary          = 'summ'
s.description      = 'descri'
s.homepage         = 'http://homepage.com'
s.license          = { :type => 'MIT',:file => 'LICENSE' }
s.author           = { 'author' => 'author@mmmail.com' }
s.source           = { :git => 'linktogit',:tag => s.version  }
s.vendored_frameworks = "projectSwift.xcframework"
s.ios.deployment_target = '10.2'
s.tvos.deployment_target = '9.0'
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
end

当我尝试 pod spec lint 时,它失败并显示错误

pod spec lint --no-clean

Ignoring ffi-1.13.1 because its extensions are not built. Try: gem pristine ffi --version 1.13.1

 -> projectSwift (1.0.0-tvOS)
    - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - NOTE  | xcodebuild:  note: Using new build system
    - NOTE  | xcodebuild:  note: Building targets in parallel
    - NOTE  | xcodebuild:  note: Using codesigning identity override: -
    - NOTE  | [iOS] xcodebuild:  note: Planning build
    - NOTE  | [iOS] xcodebuild:  note: Constructing build description
    - NOTE  | [iOS] xcodebuild:  warning: Skipping code signing because the target does not have an Info.plist file and one is not being generated automatically. (in target 'App' from project 'App')
    - NOTE  | [iOS] xcodebuild:  warning: [CP] Unable to find matching .xcframework slice in 'projectSwift/projectSwift.xcframework projectSwift framework ios-arm64 ios-arm64_x86_64-maccatalyst ios-arm64_x86_64-simulator' for the current build architectures (x86_64 i386).
    - NOTE  | xcodebuild:  ld: warning: directory not found for option '-F/Users/adminlocal/Library/Developer/Xcode/DerivedData/App-bmhifwqmbbcfjnftngtmnjgbwkek/Build/Products/Release-iphonesimulator/XCFrameworkIntermediates/projectSwift'
    - NOTE  | xcodebuild:  clang: error: linker command Failed with exit code 1 (use -v to see invocation)

Pods workspace available at `/var/folders/_b/5v6y69j55cs0c_3fcw0cf5m80000gp/T/CocoaPods-Lint-20210316-13156-1ipai8f-projectSwift/App.xcworkspace` for inspection.

Analyzed 1 podspec.

[!] The spec did not pass validation,due to 1 error.

除了 podspec 之外,我没有修改任何其他内容

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。