Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

pod install cannot find a target named Runner in Runner.xcodeproj

ErrorUnable to find a target named `Runner` in project `Runner.xcodeproj`, did find `dev` and `prod`.

Short answer

The Podfile declares target 'Runner', but the Xcode project has no target with that name, for example after the app target was renamed or duplicated per environment. CocoaPods needs each Podfile target to match an Xcode target. Rename one side to match, or move to one Runner target with a scheme per flavor.

  • Applies to Flutter 3.35, CocoaPods 1.16, Xcode 26
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    List the targets and schemes Xcode really has, and the targets the Podfile asks for.

    xcodebuild -list -project ios/Runner.xcodeproj
    grep -n "target\|project" ios/Podfile
  2. 2Match what you see, then jump to its fix

    1. 1The error lists other targets (here dev and prod) but no RunnerThe Podfile target name does not match any Xcode targetFix
    2. 2flutter run --flavor dev cannot find a matching schemeFlavors were set up with extra targets instead of schemes and configurationsFix

What does the error look like?

  • Unable to find a target named `Runner` in project `Runner.xcodeproj`, did find `dev` and `prod`.

Cause 1 of 2

The Podfile target name does not match any Xcode target

1Check

The CocoaPods guide says a target should correspond to an Xcode target. Compare the names after target in the Podfile with the Targets section of the xcodebuild -list output.

xcodebuild -list -project ios/Runner.xcodeproj

2Fix

Make the names agree. The path the Flutter docs describe is to keep a single Runner target and create one scheme per flavor; if you keep separate targets, declare each one in the Podfile instead of Runner.

# ios/Podfile: the name after target must be one xcodebuild listed
target 'dev' do
  # keep the existing lines of the block unchanged
end

3Verify

Run pod install again. It finishes without the target error.

cd ios && pod install

Confirmed by guides.cocoapods.org

Did this fix it?

Cause 2 of 2

Flavors were set up with extra targets instead of schemes and configurations

1Check

The Flutter iOS flavor guide builds every flavor on the one Runner target: a shared scheme per flavor, plus copies of Debug, Profile and Release with a lowercase flavor suffix, for example Debug-staging.

xcodebuild -list -project ios/Runner.xcodeproj | sed -n '/Schemes:/,$p'

2Fix

Create shared schemes with the Runner target, duplicate the build configurations, and map each one in the Podfile project block as :debug or :release.

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

3Verify

Run the flavor from the project root.

flutter run --flavor dev

Confirmed by docs.flutter.dev

Did this fix it?

How do I stop it coming back?

  • Rename Xcode targets and Podfile targets together, in the same commit.
  • Share the schemes so teammates and CI see them.
  • Use lowercase flavor suffixes on build configuration names, as the Flutter guide asks.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.