When I tried to upgrade my Flutter app (running on Flutter 3.3) to Flutter 3.10, it keeps on giving an error. I upgraded all my dependency versions except for a few because they had some conflicts.
I'm running this code on my Apple Silicon M1 computer.
First, I followed this answer to fix the first error I faced:
File not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a
After this was done, that particular error disappeared, but the following error couldn't be solved.
../../../.pub-cache/hosted/pub.dev/_discoveryapis_commons-1.0.3/lib/src/resumable_media_uploader.dart:78:44:
Error: The method 'NullThrownError' isn't defined for the class 'ResumableMediaUploader'.
I tried many solutions including the obvious ones such as:
sudo gem uninstall cocoapods
brew install cocoapods
arch -x86_64 pod install
flutter clean
rm -Rf ios/Pods
rm ios/Podfile.lock
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec
But, none of these helped. I found a forum post saying that I should switch to XCode 14.3 Beta, but it still didn't solve the issue.
I cannot even find which dependency gives this error. So, how can I fix this?
[EDIT] I already fixed it and please see the answer.