Software⏱️ 3 min read📅 2026-06-03

How to Fix: Xcode 11.4 compile error 'Missing package product <package name>'

Xcode compile error Missing package product when switching branches.

Quick Answer: Try cleaning the project and rebuilding it to resolve the issue.

When compiling Swift code in Xcode, users may encounter an error that can be frustrating to resolve. The 'Missing package product' error occurs when integrating local packages in Xcode projects. This issue affects developers who work with Xcode daily, particularly those managing multiple branches or collaborating on projects.

This problem is not only annoying but also prevents the user from successfully running their app on different branches. Fortunately, there are steps that can be taken to resolve this issue and ensure smooth project management.

💡 Why You Are Getting This Error

  • The primary reason for this error lies in Xcode's package management system. When a local package is integrated into a project, it creates a unique product identifier (PID) for the package. However, if this PID is not properly updated when switching branches, Xcode will fail to recognize the package and display the 'Missing package product' error.
  • An alternative reason could be related to how Swift Package Manager handles package dependencies. Although external packages work perfectly fine, local packages may not be properly configured or updated, leading to similar issues.

✅ Best Solutions to Fix It

Resolving the issue by updating the package's PID

  1. Step 1: To resolve this issue, navigate to your project's target settings in Xcode and select the 'Info' tab. Locate the section for 'Package Products' and click on it.
  2. Step 2: In the 'Package Product' section, find the product identifier (PID) associated with your local package. If it exists, make sure it is up-to-date by clicking the 'Edit' button next to it.
  3. Step 3: If the PID does not exist or seems outdated, navigate to the project's directory and run `swift package update` in the terminal to re-generate the package's PID.

Resolving the issue by cleaning and rebuilding the project

  1. Step 1: Another approach is to try cleaning and rebuilding the project. To do this, navigate to Product > Clean Build Folder in Xcode.
  2. Step 2: After cleaning the build folder, rebuild your project by clicking on Product > Build or press Command + B.

✨ Wrapping Up

By following these steps, developers can resolve the 'Missing package product' error and successfully compile their Swift projects. Remember to regularly update your local packages' PIDs and consider using Swift Package Manager for external dependencies to avoid similar issues in the future.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions