Post

Replies

Boosts

Views

Activity

Reply to SwiftData - Load the data into Apps
To use SwiftData you basically need these three things and to read the documentation. Add the macro @Model Add .modelContainer to the view Add the @Environment(.modelContext) private var context Finally, in SwiftData you can use FetchDescriptor with a Predicate to fetch and sort. The following example is in the SwiftData example provided by Apple. @Model class Recipe { @Attribute(.unique) var name: String var summary: String? var ingredients: [Ingredient] } So, var ingredients would be an array of elements that are of data type Ingredient. So make that. Example: @Model class Ingredients{ var name: String var amount: String var somethingElse: ThatType }
Mar ’24
Reply to Questions about user-generated content rules
A method for filtering objectionable content I am uncertain about this; however, if I had to make an educated guess I would say this means that users have a way to limit and control (or filter) the content that is shown in their feed, dashboard, et cetera. A mechanism for users to flag objectionable content On most social media platforms that incorporate networking and user interaction, the app developers include a small button or link that onChange allows the user to flag content that they have deemed inappropriate and/or offensive. Perhaps this is what they mean. A mechanism for users to block abusive users Again, on most social media platforms or platforms that incorporate user interaction, the app developers include a small button that onChange allows them to block a user that they no longer wish to interact with.
Apr ’24
Reply to Unable to Verify App: An internet connection is required to verify the trust of the developer' ... This app will not be available until verified.
I had three do/try/catch blocks. They allowed my app to compile and build but when I tried to launch them on my devices,I received the same error. I had to force unwrap !. That is to say, I had to rewritetry as try! This fixed the error. I was able to compile, build, and launch the app both in the simulator and on my device.
Apr ’24