Post

Replies

Boosts

Views

Activity

Reply to How to correctly fetch data using SwiftData
My code for the last block: import SwiftUI import SwiftData struct HomeView: View { @Query var profiledata: [allProfileData] //get all profiledata @Environment(\.modelContext) private var modelContext @State private var profileImage: Image = Image("DefaultProfile") var body: some View { VStack { profileImage } .onAppear() { let fetchRequest = FetchDescriptor<allProfileData>() let fetchedData = try? modelContext.fetch(fetchRequest) print("Fetched count: \(fetchedData?.count ?? 0)") if let imageData = profiledata.first?.profileImageData, let uiImage = UIImage(data: imageData) { profileImage = Image(uiImage: uiImage) } else { profileImage = Image("DefaultProfile") } //yes, I realize that I could use profiledata.first?.profileImage but I was just checking if profileImageData would save or not } } }
Topic: UI Frameworks SubTopic: General Tags:
Nov ’25
Reply to Help with storage on my Mac
I’m really confused I’ve never really been a developer or used these forums it’s just that I can’t post this in the normal forums. I don’t have any Time Machine snapshots and haven’t made any new APFS Volumes besides simulators (Is there a rare to eject them when not in use??? They take up ~30 gb, which is most likely not the problem as the problem is 100+ gb) here’s a screenshot of the command "diskutil ap list": I‘m not running as root, is that the same or different from the root user? Should I use the root user to try to find what’s taking up that storage?
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’25