I've been searching for a few days with no luck on how to fix this. Essentially, I have a tvOS project which was using a package (https://swiftpackageregistry.com/lorenzofiamingo/swiftui-cached-async-image to be precise).
I have since removed this package from the project as have no use for it anymore. However, whenever I use xcodebuild to run tests/create an archive/etc, the output log still says that it is resolving and fetching the package. This is causing issues later on when building on jenkins so need the package to go.
Console Output
xcodebuild test -workspace project.xcworkspace -scheme "scheme" -destination "platform=tvOS Simulator,name=Apple TV"
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
Resolve Package Graph
// why is this still being resolved when it has been removed from the project??
Resolved source packages:
swiftui-cached-async-image: https://github.com/lorenzofiamingo/swiftui-cached-async-image @ main
note: Using new build system
note: Planning
Analyze workspace
...
I have done the following:
- Removed the package from the project under package dependencies.
- Deleted the builds inside DerivedData.
- Deleted the package.resolved file.
The last two files keep getting replaced each time I open xcode as it realises the file is gone and does a fetch for the package.
Any ideas on what I could be missing? I'm assuming xcode has some super secret reference to it that I cant find. Surely it should be possible to just have the package removed as if it was never there in the first place.
Thanks