Search code examples
iosswiftxcodensfilemanager

Swift How to get the count of audio files in a folder inside the project manager


I have a BIG folder with dozens of folders inside, with a couple of audio files inside each folder.

I need to get the count of audio files in every one of those sub folders (e.g. AppName/AudioFiles/ThirdFolder/(I need the count of all the audio files here)).

I have tried a lot of different ways of doing this, and I think my problem is that the folders (Groups) aren't there; somehow.


Solution

  • I have figured it out, it was because folders (Groups) aren't recognized. You need to make them reference folders, to do that, when you drag your folders into your project manager, make sure you press "Create folder references", and NOT "create folder groups".