I'm having some issues sending .m4a-files with a custom keyboard, I've managed to send .wav-files without any issues, however these are not "playable" in the same way as an audio message. I read somewhere that you should rename the sent file to Audio Message.m4a in order for the user to be able to play it as they would with a real audio message.
While using "com.microsoft.waveform-audio" when sending .wav-files work fine, my keyboard simply does nothing when using "kUTTypeMPEG4Audio" while adding to the pasteboard.
let url: NSURL = Bundle.main.url(forResource: "\(self.soundArray[indexPath.row])", withExtension: ".m4a")! as NSURL
let data = NSData(contentsOf: url as URL)
pb.setData(data! as Data, forPasteboardType: kUTTypeMPEG4Audio as String)
Am I missing something, or is there any workaround for this?