Skip to content
This repository has been archived by the owner on Oct 10, 2020. It is now read-only.

iOS Build failed (static library) #235

Closed
ErrorCode-404 opened this issue May 7, 2020 · 14 comments
Closed

iOS Build failed (static library) #235

ErrorCode-404 opened this issue May 7, 2020 · 14 comments
Labels

Comments

@ErrorCode-404
Copy link

Describe the bug
The build for ios failed during pod install.

To Reproduce
Steps to reproduce the behavior:

  1. flutter build ios --debug

or

  1. Go to ios folder
  2. Run pod install

Logs

flutter build ios --debug
Building de.test.barcodetestapp for device (ios)...
Saved signing certificate "Apple Development: peter-tester@muellmail.com (XERLP9BHZ5)" is not a valid development certificate
Signing iOS app for device deployment using developer identity: "iPhone Developer: Peter Tester (V2WAJADCL7)"
Running pod install...                                              0,9s
CocoaPods' output:
↳
      Preparing

    Analyzing dependencies

    Inspecting targets to integrate
      Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

    Fetching external sources
    -> Fetching podspec for `Flutter` from `Flutter`
    -> Fetching podspec for `barcode_scan` from `.symlinks/plugins/barcode_scan/ios`

    Resolving dependencies of `Podfile`
      CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_0_2_a.txt exists! Returning local because checking is only perfomed 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 perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_4_a_9.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/1.8.0/SwiftProtobuf.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/1.8.0/SwiftProtobuf.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/1.7.0/SwiftProtobuf.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/1.6.0/SwiftProtobuf.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/1.5.0/SwiftProtobuf.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/1.4.0/SwiftProtobuf.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/1.3.1/SwiftProtobuf.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/1.3.0/SwiftProtobuf.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/1.2.0/SwiftProtobuf.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/1.1.2/SwiftProtobuf.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/1.1.1/SwiftProtobuf.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/1.1.0/SwiftProtobuf.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/1.0.3/SwiftProtobuf.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/1.0.2/SwiftProtobuf.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/1.0.1/SwiftProtobuf.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/1.0.0/SwiftProtobuf.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/0.9.905/SwiftProtobuf.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/0.9.904/SwiftProtobuf.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/0.9.903/SwiftProtobuf.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/4/a/9/SwiftProtobuf/0.9.24/SwiftProtobuf.podspec.json exists! Returning local because checking is only perfomed 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 perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/5.0.10/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/5.0.9/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/5.0.8/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/5.0.7/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/5.0.6/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/5.0.5/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/5.0.3/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/5.0.2/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/5.0.1/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/5.0.0/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/4.0.0/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/3.1.0/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/3.0.0/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/2.1.0/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/2.0.3/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/2.0.2/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/2.0.1/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.9.1/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.9.0/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.8.11/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.8.10/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.8.9/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.8.8/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.8.7/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.8.6/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.8.5/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.8.4/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.8.3/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.8.1/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.8.0/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.7.1/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.7.0/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.6.1/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.6.0/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.5.0/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.4.0/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.3.2/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.3.0/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.2.0/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/1.1.18/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/0.1.8/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/0.1.7/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/0.1.6/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/0.1.5/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/0.1.4/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/0.1.3/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/0.1.2/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/2/a/MTBBarcodeScanner/0.1.1/MTBBarcodeScanner.podspec.json exists! Returning local because checking is only perfomed in repo update

    Comparing resolved specification to the sandbox manifest
      A Flutter
      A MTBBarcodeScanner
      A SwiftProtobuf
      A barcode_scan

    Downloading dependencies

    -> Installing Flutter (1.0.0)

    -> Installing MTBBarcodeScanner (5.0.11)
      > Copying MTBBarcodeScanner from `/Users/ptester/Library/Caches/CocoaPods/Pods/Release/MTBBarcodeScanner/5.0.11-f453b` to `Pods/MTBBarcodeScanner`

    -> Installing SwiftProtobuf (1.8.0)
      > Copying SwiftProtobuf from `/Users/ptester/Library/Caches/CocoaPods/Pods/Release/SwiftProtobuf/1.8.0-2cbd9` to `Pods/SwiftProtobuf`

    -> Installing barcode_scan (0.0.1)
      - Running pre install hooks
    [!] The following Swift pods cannot yet be integrated as static libraries:

    The Swift pod `barcode_scan` 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.9.0/lib/cocoapods/installer/xcode/target_validator.rb:151:in `verify_swift_pods_have_module_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/installer/xcode/target_validator.rb:40:in `validate!'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/installer.rb:590:in `validate_targets'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/installer.rb:158:in `install!'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/command/install.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/command.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/bin/pod:55:in `<top (required)>'
    /usr/local/bin/pod:23:in `load'
    /usr/local/bin/pod:23:in `<main>'

