Here’s a Markdown document version of your explanation and solutions regarding the error:
Fix: “Selected scheme ‘iosApp’ doesn’t have ‘PRODUCT_NAME'” Error in Xcode
The error:
Selected scheme “iosApp” doesn’t have ‘PRODUCT_NAME’
typically occurs in Xcode or when running a Flutter or React Native iOS app. It indicates that the selected scheme lacks a proper value for the PRODUCT_NAME build setting in your target configuration.
✅ Solution 1: Check Build Settings in Xcode
- Open your project in Xcode.
- Select your target (e.g.,
iosApp
) in the project navigator. - Go to the Build Settings tab.
- Search for
PRODUCT_NAME
. - Ensure
PRODUCT_NAME
is defined and not blank. It usually should be set to:
$(TARGET_NAME)
Alternatively, you can set it to a static string, like:
iosApp
✅ Solution 2: Check Your .xcodeproj
or .xcworkspace
Setup
If you’re using CocoaPods (or working with Flutter), you should open the project using the .xcworkspace
file, not the .xcodeproj
file.
✅ Always open the correct file:
iosApp.xcworkspace
instead ofiosApp.xcodeproj
✅ Solution 3: Clean and Rebuild the Project
In Xcode:
- Go to the top menu: Product > Clean Build Folder
Or press:Shift + Command + K
Then, rebuild the project.
✅ Solution 4: Check the Scheme
- Go to Product > Scheme > Manage Schemes…
- Make sure your
iosApp
scheme:- Is listed and checked as Shared
- Is associated with the correct target
- Click Edit Scheme…
- Under Build, verify that your target is selected for building.
✅ For Flutter Users
If you’re seeing this in a Flutter project, run the following commands:
flutter clean
flutter pub get
cd ios
pod install
cd ..
flutter run
🔍 Need More Help?
If none of the above steps solve your issue, consider the following:
- Are you using Xcode directly, Flutter, or React Native?
- What version of Xcode/macOS are you using?
- Can you share your
iosApp
target’s build settings or project structure?
Feel free to reach out with more details so I can assist you further.
Let me know if you want this saved as a downloadable file or embedded in a README.