Is Apple no longer supporting .mp3 or .m4a?
No. But that’s really besides the point. NSBundle doesn’t anything about audio file formats, it just deals with directories, files and paths/URLs. If it’s returning nil, there’s something wrong at that level, not at the audio level.
btw There are two non-obvious causes for problems with NSBundle finding things:
case sensitivity — iOS uses a case sensitive file system, so if you get the case wrong then the resource won’t be found.
hidden extensions — Sometimes a file can end up with two extensions, where the second one is hidden.
I recommend that you look at the built binary to make sure that the resource is where you expect it to be, has the right case, and has the right extension. It can be useful to use Terminal here rather than Finder.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"