TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

Swift Preview Error: Cannot Preview in this file | WWDC Session code along

Forums > SwiftUI

I was hoping to work through the WWDC session "Build an app with SwiftData", but as soon as I try to preview the first view, I'm getting this error when it tries to preview on "My Mac". (It previews correctly for ipad and iphone)

Cannot preview in this file
Failed to launch com.example.apple-samplecode.FlashCard

XCode 15.0 Beta 2, installed via "Xcodes" and set as active version.

I've downloaded this project from: https://developer.apple.com/documentation/SwiftUI/Building-a-document-based-app-using-SwiftData

And I'm directly loading the "Start" sample project (not the workspace, whatever that is.)

I'm running Ventura, so I created a Sonoma VM to test it on, but I get the same error. Any ideas?

2      

Hacking with Swift is sponsored by RevenueCat.

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.