2

I finished up my small flutter app, where I am using a webview (webview_flutter: ^0.3.5+3). All works great on simulator.

I have run flutter build iOS --release, selected runner from targets and set it to generic iOS device.

Now I want to archive it in Xcode but I keep getting this error about "Library not found for -lwebview_flutter"

I can't seem to find a solution and would really appreciate some help

enter image description here

GY22
  • 755
  • 2
  • 17
  • 48
  • Sometimes I've seen it where things go wrong with the pod install. Try cleaning the build directory first (`flutter clean`), then `flutter build ios` (ignore a failure here), then cd ios/ and `pod install`, then open xcode and try archive. Hopefully that works for you! And an fyi - I recently removed it, but I have been able to archive the webview flutter library in the past... – rmtmckenzie Apr 15 '19 at 21:22
  • @rmtmckenzie I did as you suggested but still getting the error... its driving me mad – GY22 Apr 15 '19 at 21:42
  • 1
    oh when you opened the xcode project did you open the .xcproject or the .xcworkspace? You have to open the .xcworkspace. – rmtmckenzie Apr 15 '19 at 22:05
  • @GY22 Any resolution on this? I am getting a very similar error – Jordan May 01 '19 at 21:48
  • Posting in case anyone comes across this. What worked for me was opening the .xcworkspace ***instead*** of the .xcproject file. From here - https://stackoverflow.com/a/40530866/1183321 – Jordan May 02 '19 at 12:38
  • @Jordan I'm doing that now, but `archive` is disabled and I want that. How did you fix that? – Loolooii Jun 07 '19 at 14:30
  • @Jordan never mind, I had to choose `Generic iOS Device`. Thanks for this – Loolooii Jun 07 '19 at 14:31
  • @GY22 I think you can update your library on folder `your_project/ios>` `pod install` or `pod install --repo-update` – Anwar Dec 30 '21 at 06:32

1 Answers1

0

If you're using Flutter plugins that installed Pods in the iOS build, make sure that you've opened the Xcode project with .xcworkspace

If that still didn't work, you can try regenerating the iOS build folder by deleting the /ios folder and run flutter create --platforms=ios to generate project files for the iOS build.

Omatt
  • 8,564
  • 2
  • 42
  • 144