GoogleSignIn swift package breaks my watchOS app preview

I need to install the GoogleSignIn for my iOS application, and I did so.

The issue is that the watchOS app inside the project stops working because of build failures that are caused by the GoogleSignIn package. I cannot figure how to fix it, because inside the project settings, that package appears in the list of Frameworks for the iOS target, and is not present into the list of Frameworks for the watchOS target, as you can see in the first image below.

For those of you struggling with the same issue I found a temporary fix: Edit the scheme for the watch app and disable Analyze, Test, Run, Profile, Archive for the main app. This got my previews working again!

@efish88 INCREDIBLE, this SPM issue is present across a ton of forum posts and you have the only solution that worked for me.

For anyone else searching - if you get the error "when building for watchOS simulator, no library for this platform was found" or "when building for visionOS simulator, no library for this platform was found"

For any Swift Package (in my case, FirebaseAnalytics) you can solve it by deleting any existing scheme for the platform (watchOS & visionOS in my case), creating a new scheme for the platform, and as stated uncheck everything on the main app. It should look like this

After completing those changes, just select the correct scheme before attempting to preview the product (in this case, I've selected my watchOS scheme) and the preview should work smoothly

GoogleSignIn swift package breaks my watchOS app preview
 
 
Q