skip to Main Content

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

2

Answers


  1. If you have changed platform in ios/Podfile, don’t forget to update iOS Deployment Target in Pods target.

    I’m quoting an answer from the github link which had helped me in the past-> https://github.com/flutter/flutter/issues/50711#issuecomment-770397291

    The problem for me ended up being that the platform :ios, '12.0' was a higher iOS version than the targets specified in the XCode projects. Once I changed the target iOS in the XCode projects, it built. In XCode 11, that's at [Project Navigator button] -> Runner top level blue icon -> General -> Deployment Info -> Target.
    
    Login or Signup to reply.
    1. delete Podfile
    2. run flutter clean, flutter pub get in your Flutter program, then Podfile will be generated
    3. In new Podfile, adjust platform to 14.0 and Uncomment that line
    4. run pod install in your iOS program

    everything will be ok

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search