I have project ios using flutter. And the build system are from terminal for flutter, flutter build system always failed because I have to set the Pods project for property "No Common Blocks" to NO. I can do it by open the xworkspace with XCode and edit there.
My question: is it possible to set this property on Podfile?
So I don't need to open XCode to build. Usually I use only XCode if I want to make release build and upload to App Store. For debug I always use flutter build system.
Solution 1: cbracken
Projects created with
flutter create all include debug and release
.xcconfig files, where you can override any Xcode setting.
To update the 'No common blocks' setting for your Flutter project, edit
ios/Flutter/Release.xcconfig and add the following line:
GCC_NO_COMMON_BLOCKS = NO
If you need to set it for the Pods project created by CocoaPods, CocoaPods includes the ability to register post-
pod install actions. You can add the following to your
Podfile to set the build setting in question:
post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['GCC_NO_COMMON_BLOCKS'] = 'NO' end end end