skip to Main Content

Since I upgraded to Xcode 14.0, I have the following warning: PackageIndex.findPackages failed: featureDisabled.

Web search did not yield anything.

I have a single SPM package, but there doesn’t seem to be any issues.

Does anybody know how to get rid of this warning?

PackageIndex.findPackages failed: featureDisabled

5

Answers


  1. This is what I had to do using Xcode 14.0:

    1. Made sure the Xcode project for the Swift Package was CLOSED.
    2. Selected the Project in Xcode and under Package Dependencies picked the + to add a new package.
    3. Selected Add Local... and then picked the folder for my Swift Package (the folder that contains the package file)
    4. Did a clean build and QUIT Xcode
    5. Re-opened Xcode.
    6. Build. If it still fails, do the next step.
    7. Select your target in the Xcode project and scroll to Frameworks, Libraries... Then pick the + and you should see your package listed as a framework. Select it and pick Add. Now Build.

    Step 2 is necessary to create a folder called "Packages" in your project. After Step 3, your package appears but is not expandable (to see the sources). Once you re-start Xcode and open this project (Step 5) the package should be fully visible.

    I had to also do Step 7 to make this work. However, I have done this WITHOUT needing Step 7. It’s unclear why this happens.

    Apple’s documentation says you can drag your package’s folder into the Project Navigator, but I have only been able to get that to work once. Every other time I’ve had to follow these steps, occasionally using Step 7.

    Apple needs to finish this so using Swift Packages is simple. Its really a wonderful thing, but being able to use the package locally is critical to maintaining it easily

    Login or Signup to reply.
  2. I was able to fix a similar issue I had by selecting the target in the Xcode project and scroll to Frameworks, Libraries... Then pick the + and you should see your package listed as a framework. Select them and pick Add.

    IMPORTANT: It may look like the libraries are already added but go ahead and add them again without deleted the existing entries. You won’t create duplicates, it just forces XCode to recreate the necessary indexes that were missing. I think this is a bug when adding packages from a Git URL.

    Login or Signup to reply.
  3. i managed to get rid of these warnings by running the following from inside the directory where your project’s .xcodeproj file resides:

    xcodebuild -resolvePackageDependencies -project MyProject.xcodeproj -scheme MyScheme -platform="iOS, name:'Any iOS Device'"

    Running this command might show some warnings in the terminal,
    i received the following warning in my case…

    --- xcodebuild: WARNING: Using the first of multiple matching destinations:
    { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:xxx-xxx }
    { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
    { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
    ...
    

    Open your project after successfully executing this command,
    and wait for the packages to get resolved and indexing to get done before trying to compile the project.

    This solution was originally posted here by David to resolve another Swift Package Manager issue,
    but this works well for resolving the issue asked in the OP as well.

    Hope this helps.

    Login or Signup to reply.
  4. Simply cleaning and building the project again fixed it for me

    Login or Signup to reply.
  5. All I had to do is to go to

    • Xcode -> Product -> Clear All Issues
    • Xcode -> Product -> Clean Build Folder
    • Build

    And just by magic, the warning disappeared!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search