Post

Replies

Boosts

Views

Activity

Reply to Database not deploying to CloudKit
I figured it out. I had a parent-child relationship between meals and ratings. class Meal: Identifiable { var id: UUID = UUID() var name: String = "" ... var ratings: [Rating]? = [] // made this optional ... } @Model class Rating: Identifiable { var id: UUID = UUID() var value: Int = 0 var date: Date = Date() var meal: Meal? // added this ... } without ratings being optional and a meal? attribute on ratings, the app couldn't create the schemer in cloud kit. It then went ahead and created the scheme as locally on the devices instead. Once I made these changes to the data model, the app created the schema in cloudkit. Otherwise it was creating them locally on the device and it looked like the app was working fine. Thanks
Jan ’25
Reply to Database not deploying to CloudKit
I figured it out. I had a parent-child relationship between meals and ratings. class Meal: Identifiable { var id: UUID = UUID() var name: String = "" ... var ratings: [Rating]? = [] // made this optional ... } @Model class Rating: Identifiable { var id: UUID = UUID() var value: Int = 0 var date: Date = Date() var meal: Meal? // added this ... } without ratings being optional and a meal? attribute on ratings, the app couldn't create the schemer in cloud kit. It then went ahead and created the scheme as locally on the devices instead. Once I made these changes to the data model, the app created the schema in cloudkit. Otherwise it was creating them locally on the device and it looked like the app was working fine. Thanks
Replies
Boosts
Views
Activity
Jan ’25
Reply to Database not deploying to CloudKit
I'm not deploying to production. I'm only using the development database. Is there a reason when I run the app, it doesn't build a schema automatically in the new container? It has before I'm not sure why it's not doing it now. I did reset the database environment if that broke something.
Replies
Boosts
Views
Activity
Jan ’25
Reply to Database not deploying to CloudKit
the link took me to an article about duplicate data. I thought the schema was created automatically from my model. it was for other apps I've developed. Do I have to do something special here?
Replies
Boosts
Views
Activity
Jan ’25
Reply to Database not deploying to CloudKit
noticed this as well
Replies
Boosts
Views
Activity
Jan ’25
Reply to Child view does at first display when row selected in parent view
this seemed to work somehow. .onTapGesture { selectedMeal=meal } .onChange(of: selectedMeal) { newValue in if newValue != nil { isShowingMealForm = true } }
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Sep ’24
Reply to Child view does at first display when row selected in parent view
Thanks. I ended up using destination links as a workaround instead. Would still be curious to know why it doesn't work :)
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Sep ’24
Reply to Apple Watch not showing in XCode
Same issue. Xcode 15.3. Watch OS 10.4 :(
Replies
Boosts
Views
Activity
Apr ’24