Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I fix this flutter iOS error in Xcode?

Tags:

xcode

ios

flutter

When I run the command "flutter build ios" - my app is built just fine. I can also run the app in the simulator. However, in Xcode, when I try to open the project, I get the error "unable to attach to DB: error: accessing build database"

This is the first time I've come across this problem on this app. Flutter doctor comes out clean, and nothing changes if I run "flutter clean" and build it again. I can't distribute my app until this is fixed.

like image 341
malayze Avatar asked Oct 20 '25 14:10

malayze


1 Answers

That happens at times when the iOS build gets corrupted for some reason.
Close Xcode.
Run flutter clean
After that flutter build ios
Open Xcode again and run your app.
This should generally solve your issue.

If that does not work, you can try this:

  1. flutter clean
  2. cd ios
  3. rm Podfile.lock
  4. rm -rf Pods
  5. pod deintegrate
  6. pod cache clean
  7. pod setup
  8. pod install

After that run flutter build ios

like image 199
Stefano Alvares Avatar answered Oct 22 '25 04:10

Stefano Alvares



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!