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

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      

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!

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.