Running testmode in iOS simulator device in local FlutterFlow client throws CocoaPods error, podfile getting overwritten during test run

Troubleshooting

Trying to test my app locally on a iOS simulator device. When launching the iOS simulator device and running the test launch, following error is thrown:

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).

When i change the base configuration in Xcode or directly update the podfile under my project folder, during the start of the test file all the project files including the podfile get overwrited with default values.

Tried updating the base configuration in Xcode to:

However the settings get overwritten at the start of the test run.

Tried to upload the podfile content:

Default podfile content:

# Uncomment this line to define a global platform for your project
platform :ios, '14.0.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks! :linkage => :static
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
      
    end
  end
end

I tried updating this part of podfile content:

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

To:

  project 'Runner', {
    'Debug' => 'Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig',
    'Release' => 'Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig',
    'Profile' => 'Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig'
  }

However at the start of launching the test run, all the files including this one get updated to default settings.

Any idea how to solve this issue?

What have you tried so far?
  • Search flutterflow community posts, searched on google and tried some options by modifying the pod files and base configuration in Xcode

Did you check FlutterFlow's Documentation for this topic?
Yes