🛠️Coming back to a Flutter project after not opening it for a while
Tags: flutter, beginners, dart, debug
Published: 2023-03-19 14:17:50

*This list will be proactively updated*

We have all come across this in the Flutter world. A project is not opened for some time and it is bound to have some breaking changes. 

Toolkit to the rescue! 

Here are some tips that have helped get flutter projects up and running again. 

## March 13th 2023 
🚨 `Unknown (turns out it is a pod issue)`
* delete Derived data
	* Open Runner
	* File
	* workspace settings
	* Derived data -> 
	* delete everything inside derived data *
- restart computer 
- flutter upgrade 

- [pod install?](https://stackoverflow.com/a/65459404) check [[Cocoapods]] -  [helped](https://github.com/simolus3/sqlite3.dart/issues/45#issuecomment-872044635)
	- sudo gem install cocoapods 
- Now there are breaking changes from third party libraries (drift) - figure those out 
	- -> ran `flutter pub run build_runner build`  and was able to regenerate the .g file, that was the issue 
RUNS! 

## March 30th 2023
🚨 `[Invalid depfile](https://stackoverflow.com/questions/60872753/invalid-depfile-flutter)`

fixed by deleting this import command 
`import 'dart:html';`
and running 
`flutter clean`
`flutter pub get`

## April 20th 2023 
🚨 `Could not find filename pubspec.yaml`
[fixed with these commands](https://stackoverflow.com/a/70107870/7842175)
seems to be an issue with my pubs cache 

Also, make sure you are running terminal commands from the root of your project


## June 13th 2024 - Signing certificate issues 
🚨`Uncategorized (Xcode): Command CodeSign failed with a nonzero exit code
Could not build the application for the simulator.
Error launching application on iPhone 15.`

- [delete expired certificates](https://github.com/flutter/flutter/issues/137485)
- [update bundle identifier and run from XCODE](https://stackoverflow.com/a/62099868/7842175)
can run on simulator from XCOde, but still will not run from VSCode, at this point. 
🧠 this tells me the Xcode configuration might be fine and the problem might lie with the VScode setup. 
I ran a fresh flutter project and got the following error message 

🚨 `Error (Xcode): Target debug_unpack_ios failed: Exception: Failed to codesign /Users/.../build/ios/Debug-iphonesimulator/Flutter.framework/Flutter with identity -.`

found [this post](https://stackoverflow.com/q/77207505/7842175) - seems issue might be that my file is in the cloud because I sync my folders to iCloud. 

Also, find [this GitHub issue](https://github.com/flutter/flutter/issues/133191) in the Flutter project.  

* I removed my projects folder from iCloud storage and now I am seeing this error message 

🚨 `CocoaPods not installed.` seems very promising. 
Installed pods and back at the very first error message

🚨 `Uncategorized (Xcode): Command CodeSign failed with a nonzero exit code Could not build the application for the simulator. Error launching application on iPhone 15.`

-> I used .nosync but [just found on Reddit](https://www.reddit.com/r/FlutterDev/comments/170j4qi/debug_unpack_ios_error_after_updating_xcode/?rdt=63522) that this option won't work. So I am trying out the Reddit option. 

🎊 Success!! I finally fixed it! 🎊

I moved my projects folder to the root of my computer, outside the watchful eye 👁️ of iCloud syncing. And finally my code runs! I have tested 2 different projects and they have all been fixed with this, so it seems we are good to go. 

This error code deserves a T-shirt or custom shoes!!