Flutter issues with Xcode 15
Xcode 15 upgrade turned a smooth-sailing app from Xcode 14 into a puzzling pain. The shift brought compatibility issues, rendering the once functional app a tangled challenge, prompting the question: why the upgrade in the first place?
The answer to this is being a developer you always love to try something new. I also did the same and was bombarded with problems by just changing the Xcode version.
Let’s address each issue one by one, discussing my solutions.
- Cocoapods error
Error (Xcode): DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS, use TOOLCHAIN_DIR instead
DT_TOOLCHAIN_DIR
error can be easily solved by just upgrading the cocoapods version to 1.13.0
.
Run this command to upgrade cocoapods
brew upgrade cocoapods
2. Cyclic dependency error
Error (Xcode): Cycle inside Runner; building could produce unreliable results.
This error is a bit trickier, it appears inconsistently, making it a bit of a puzzle to tackle.
To solve this in your Runner->Build Phases
, move your Run Script
below all your embeds:
This should fix the above error. You can find more details about this error here: https://developer.apple.com/forums/thread/730974
3. ‘Flutter/Flutter.h’ file not found
To solve this, run the below commands:
- In your Flutter application folder run
flutter clean
- Delete the build folder, if it exists.
- Run
pod deintegrate
in ios folder - Now run
flutter pub get
in your application folder - Run
pod install
in ios folder
Does this make any sense, I know it doesn’t but the error gets resolved.
If this doesn’t solve the problem, please add a response with the logs. I will try to help in solving it.
If you encounter any other problems, please share them in your responses. We’ll work on solving them collectively, and I’ll incorporate them into the list as well. Adiós!