I have some issues with converting a mp3 file to m4a using AVFoundation. I created a topic in stackoverflow here:
I now figured out the solution and I slightly think, what's going on under the hood. But what I am asking for now is if I understand it right and if there is another solution.
So the solution is, that I have to make
assetReaderOutput as instance variables, because when the
assetWriterInput.requestMediaDataWhenReady-closure starts, the conversion function will end and both variables will be released. Is that correct? And if so, is it necessary to make instance variables or can I tell the compiler to retain those values?