skip to Main Content

I’m working on a project and I’m using Swift package manager to manage dependencies. I had just updated my Xcode to 12.5 and I had deleted the derived data, because I thought it would resolve a problem I was having (none of the errors showing up on the Issue navigator, but would show up in the Report navigator). Anyways, that is not the main issue.

This is the report for "Reset package cache" that has been running for the last 30 mins

After I deleted my derived data, the package should have re-fetched. However, that is not happening. I tried resetting the package cache and restarting my macbook. This has been going on for two hours with me looking up similar questions on stack overflow, but I coudn’t find any solution.
Any help would be godsend.

Edit: Cloned the project in another directory to see if it would resolve the issue. No luck.

6

Answers


  1. Chosen as BEST ANSWER

    For anyone stuck in fetching <package> you might just needed to manually delete the cached files present in ~/Library/Caches/org.swift.swiftpm/

    Thanks to https://stackoverflow.com/a/67323117/3970488


  2. Deleting cache only didn’t work for me.

    I had to;

    • Remove the stuck package,
    • Close the Xcode,
    • Delete the cache,
    • Delete the Derived Data,
    • Reopen the project and wait for it to fetch other packages,
    • Re-add the stuck package.
    Login or Signup to reply.
  3. This solution is relevant to anybody encountering this issue on xCode v13.2.

    According to Xcode 13.2 Release Notes, if you’re using Swift packages either standalone or as dependencies in an Xcode project or workspace, the Mac App Store version of Xcode fails during package resolution.

    To solve this issue, you have to download Xcode 13.2 directly from the Apple Developer website. This would solve the problem.

    More info can be found on this github issue.

    Login or Signup to reply.
  4. Go to the left, to the packages and dependencies area, in the file managerenter image description here

    Login or Signup to reply.
  5. This worked for me

    cd ~/Library/Developer/Xcode
    rm -rf DerivedData
    
    Login or Signup to reply.
  6. If nothing above is working for you, then you its probably authentication problem, try adding to Accounts your GitHub account.
    Xcode->Settings->Accounts

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