Reset Package Caches: Trigger a re-install of your existing Package dependencies w/ same versions.We can use three options, as shown in the image above depending on our use case: These options trigger a new checkout into DerivedData: Xcode now has nice options within the IDE itself to resolve Swift Packages. The only thing required is to refresh the dependencies. This is a misleading build error since there may be nothing wrong with the app code you've written or your dependency resolution graph. Thus, cleaning the app's folder in DerivedData or DerivedData itself breaks dependency resolution within Xcode for Swift Packages. Swift Packages are checked out into DerivedData and are not referenced from the ModuleCache.noindex subfolder. Note that we can still encounter the same issue in local Swift Package projects. My existing project was not a local Swift Package but an iOS app project. I ran into this issue when I had imported Swift Packages into my project but later cleaned DerivedData to fix an unrelated app caching issue. Update for Projects w/ Swift Packages How did the errors happen? With the same name at the top of the Project Navigatorħ.Make sure you have this file in the right folder if not move it to right folderĨ.Now right click to delete the very top redundant file, here do not select " Move to Trash" option.Just select "Remove References" option So clearly this file has lost reference and we need toģ.The Swift bird folder icon appears in light red color which is an indication of lost referenceĥ.Next from Project navigator -> Files ->Add Files to Lowes -> Finder View go to the folder where this referenced file is moved toĦ.Now if you look at the Project Navigator this file swift bird icon appears in bright red, but you will also find an extra file To and check with your team members if anyone moved it for a reason.If it occurred by mistakeĢ.From Project navigator, directly tap on the file which is causing issue.This is the same file that XCode shows as not found inĮrror. 1.From Project Navigator ->Files ->Add Files to Lowes ->In Finder View, check to which folder this lost referenced file is moved
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |