skip to Main Content

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.

2

Answers


  1. 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

    Login or Signup to reply.
  2. This worked for me, after i run this command

    rm -rf ~/Library/Developer/Xcode/DerivedData/
    

    Then i rerun the app and it came to life.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search