'Flutter error building for iOS "ld: framework not found"
I've been working for a few weeks on a Flutter app which I run on Android and iOS. It worked well until some days ago I upgraded the flutter version and some package dependencies, and it suddenly stopped building for iOS. There have been multiple issues I have managed to solve, but I can figure out this one. Now, each time I try to build the iOS app I get:
ld: framework not found package_info_plus
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've tried cleaning the project with flutter clean
and building again after performing a pub get, but it doesn't solve the issue. I don't depend directly on package_info_plus, but there is one of my packages which does.
I've also tried adding package_info_plus to my pub spec, but then I get the same error again with the package path_provider, which I'm already using.
I have search and try every solution, but nothing works. Could somebody help me?
In case it helps, here you have my pubspec.yaml:
name: app name
description: App description
version: 2.0.0+12
environment:
sdk: '>=2.12.0 <3.0.0'
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
shared_preferences: ^2.0.7
provider: ^6.0.0
http: ^0.13.3
device_info: ^2.0.2
progress_state_button: ^1.0.3
uuid: ^3.0.4
universal_platform: ^1.0.0+1
drift: ^1.0.0
sqlcipher_flutter_libs: ^0.5.0
path_provider: ^2.0.3
path: ^1.8.0
flutter_local_notifications: ^9.1.4
flutter_native_timezone: ^2.0.0
progress_dialog: ^1.2.4
url_launcher: ^6.0.10
flutter_slidable: ^1.1.0
tuple: ^2.0.0
get_it: ^7.2.0
local_auth: ^1.1.7
date_util: ^0.1.4
date_picker_timeline: ^1.2.3
intl: ^0.17.0
file_picker_cross: ^4.4.2
share_extend: ^2.0.0
flutter_svg: ^0.22.0
dev_dependencies:
flutter_test:
sdk: flutter
drift_dev: ^1.0.0
build_runner: ^2.0.4
flutter:
uses-material-design: true
And the output of flutter doctor -v
:
[✓] Flutter (Channel stable, 2.5.3, on macOS 12.0.1 21A559 darwin-arm, locale en-ES)
• Flutter version 2.5.3 at /Users/javierd/Android/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 18116933e7 (7 weeks ago), 2021-10-15 10:46:35 -0700
• Engine revision d3ea636dc5
• Dart version 2.14.4
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/javierd/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Users/javierd/Downloads/Android
Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 13.1, Build version 13A1030d
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• Android Studio at /Users/javierd/Downloads/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[✓] Connected device (3 available)
• iPhone 13 (mobile) • 8957D248-FB8E-4114-A3C1-E5DCF64FD39E • ios •
com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 12.0.1
21A559 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome
96.0.4664.55
• No issues found!
Thanks a lot in advance!
Solution 1:[1]
for me downgrade the package from the last version
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | aqibGenk |