Post

Replies

Boosts

Views

Activity

Reply to Swift Chart causing app to crash when deleting an item from the data array
No, I haven't. I'll check them out. I'm still learning swift programming and the crash logs are a little confusing to me. I did try my app in Xcode 16 and it doesn't crash on the iOS 18 simulator. Here are the errors I'm getting This is on the ConsumedDrink This is in the ConsumedDrinkChartView import Foundation import SwiftData @Model class ConsumedDrink { let id: UUID var drink: Drink var date: Date @Transient var volumeMeasure: VolumeMeasurement { let defaultVolume = DataStore.defaultVolume let drinkVolume = self.drink.volume let volume = drinkVolume.converted(to: defaultVolume.unit).value return VolumeMeasurement(date: self.date, value: volume, unit: defaultVolume.unit.symbol) } init(drink: Drink, date: Date = Date()) { self.id = UUID() self.drink = drink self.date = date } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’24
Reply to Xcode 16 missing minimum deployment dropdown for app target
@DTS Engineer Thanks for the reply. Xcode 16.1 still has the dropdown to select the version. Do you think this is going to be removed in future releases of 16.1? It's convenient to have a dropdown instead of having to type the version. Typing in a version could be problematic.
Replies
Boosts
Views
Activity
Sep ’24
Reply to Swift Chart causing app to crash when deleting an item from the data array
No, I haven't. I'll check them out. I'm still learning swift programming and the crash logs are a little confusing to me. I did try my app in Xcode 16 and it doesn't crash on the iOS 18 simulator. Here are the errors I'm getting This is on the ConsumedDrink This is in the ConsumedDrinkChartView import Foundation import SwiftData @Model class ConsumedDrink { let id: UUID var drink: Drink var date: Date @Transient var volumeMeasure: VolumeMeasurement { let defaultVolume = DataStore.defaultVolume let drinkVolume = self.drink.volume let volume = drinkVolume.converted(to: defaultVolume.unit).value return VolumeMeasurement(date: self.date, value: volume, unit: defaultVolume.unit.symbol) } init(drink: Drink, date: Date = Date()) { self.id = UUID() self.drink = drink self.date = date } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’24
Reply to SwiftData enum No exact matches in call to instance method 'setValue' error
I figured it out. I added Codable to the enum and cleaned the build folder and the error went away.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’24