Post

Replies

Boosts

Views

Activity

Reply to SwiftData and 'Circular references'
First I was confused as well, but your own comment @Mcorey and looking at the example code helped me to figure it out. As you’ve said you basically have to omit the @Relationship in one of the entities and replace it with a simple variable in the other one. Example Code Main Entity: @Model final public class MainItem { var title: String @Relationship(inverse: \ChildItem.item) var childs: [ChildItem]? } Child Entity: @Model final public class ChildItem { var timestamp: Date // Add inverse as a simple variable var item: ChildItem? }
Topic: App & System Services SubTopic: iCloud Tags:
Jun ’23
Reply to When is SwiftData available?
Yes, @lyonnaip is right! The Apple Documentation states that the SwiftData framework will be available on: iOS 17.0+ iPadOS 17.0+ macOS 14.0+ Mac Catalyst 17.0+ tvOS 17.0+ watchOS 10.0+
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to SwiftData and 'Circular references'
First I was confused as well, but your own comment @Mcorey and looking at the example code helped me to figure it out. As you’ve said you basically have to omit the @Relationship in one of the entities and replace it with a simple variable in the other one. Example Code Main Entity: @Model final public class MainItem { var title: String @Relationship(inverse: \ChildItem.item) var childs: [ChildItem]? } Child Entity: @Model final public class ChildItem { var timestamp: Date // Add inverse as a simple variable var item: ChildItem? }
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to Does `TipKit` not available right now?
Seems like the Framework isn’t included in beta 1 and will be available at a later point: https://developer.apple.com/forums/thread/731073?answerId=755102022#755102022
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23