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.