Error running pod install

Environment (please complete the following information):

  • barcode_scan: ^3.0.0
  • Output of flutter --version:
Flutter 1.17.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision e6b34c2b5c (5 days ago) • 2020-05-02 11:39:18 -0700
Engine • revision 540786dd51
Tools • Dart 2.8.1
@AnruStander
Copy link

I have the same issue.

@devtronic
Copy link
Member

Please attache the ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings

@ErrorCode-404
Copy link
Author

Here is the WorkspaceSettings.xcsettings file:
WorkspaceSettings.xcsettings.zip

@devtronic
Copy link
Member

With Flutter 1.17 you need to remove this from your WorkspaceSettings.xcsettings

<key>BuildSystemType</key>
<string>Original</string>

@mhafizhasan
Copy link

With Flutter 1.17 you need to remove this from your WorkspaceSettings.xcsettings

<key>BuildSystemType</key>
<string>Original</string>

I'm having similar problem when issuing pod install

[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod `barcode_scan` 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.

By default my WorkspaceSettings.xcsettings doesn't contains

<key>BuildSystemType</key>
<string>Original</string>

I'm using barcode_scan: ^3.0.1

my environment:

Flutter 1.17.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f7a6a7906b (5 days ago) • 2020-05-12 18:39:00 -0700
Engine • revision 6bc433c6b6
Tools • Dart 2.8.2

@bhammer88
Copy link

The way I solved this is to delete the iOS folder content and regenerate as swift with the command

flutter create -i swift .

period included

@ErrorCode-404
Copy link
Author

The way I solved this is to delete the iOS folder content and regenerate as swift with the command

flutter create -i swift .

period included

Ok, I can confirm that this works now. Thanks. But if this plugin only works with swift support for ios there should be a hint on pub.dev for this plugin to avoid that other developers run into this issue.

@doanbh
Copy link

doanbh commented May 27, 2020

The way of me is add line:
use_modular_headers!
in the bottom of Podfile in ios folder

@StephanCassel
Copy link

Is this isue closed?
I just updated to 1.17.2 and got the same error.

@sdykae
Copy link

sdykae commented Jun 27, 2020

Help :(, same error

@StephanCassel
Copy link

@sdyalor
I cannot remember if it was this or another issue during the 1.17.2 upgrade that had to do with bridge header problem.
But take a look at this article:
https://github.com/ko2ic/image_downloader/wiki#your-appdelegate-is-the-case-of-objective-c

@zxhwyp
Copy link

zxhwyp commented Jul 9, 2020

i do solve this by add

use_frameworks!

under pod 'Flutter', :path => 'Flutter'

@Jbz797 Jbz797 mentioned this issue Jul 20, 2020
4 tasks
@LHMing01
Copy link

i do solve this by add

use_frameworks!

under pod 'Flutter', :path => 'Flutter'

i do not solve this by use this, my environment:

Flutter 1.17.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 8af6b2f038 (4 weeks ago) • 2020-06-30 12:53:55 -0700
Engine • revision ee76268252
Tools • Dart 2.8.4

@longer96
Copy link

longer96 commented Aug 5, 2020

+1
last
i do solve this by add
use_frameworks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests