Post

Replies

Boosts

Views

Activity

Reply to Thread 1: Fatal error: expected attribute to be Codable
@newwbee it's open-source. MoneySplitter is a simple struct with a lot of extension functions and Codable conformance: https://github.com/KyLeggiero/RentSplitTools/blob/765c748ff08e2fd0d4a1c00e8440f7ac3c6d703c/Sources/RentSplitTools/MoneySplitter.swift
Replies
Boosts
Views
Activity
Jul ’23
Reply to Thread 1: Fatal error: expected attribute to be Codable
please ignore this accidental reply
Replies
Boosts
Views
Activity
Jul ’23
Reply to Thread 1: Fatal error: expected attribute to be Codable
@AndyJJ whoops; sorry about that. Linked an incorrect commit hash. Here you go: https://github.com/KyLeggiero/RentSplitTools/blob/181316d7a37b4b1615d15f10bb2ff2722fab088b/Sources/RentSplitTools/MoneySplitter.swift#L685
Replies
Boosts
Views
Activity
Jul ’23
Reply to Thread 1: Fatal error: expected attribute to be Codable
This is caused by the fact that SwiftData does not yet support encoding custom Codable types, despite the claims from Apple. You'll have to make your model only use primitives such as Int, String, Date, etc
Replies
Boosts
Views
Activity
Aug ’23