Search code examples
iosflutterxcodecocoapods

Framework 'Pods_Runner' not found


I am trying to run the flutter app but getting this error

same issue here but none helped

Launching lib/main_dev.dart on iPhone 15 in debug mode...
main_dev.dart:1
Upgrading Pods-Runner-frameworks.sh
Xcode build done.                                           54.7s
Failed to build iOS app
Error (Xcode): Framework 'Pods_Runner' not found

Error (Xcode): Linker command failed with exit code 1 (use -v to see invocation)

versions

[✓] Flutter (Channel stable, 3.10.5, on macOS 14.0 23A344 darwin-arm64, locale en-TR)
    • Flutter version 3.10.5 on channel stable at /Users/yarenalbayrak/Developer/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 796c8ef792 (4 months ago), 2023-06-13 15:51:02 -0700
    • Engine revision 45f6e00911
    • Dart version 3.0.5
    • DevTools version 2.23.1
[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A240d
    • CocoaPods version 1.11.3

It creates pods_runner file every run It creates pods_runner file every run.

My part of the Podfile looks like this. When I delete use_frameworks! line to not create the file whenever it runs I get some other problems.

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

target 'Runner' do
  use_frameworks!
  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['IPHONEOS_DEPLOYMENT_TARGET'] = '14'
    end
  end
end

Solution

  • I solved it by this approach, when I run pod install it was giving me warnings

    Runner [Debug-dev] target overrides the EXCLUDED_ARCHS[sdk=iphonesimulator*]

    I went to Target -> Build Settings and searched for EXCLUDED_ARCHS and changed the values to $(inherited)