0%
Still working...

Fix: “Selected scheme ‘iosApp’ doesn’t have ‘PRODUCT_NAME'” Error in Xcode

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

  1. Open your project in Xcode.
  2. Select your target (e.g., iosApp) in the project navigator.
  3. Go to the Build Settings tab.
  4. Search for PRODUCT_NAME.
  5. 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 of iosApp.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

  1. Go to Product > Scheme > Manage Schemes…
  2. Make sure your iosApp scheme:
    • Is listed and checked as Shared
    • Is associated with the correct target
  3. Click Edit Scheme…
  4. 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.

Leave A Comment

Recommended Posts