I'm proud of myself. I created func addImage. The image name is the same as the fruit name.lowercase(). Even if the name is crazy it will pass nil CKAsset: let asset = saveImage(name: image) newFruit["image"] = asset I checked CloudKit db, it works: with an image or blank. I must be learning something! thanks
@dugrut1325
2 жыл бұрын
I spent hours on the last video trying to figure out the Fetch problem; entering data then click AddButton the List would never update the last record entered. But now in this video after putting a 1 second delay it refreshes the List. Anyway, I can say going through every line of code for hours I got to understand it.
@steffancrowley
2 жыл бұрын
I had the exact same experience Doug! Going over the code trying to fix that issue helped me really understand the code better :)
@EmanNollase
Жыл бұрын
awesome tutorial!! QQ: Is icloud storage is the same as cloudkit? how we can save and retrieve files from icloud from swiftui app? thanks
@SHOLINGER
4 ай бұрын
did you find anything cause i am at the exact same stage I am building a wallpaper app need to store all the wallpaper ( images ) 3000+ images in cloud and then i need to fetch them i am thinking about cloudKit is that it ??
@Connor-pj2tg
2 жыл бұрын
Hi Nick. I don't know if this is a better route, but to avoid the whole 2 second delay, which I think would be inconvenient for some users, I just appended fruits array when the user saved the fruit. Will you be discussing in a future video a way that CloudKit can change data in real-time without the delay? Similar to addSnapshotListener I suppose in Firebase. Also, how did you learn this, would you be able to link the docs related to CloudKit?
@bevanchristian2431
2 жыл бұрын
I have same problem, cloudkit is very sloww
@SwiftfulThinking
2 жыл бұрын
Hey Connor. I should have probably explained this a bit more. In the video I'm adding a 2 second delay and purposely re-fetching all of the data from CloudKit because I want to prove (for the tutorial) that the database is actually updating in real time. In your app, it would be a better route to do what you mentioned. Append the new data to the fruit array locally. As you do that, you will also upload to CloudKit. The key would be to check the returned value while saving to CloudKit and make sure it saved successfully and without error. If there was an error that returns, then you should probably remove the item from the local array and show an error.
@dodilodi1278
10 ай бұрын
good solution but this way it will append the fruit at the bottom of the list, ignoring sorting. you need to refresh the full list then or sort fruits array to have the list sorted.
@joshkinney5091
2 жыл бұрын
First off, I do not see the coffee link but I would like to buy you a few!!!. Secondly, I am not finding many tutorials on the correctly updating your collection once a new item is added/updated (images seem to take a while at times) along with that correctly setting up the start of an app with CloudKit. Since we all have iCloud is a login view not needed to track users? Where do you place the function to check to see if user is logged in? Lastly right now I just have two tabs and the collectionView being the first one. When app closes and comes back there is no data until I go to another tab and back. Even pull to refresh is setup and call the fetch function we created but nothing updates until you switch screens. These are some typical issues I am sure others face and would be cool to be showed the correct approach.
@diannefournier1252
2 жыл бұрын
Is there an easy way to add more Elements to a live database without messing up previous stored records
@gustafkugelberg3906
2 жыл бұрын
Thanks for making great videos, but one thing I don't get. You keep saying that the CKAsset data isn't downloaded by default, but the url of the CKAsset seems to point to the file system.
@w0mblemania
2 жыл бұрын
He says that "it's not going to give us the binary file, by default. Instead it gives us a URL". So, by default, when you grab a CKRecord, it does download the binary file, but it doesn't give it to you as part of the record. Instead, it parks the binary in temporary storage, and gives a *file* URL to that storage. You then load that file at that URL. From memory, there is a property you can set to disable the automatic downloading of the binary data.
@Awesome奥深
2 жыл бұрын
Hi, can you share one video about core data sync to icloud kit, and paging techniques. 😝
@SwiftfulThinking
2 жыл бұрын
I'll have to do that in a future playlist 🥵 I tried to start with the most common topics first
Пікірлер: 17