Milan Surelia
Milan Surelia

Reputation: 1076

Flutter iOS Build Error - framework image_picker not found

I have added v0.8.5 of image_picker library in my project.

I have tried following things to solve the issue:

Deleted podfile.lock & Pods folder from iOS Directory
Deleted pubspec.lock file from Project Directory
pod deintegrate
flutter clean
flutter pub get
pod install

While building the project in iOS,It throws following error

ld: framework not found image_picker
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Can anyone provide a solution to this?

Upvotes: 4

Views: 3099

Answers (3)

Антон Чуев
Антон Чуев

Reputation: 1

Open Runner.xcodeproj/project.pbxproj and change image_picker to image_picker_ios in all places.

Upvotes: 0

user3475581
user3475581

Reputation: 149

Due to the latest update, which includes migration of image_picker to Android and iOS federation packages, the naming convention of the iOS package has changed from "image_picker" to "image_picker_ios".

Solution:

Just make sure that in xcode, your app's project and target linker flags are set from "image_picker" to "image_picker_ios".

  1. Navigate to xcode project, and then build settings
  2. Find section Linking and then Other linking flags.
  3. Change flag -framework "image_picker" to -framework "image_picker_ios"

Important: changes must be applied to both project and target linker flags.

Upvotes: 3

aqibGenk
aqibGenk

Reputation: 151

for me change to image_picker: 0.8.0 after that,

  1. flutter clean,
  2. flutter pub get
  3. cd ios
  4. pod deintegrate; pod install

Upvotes: 3

Related Questions