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
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:
flutter clean
cd ios
rm Podfile.lock
rm -rf Pods
pod deintegrate
pod cache clean
pod setup
pod install
After that run
flutter build ios
This worked for me, after i run this command
Then i rerun the app and it came to life.