I'm learning Coredata + SwiftUI and I was wondering if I could ask you a question. I am developing an app to record clothes information. Which way is better, to convert the image to a binary data type and store it in core data or to store only the URL of the image in core data and the image file in a document file?
If you have just a few small images to work with in your app, it's totally fine to store them as binary data directly in Core Data. It's a simple approach that keeps everything in one place and makes managing your data easier. But if you're expecting a lot of images or larger file sizes, it's worth considering storing the image files separately and keeping their URLs in Core Data. This can give you better performance and help with managing memory. Plus, it allows for easier scalability and organization of your image files.
@@flash698 Since this App is recording information about clothes, I expect that whenever a user adds an item, they will also save a picture of it. For now, i am storing two images in the core data: the original image and a thumbnail image (CGSize 56x56). I'm wondering if I should store only the URLs you mentioned in the core data, since the ImageView frame shown in each view is different (DetailView shows the original image 0.5 times the height of the device size, so I feel the heat). Given the different device sizes, do you typically assign the Image View frame to the GeoReader? Or do you manage them in absolute size? Also, I only store the URLs in the core data, and the images in a document, so if the user deletes and re-installs the app, the images will be deleted as well, and I don't know how to handle that.
CoreData: error: No NSEntityDescriptions in any model claim the NSManagedObject subclass 'Item' so +entity is confused. Have you loaded your NSManagedObjectModel yet ?
In the next video, I'll see you guys with iOS 17 and SwiftUI 5.0 ✌
Can't wait!
덕분에 많이 배웁니다!
can you make one of a timetable/schedule with list view or table view?
Cool approach 👌 … thank you
Thanks
I'm learning Coredata + SwiftUI and I was wondering if I could ask you a question.
I am developing an app to record clothes information. Which way is better, to convert the image to a binary data type and store it in core data or to store only the URL of the image in core data and the image file in a document file?
If you have just a few small images to work with in your app, it's totally fine to store them as binary data directly in Core Data. It's a simple approach that keeps everything in one place and makes managing your data easier.
But if you're expecting a lot of images or larger file sizes, it's worth considering storing the image files separately and keeping their URLs in Core Data. This can give you better performance and help with managing memory. Plus, it allows for easier scalability and organization of your image files.
@@flash698
Since this App is recording information about clothes, I expect that whenever a user adds an item, they will also save a picture of it.
For now, i am storing two images in the core data: the original image and a thumbnail image (CGSize 56x56). I'm wondering if I should store only the URLs you mentioned in the core data, since the ImageView frame shown in each view is different (DetailView shows the original image 0.5 times the height of the device size, so I feel the heat).
Given the different device sizes, do you typically assign the Image View frame to the GeoReader? Or do you manage them in absolute size?
Also, I only store the URLs in the core data, and the images in a document, so if the user deletes and re-installs the app, the images will be deleted as well, and I don't know how to handle that.
😍
My app is crashing when I click the New Task button
sososososososoososss amazing!! 😃😍🥰💩
Are you detecting duplicate dates
CoreData: error: No NSEntityDescriptions in any model claim the NSManagedObject subclass 'Item' so +entity is confused. Have you loaded your NSManagedObjectModel yet ?
Do you included Core Data in your project?