I’m developing in Flutter from last 2 years and whenever I update my flutter version or xcode version, I encounter this issue. And everytime google comes to my rescue. As this issue is so common I decided I should put this here for me and all of us, in case I get any update I will update it here with latest fix.
Following is how i’m able to solve it till date:
So, as you know Cocoapods is dependency manager for Objective-C, same as npm for TypeScript. In earlier version it was issuing warning for users to define LANG in ~/.profile or ~/.zsrh, but it was a soft warning and users can ignore it.
But with recent versions like 1.11.2 its becoming more aggressive and wants LANG to be defined, otherwise failing to build for iOS. I found that if we install 1.10.2 version of Cocoapods this issue will be resolved 🙂
First step, uninstall current version of cocoapods
sudo gem uninstall cocoapods
Install specific 1.10.2 version of it
sudo gem install cocoapods:1.10.2
Exit and restart your IDE.
it should resolve it and your build should be successfull.
Way 2:
Update your .profile with necessary additions:
What works for me is to include following in .profile along with LANG
export LC_ALL=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_COLLATE=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
export LC_MESSAGES=en_US.UTF-8
export LC_MONETARY=en_US.UTF-8
export LC_NUMERIC=en_US.UTF-8
export LC_TIME=en_US.UTF-8
Delete podfile.lock
run following:
cd ios
pod deintegrate
Exit and Restart IDE. After restart run following
pod install
Write down in comments if nothing solves it, I will try to update this article to include other cases too.
Happy Coding 🙂
Sign up