I'm amazed at how simple it looks when clearly explained. You have a real talent for teaching.
@SwiftfulThinking3 жыл бұрын
Thanks for the comment Patrick! I'm very happy to help.
@tibettenballs49622 жыл бұрын
@@SwiftfulThinking he used to be a bully, and force me to eat dirt. now i eat bugs becuase its just a habit from him being a big ol meanie.
@Reallymellie2 жыл бұрын
Hey Nick, Just want to thank you for all the content you make and the hard work you put in this videos. I am really thankful for that! The way how you teach is just amazing!
@SwiftfulThinking2 жыл бұрын
Thanks Melvin!
@nevemra5 Жыл бұрын
Amazing as always. I love how detailed and slow you explain these complicated things. It really helps a lot.
@chrisstromberg6527 Жыл бұрын
I really appreciate the "best practices" approach you take in citing Apple guidelines. Another excellent video!
@Josuegcp95 Жыл бұрын
You're a great teacher, thank you for the content.
@hygisonbrandao92518 ай бұрын
You should be the one writing Apples documentation. I feel their docs are the worst. And you are the best ate making it simple and clear! Thanks
@balabon3 жыл бұрын
Awesome, better and better 👍
@SwiftfulThinking3 жыл бұрын
Thank you as always Александр :)
@natgenesis50382 жыл бұрын
You tought me SwiftUI from nothing to a pro thanks so much bro
@kenjyfukuda3 жыл бұрын
Many thanks for your explanation in an organized and easy-to-follow manner. I'm enjoying your series of video tutorials "SwiftUI Continued Learning."
@SwiftfulThinking3 жыл бұрын
Thanks for watching Kenji :)
@Nunny253 жыл бұрын
Uff, long video, BUT very useful as always and FM is clear for me now. Thanks Nick.
@bingl1723 жыл бұрын
Thank you! This is such a helpful tutorial. Super clear.
@frydaydeep66742 жыл бұрын
37:40: vm = Localmanager.instance() poped up, code changed and I didn't see you covered it? Captain Nick
@frydaydeep66742 жыл бұрын
what a clown i am : I used state var instead of @StateObject and infoMessage just won't show and no bug report from compiler
@rivforest239511 ай бұрын
simple, logical, easy to understand and follow. thank you for making this. How can you make the folder available to sync to the iCloud?
@kavinda_dilshan_paramsoodi3 жыл бұрын
Good work Nic. learned a lot. long video doesn't bother us at all because we wanna learn it properly. so itz okay. keep up the good work.❤️
@maciusessa2 жыл бұрын
great vid as always
@readmoreapp2 жыл бұрын
Great explaination. Love from India
@mintuz3 жыл бұрын
How would you use this to sync files across devices similar to how Photos app works
@SwiftfulThinking3 жыл бұрын
This tutorial for the FileManager is specific to the device. If you want to share across devices, you can integrate CloudKit!
@highRider723 жыл бұрын
Great video! Quick question: Why are you using a singleton vs an environment object on app level for Local File Manager?
@SwiftfulThinking3 жыл бұрын
Hi Hans. Great question.... We use @EnvironmentObject to put an ObservedObject into the environment so that another View can access it. In this video, the LocalFileManager is not observed from the View. Instead, the ObservedObject is our ViewModel and then the ViewModel is referencing the LocalFileManager... The real question would be, why did we use a Singleton, in which case I used a Singleton here because this will be a global class that is used across the app. In a more advanced series I would use Dependency Injection instead.
@highRider723 жыл бұрын
@@SwiftfulThinking got it, thank you!
@carlosrivasrocks3 жыл бұрын
Is it possible to sync the data in FileManager across devices with iCloud? How? Thanks!
@SwiftfulThinking3 жыл бұрын
Hi Carlos! Well the FileManager is specific to the current device, however, we can use CloudKit to sync across the user's iCloud. That's a whole different framework though.
@xcoo773 жыл бұрын
Great Video! Amazingly explained.
@williamwildsmith51622 жыл бұрын
Hi Nick, Some of the topics in this set of videos go over my head - firmly my fault (I'm a bit think sometimes, and getting on in years). Anyway, I think you have a talent for training people, and I think you have a winning formula with these individual videos. Great job Nick. How can I buy you coffee?...?
@wandahu80582 жыл бұрын
May I ask why you deleted the image from the file manager, and then the view did not update immediately but still shows the image.
@wandahu80582 жыл бұрын
Interestingly, when the get image function is added, the view is still not updated
@AZMerf3 жыл бұрын
For example, the Home app allows the user to save an image as a background. I would assume this would be using this concept. Also, can I find the image I saved in the simulator in the folder hierarchy?
@SwiftfulThinking3 жыл бұрын
Yea, you should be able to find the file. If you print out the path where we save the image you'll see the exact location. I think it will be pretty deep into the hierarchy though!
@andresraigoza20822 жыл бұрын
You are like my Swift Manual. Thanks again
@OliverHeimann-z4q3 ай бұрын
How would you load this steve-jobs image directly from your desktop instead of moving it to the assets folder? Let's assume your are on MacOS, how does this all work with absolute path names instead of these special application folders?
@andrefonseca49012 жыл бұрын
Hi Nick, thanks for all your awesome videos! Just one question: in this video the func getImage retrieves and returns an UIImage. But how can i retrieve and return an mp3 file? What data type should I use in the return?
@SwiftfulThinking2 жыл бұрын
For audio and video, you can write the Data to a URL and then return the URL back to the application. We use AVPlayer to play these files, which can be initialized with a URL. You also can use the remote URL if u don’t want to write to the FileManager, but I often do anyway 👍
@andrefonseca49012 жыл бұрын
@@SwiftfulThinking Thanks a lot Nick, it worked! The reason I couldn’t play the remote URL directly is that I developed my whole player interface (buttons, slider, playing time, etc) using AVAudioPlayer (based on your video Continued Learning #9). But later I found out AVAudioPlayer does not play remote files; only AVPlayer plays remote URLs. So I decided to download the mp3 files in order to use my interface, which is working now. (By the way, it would be nice if you could post a video showing how to make an audio player with slider, controls, etc, using AVPlayer - I tried but was not able to do it).
@dugrut13252 жыл бұрын
Great video, but how can the user see any files created in Files.app, I notice files I create the are not available to the user, even though I can see them thru terminal. Is there a setting to set in Xcode when the app is compiled, to allow these files accessible to the user/device?
@SwiftfulThinking2 жыл бұрын
The Assets folder is part of the application bundle. It is included in your app when you ship it to the App Store. Therefore, you can read from it but cannot write to it. If you need to write, you should write to a local URL on the device using the FileManager!
@dugrut13252 жыл бұрын
@@SwiftfulThinking thanks for the reply. I watched the bootcamp series for the second time also going through the Continued Learning series a couple times and now finally it's getting through to this old timer. I seem to understand the howto for path/folders/files. This video exercise I tagged all the functions and them folded them up, It made it short and concise and I finally visualized it. It was a great video. I noticed once you delete the folder you could no longer save the image, so I added the func createFolderIfNeeded() before, to check if the folder was still available. Works
@dugrut13252 жыл бұрын
@@SwiftfulThinking Thanks for replying. It is, not exactly my question. But I found out the answer. I was asking about writing files through FileManager. I wanted the user to see these files that the app creates. I found through another Swift Tuber to set the 'file sharing' options in Info. Everything with that problem is resolved.
@uguraltnsy2 жыл бұрын
What should I do for it to appear in the gallery?
@akbar_logs Жыл бұрын
I have a question? Question 1: What is the difference between saving Images Externally with the help of Core Data and saving images with the help of File Manager. Question 2: Images saved with the help of File Manager will sync with CloudKit?
@SwiftfulThinking Жыл бұрын
1. CoreData doesn’t support image formats and is usually not used for saving Images / Videos / etc. Apps with CoreData will often save “imageUrlString” to CoreData and then load image from FileManager (or elsewhere). 2. FileManager does not sync across devices. I’m not sure if there’s a CloudKit sync option. 3. Most apps will use an Image SDK rather than manually doing it. I wanted to teach an example here, which is important to know and understand, but I would recommend an SDK such as Kingfisher or SDWebImage to load and save the images. In which case, you won’t be dealing w FileManager or CloudKit anyway🤙
@avneetsingh20103 жыл бұрын
Guys I have written the data into a file in documents directory using Swift's standard File manager functions... I am able to view through xcode terminal but while testing in real iOS I don't see any file... Can anyone let me know if it is even possible to view the file???
@SwiftfulThinking3 жыл бұрын
You can do this if you save it on a simulator on your computer. You're probably better off printing out the path from Xcode and then trying to find it. It's a challenge to get to because it's very deep, but I think this may help: stackoverflow.com/questions/25198840/document-directory-path-of-xcode-device-simulator
@МахмуджанНиязов2 жыл бұрын
how using video files from file manager? please help me
@joywu12 жыл бұрын
I found the last step when add manager.deleteFolder() in VM's delete func then only can click save 1 time & many times in delete button, but when I click save again will show files not exit, when I study these code, I found should add manager.creatFolder() in VM's saveImage func, then will no longer show error message. if I delete the folder, it will create folder again when I click save button with no error.
@Денис-ж3ф5р3 жыл бұрын
I remember learning SwiftUI with you, which was fun, even though I was forced to learn UIKit. I am happy to understand that I still remember SwiftUI, so you did a great job, I guess.
@SwiftfulThinking3 жыл бұрын
Haha! That's good to hear. SwiftUI > UIKit though 🥲
@Денис-ж3ф5р3 жыл бұрын
@@SwiftfulThinking not always, UIKit words with maps better.
@natgenesis5038 Жыл бұрын
@@Денис-ж3ф5р relax SwiftUI is the best UI tool never seen even tho it still new .
@1slyboy Жыл бұрын
I noticed that the saved JPEG is much larger than the original JPEG. It would appear that the compressionQuality using 1.0 is not the same as the original quality. BTW - you can see the file saved by the simulator simply by opening the path on your Mac.
@erencelik9643 жыл бұрын
Congratulations, it was a really nice content. do you intend to share the code
@SwiftfulThinking3 жыл бұрын
Thanks for watching Eren! Yes, the full source code is available on my Github: github.com/swiftfulthinking
@erencelik9643 жыл бұрын
@@SwiftfulThinking Thank you for your answer, I hope your content will continue, you are doing very well.
@erencelik9643 жыл бұрын
@@SwiftfulThinking Although I know most of the topics you are telling, I'm still watching: D
@emdutt4012 Жыл бұрын
I am using Xcode 14.3 while saving the image after first click it shows the save successfully ,but then it's not showing any message.. if anyone here face same problem.
@fre.helfer2 жыл бұрын
👏👏👏👏👏 AMAZING
@akbar_logs Жыл бұрын
simply genius
@MrLawaghar3 жыл бұрын
Great job.
@SwiftfulThinking3 жыл бұрын
Hey Muhammad.. welcome to the channel! Thanks for watching.
@ThePhotodiver3 жыл бұрын
I really enjoyed this video. I am working on an App that uses a JSON file, and would like to create a desktop app that would allow me to create the data for that JSON file that will be used in the first app. This will help me for sure in getting to that point.
@SwiftfulThinking3 жыл бұрын
Hi ThePhotodiver! I'm glad the video helped. The code should be very similar except instead of using an Image you just save your JSON data! Thanks for watching.
@김이현시청용3 жыл бұрын
thx!!
@SwiftfulThinking3 жыл бұрын
Thank you!! :)
@Jump_Jay Жыл бұрын
Whew this was a long video, but i took small bites out of it until completed. 😁
@wandahu80582 жыл бұрын
Good!
@Lassund2 жыл бұрын
NO I love a detailed video, let it be long if it is.
@zamnbro Жыл бұрын
nahh
@holycrosscv3 жыл бұрын
This is a really helpful series! Thanks so much! To get rid of the pesky constraint errors in the output, just add the following to the to the @main first view: .onAppear { UserDefaults.standard.setValue(false, forKey: "_UIConstraintBasedLayoutLogUnsatisfiable") }
@SigmaPC942 жыл бұрын
You are the best can I have your insta handle please 😍😍