Post

Replies

Boosts

Views

Activity

Reply to @Relationship crash on ios17.5 but not on ios18
I defined a many-to-many relationship between a set of exercises and workouts that you can create (crash occurs when generating a workout) @Model class Exercise: Identifiable, Equatable { var id: UUID var name: String var imageName: String var difficulty: Int var guidelines: String var muscle: String // Define the relationship back to Workout var workout: [Workout]? init(name: String, imageName: String, difficulty: Int, guidelines: String, muscle: String, workout: [Workout]? = nil) { self.id = UUID() self.name = name self.imageName = imageName self.difficulty = difficulty self.guidelines = guidelines self.muscle = muscle self.workout = workout } } @Model class Workout: Identifiable { var id: UUID var date: Date var name: String var difficulty: Int var workingTime: Int var recoveryTime: Int var count: Int var duration: Int var isSet: Bool var setNumber: Int? var restTime: Int? var animate: Bool = false var streak: Int? = nil // Define a one-to-many relationship with Exercise @Relationship(deleteRule: .cascade, inverse: \Exercise.workout) var exercises: [Exercise]? = [Exercise]() init(name: String, difficulty: Int, workingTime: Int, recoveryTime: Int, isSet: Bool, duration: Int, setNumber: Int? = nil, restTime: Int? = nil) { self.id = UUID() self.date = Date() self.name = name self.difficulty = difficulty self.count = 0 self.duration = duration self.workingTime = workingTime self.recoveryTime = recoveryTime self.isSet = isSet self.setNumber = setNumber self.restTime = restTime } } the crash with the same error occurs at more than one place, but for example when I try to display pre-made workouts, called challenges, when I debug line by line, it load the first one but crash on the second one (there is 12 in total). on iOS 18, no problem tho. it crashes in this part of the code exactly, taking a static list of workout and a static list of exercises and linking them together: struct Challenge { var challenges: [Workout] init(challenges: [Workout], challengesExercises: [[Exercise]]) { var counter: Int = 0 for challenge in challenges { challenge.exercises = challengesExercises[counter] counter += 1 } self.challenges = challenges } }
Sep ’24
Reply to SwiftData fatal error "Never access a full future backing data"
I have the same issue... any way to resolve this?
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’24
Reply to SwiftData ModelContainer can not be created in iOS 17.4 Beta
guys, its now ios18 beta and I get the same issue, and I don't even have iCloud enabled. I have a workout class with a relationship: @Relationship(deleteRule: .cascade, inverse: \Exercise.workout) var exercises: [Exercise]? = [] and the inverse in exercise class: var workout: Workout?
Replies
Boosts
Views
Activity
Aug ’24
Reply to SwiftData error on IOS18, Never access a full future backing data
same error, no way to fix yet?
Replies
Boosts
Views
Activity
Aug ’24
Reply to Crash in Swift Data on iOS 17.5, Resolved in iOS 18.0 Developer Beta
I literally have same problem right now, can you develop on how you fixed it? @MauiWowieMan
Replies
Boosts
Views
Activity
Sep ’24
Reply to @Relationship crash on ios17.5 but not on ios18
I defined a many-to-many relationship between a set of exercises and workouts that you can create (crash occurs when generating a workout) @Model class Exercise: Identifiable, Equatable { var id: UUID var name: String var imageName: String var difficulty: Int var guidelines: String var muscle: String // Define the relationship back to Workout var workout: [Workout]? init(name: String, imageName: String, difficulty: Int, guidelines: String, muscle: String, workout: [Workout]? = nil) { self.id = UUID() self.name = name self.imageName = imageName self.difficulty = difficulty self.guidelines = guidelines self.muscle = muscle self.workout = workout } } @Model class Workout: Identifiable { var id: UUID var date: Date var name: String var difficulty: Int var workingTime: Int var recoveryTime: Int var count: Int var duration: Int var isSet: Bool var setNumber: Int? var restTime: Int? var animate: Bool = false var streak: Int? = nil // Define a one-to-many relationship with Exercise @Relationship(deleteRule: .cascade, inverse: \Exercise.workout) var exercises: [Exercise]? = [Exercise]() init(name: String, difficulty: Int, workingTime: Int, recoveryTime: Int, isSet: Bool, duration: Int, setNumber: Int? = nil, restTime: Int? = nil) { self.id = UUID() self.date = Date() self.name = name self.difficulty = difficulty self.count = 0 self.duration = duration self.workingTime = workingTime self.recoveryTime = recoveryTime self.isSet = isSet self.setNumber = setNumber self.restTime = restTime } } the crash with the same error occurs at more than one place, but for example when I try to display pre-made workouts, called challenges, when I debug line by line, it load the first one but crash on the second one (there is 12 in total). on iOS 18, no problem tho. it crashes in this part of the code exactly, taking a static list of workout and a static list of exercises and linking them together: struct Challenge { var challenges: [Workout] init(challenges: [Workout], challengesExercises: [[Exercise]]) { var counter: Int = 0 for challenge in challenges { challenge.exercises = challengesExercises[counter] counter += 1 } self.challenges = challenges } }
Replies
Boosts
Views
Activity
Sep ’24
Reply to Cannot change file names
same here, very weird
Replies
Boosts
Views
Activity
Feb ’25
Reply to iPad screen size
Same concern here!
Topic: Design SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’25
Reply to Creating ApplicationToken with Decoder from string
did you solved this?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’25