I've been building a project using SPM to define all the modules within the app. When I update the Package.swift
file Xcode generates the new Schemes for me automatically. The project set up is very similar to the Isowords project from PointFree... GitHub - pointfreeco/isowords: Open source game built in SwiftUI and the Composable Architecture.
But then after some time something will happen and it will "forget" a scheme. It's not in the list of schemes and when I "Manage schemes" it isn't there either. When I tap "Autocreate Schemes Now" nothing happens.
I've tried various things to fix it. Resetting package caches, updating the package.swift file, cleaning the build folder, deleting derived data, none of that seems to have fixed it.
In git there are no changes to suggest that anything has changed. The only way I have found to consistently fix it is to re-clone the project into a new directory. Then Xcode generates the schemes and my missing scheme is back. All the other schemes are there.
Does anyone know:
- Why this happens?
- How to fix it once it happens?
I'd like to avoid manually adding the scheme as that puts the responsibility on us to create it correctly and keep track of it. I'd just like Xcode to keep managing them and not suffer from amnesia.
Thanks