错误信息
CocoaPods' output: ↳ Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Finding Podfile changes
- Flutter
- barcode_scan2
Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `barcode_scan2` from `.symlinks/plugins/barcode_scan2/ios`
Resolving dependencies of `Podfile`
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: all_pods_versions_0_2_a.txt exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/5.0.11/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: all_pods_versions_4_a_9.txt exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/1.19.0/SwiftProtobuf.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/5.0.11/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/1.19.0/SwiftProtobuf.podspec.json exists! Returning local because checking is only performed in repo update
Comparing resolved specification to the sandbox manifest
- Flutter
- MTBBarcodeScanner
- SwiftProtobuf
- barcode_scan2
Downloading dependencies
-> Using Flutter (1.0.0)
-> Using MTBBarcodeScanner (5.0.11)
-> Using SwiftProtobuf (1.19.0)
-> Using barcode_scan2 (0.0.1)
- Running pre install hooks
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod `barcode_scan2` depends upon `MTBBarcodeScanner`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/xcode/target_validator.rb:151:in `verify_swift_pods_have_module_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/xcode/target_validator.rb:40:in `validate!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:597:in `validate_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:163:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
- Error running pod install
- Error launching application on iPhone 13.
解决方法
在 Podfile文件中加入如图所示代码即可解决
发布时间:2022.05.17