Post

Replies

Boosts

Views

Activity

Can you force Messages to offload old, stuck attachments on macOS?
It appears that some attachments get stuck and aren't offloaded like they are on iOS. I have 200-300 attachments, all dated 5/3/2021 (perhaps that's when I last formatted this Mac and downloaded from iCloud), and then it keeps 1-10 attachments from every month after that. I don't want to delete the attachments because I want them to stay in iCloud. Is there a terminal command to offload or set the maximum space Messages may use or something? Signing out and signing back in does nothing. They stay on the hard drive. Messages on my phone with the same synced conversations stay around 21GB.
0
0
641
Oct ’23
Is it possible to create relationships between objects in previews?
Is it possible to create one-to-many relationships between optional objects in SwiftData Xcode Previews? The below code I call from #Preview crashes the canvas on the post.authors?.append(tempAuthors.randomElement()!) when I try to append an array to an optional array. I can append the previewAuthors array to the authors array in the simulator or on device, but it crashes in Preview. My running theory is it has something to do with being in memory since this works on device, but I'm not sure that I missed something super obvious. static func previews(_ count: Int) -> [Post] { let previewAuthors = [Author(name: "..."), Author(name: "...")] var posts: [Post] = [] for i in 0..<count { let post = Post(title: "Title \(i)") post.authors?.append(previewAuthors.randomElement()!) posts.append(post) } return posts }
2
0
863
Oct ’23