Because my iOS app allows user input I would like to do some basic check as to whether a file is a m4a audio file. Of course I can check the file extension but then what stops the user from just renaming some other file to end in ".m4a"?
My system doesn't actually intend to play the audio so ideally whatever check is done here would be as lightweight as possible but it sounds like it may need to load in the entire files data. I would also like to protect against them say inputting a "mp3" file by naming it "m4a".
I have tried the following
avPathAsset.load(.availableMetadataFormats)
But looks like this isn't really the metadata of the file. Frankly I don't know quite what it even is.