I may have found a workaround, detailed here
Confirmed to fix FirebaseAnalytics installed via SPM, now my watchOS previews work. Not sure why this isn't default, only annoying thing is having to switch schemes for the relevant file, but not a huge breaker.
Post
Replies
Boosts
Views
Activity
@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
Yea even building a new one causes this and I can't find any other info about it - basically, this worked in XCode 13, broke from XCode 14.2 ish on. Its currently broken now. What's happening is that XCode is attempting to link package sub dependencies to the selected preview scheme if you run on WatchOS (and I think on VisionOS too.) Its incredibly frustrating, since even though we're obviously not using those packages and they parent package is excluded, XCode still tries to link them. Simulators and real devices work fine.
Same here on XCode 15.2 - this is such an annoying issue, since any swift package breaks watchOS previews. In my case, that's Firebase.
@Developer Tools Engineer - any updates on this regression from XCode 13 to Xcode 15?
Filed FB13545393
Same here - really quite frustrating
Failed to access iCloud data
I'm also experiencing this issue, after turning on advanced data protection I'm almost always unable to access the containers with the same error show in the OP's screenshot.
Attempted Resolution
signing out and signing back in does not resolve
additionally turning Advanced Data Protection on or off does not resolve.
attempts on multiple devices (mac, iphone) and browsers (firefox, chrome, safari) do not resolve
clearing browser cache and cookies does not resolve
VERY occasionally (like literally once a week,) I am able to sign in following normal sign on procedures and view the private and shared containers of a production or development environment. Its really frustrating!
What's going wrong
Here's a screenshot of the browser's console on a failed attempt to view the private container, not sure if helpful:
I was also having this issue and the proposed solution solved it and lead me to a working solution for watchOS too.
Per the apple documentation we now need to use NavigationStack - here's the relevant doc.