UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

SOLVED: Does the SwiftUI + CloudKit template work in Xcode 13.3?

Forums > SwiftUI

I've started a project for iOS using SwiftUI, CoreData and Cloudkit (all checked in the wizard), added the iCloud CloudKit entitlement, created the container and checked that it exists on the CloudKit dashboard and tried running the app on my iPhone. All I get is a plain white screen. If in the App swift file I comment out or remove .environment(\.managedObjectContext, persistenceController.container.viewContext) and let the ContentView show alone then I get the edit and + buttons on the toolbar, they don't work (no surprise there).

Is there something obvious that I've missed?

1      

Have you checked that the simulator is sign in on your Apple ID?

1      

Thank you for your response. The simulator is signed in, as is the iPhone that I'm using to test using hardware in case of simulator issues.

1      

I've used the Persistence.swift file from https://github.com/apple/cloudkit-sample-coredatasync as a template and that works a lot better.

1      

TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!

Find out more

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

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

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.