I'm trying to build a music player app in Swift and I want to be able to add mp3 files to the app's internal storage.
Right now I have a bunch of music files in the assets folder and i can play those files. I want to be able to add new files to the app from outside the app into that assets folder, copying the mp3 files from somewhere else, like the Files app for example.
Is there some kind of way to copy an mp3 file and add it to the assets folder of the app? Maybe it could be done using UIPasteboard?
Why only Assets folder? you can use other folders to store your files, for example Documents (inside your app) and can create more folders inside. Look forward for FileManager class.
2.1m questions
2.1m answers
60 comments
57.0k users