pod install cannot find a target named Runner in Runner.xcodeproj
Unable 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.
Fix it fast
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/Podfile2Match what you see, then jump to its fix
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.xcodeproj2Fix
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
end3Verify
Run pod install again. It finishes without the target error.
cd ios && pod installConfirmed by guides.cocoapods.org
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 devConfirmed by docs.flutter.dev
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:
- TaxiDexMy own multi-tenant taxi dispatch SaaS: API, dispatcher portal, driver and passenger apps, and the servers underneath.
- Dispatch ProA real-time logistics platform: Flutter apps, Spring Boot services and a Kafka event pipeline on AWS.
- Qist BazaarA buy-now-pay-later marketplace built from a blank repo, now past 100K downloads on Google Play.
Related fixes
Mobile apps
flutter run on iOS or macOS stops with Error running pod install
Warning: CocoaPods not installed. Skipping pod install.
Flutter only reports that pod install failed; the reason is in the lines just above it.
5 causes, each with a fixMobile apps
Apple rejected the app under Guideline 4.3, Design: Spam
Guideline 4.3(b) - Design - Spam
Guideline 4.3 is Apple's duplicate rule.
5 causes, each with a fixMobile apps
pod install cannot pick a version of a pod that satisfies every requirement
Specs satisfying the `FirebaseAuth (~> 11.0)` dependency were found, but they required a higher minimum deployment target.
CocoaPods tried every version of the named pod and none fit all requirements.
4 causes, each with a fixMobile apps
flutter run says: Could not run Runner.app, try Xcode Product > Run
Try launching Xcode and selecting "Product > Run" to fix the problem:
Flutter prints this when installing or launching the built app on the iPhone fails, and it hides the real reason.
4 causes, each with a fixMobile apps
flutter doctor says CocoaPods is installed but not working
You appear to have CocoaPods installed but it is not working.
Flutter runs pod --version and treats a failed or unreadable result as a broken install.
3 causes, each with a fixMobile apps
FirebaseMessaging.getAPNSToken() returns null on iOS
FirebaseMessaging.instance.getAPNSToken() returns null
getAPNSToken() gives null when iOS has not handed the app an APNs token yet or never will.
4 causes, each with a fix