Home iOS App that processes audio messages from whatsapp
Reply: 0

iOS App that processes audio messages from whatsapp

user1403 Published in July 23, 2018, 1:29 pm

As part of an university course I'm developing an iOS app that should be able to receive audio-files from WhatsApp to store and replay them in the internal player of the app itself. I'm however new to app development on iOS and therefore would appreciate some help. So far I've created an action extension that can use WhatsApp as a host app.

import UIKit
import MobileCoreServices
class ActionViewController: UIViewController {

@IBOutlet weak var imageView: UIImageView!

override func viewDidLoad() {

if let inputItem = extensionContext!
    .inputItems.first as? NSExtensionItem {

  if let itemProvider = inputItem
  .attachments?.first as? NSItemProvider { 

      "public.file-url", options: nil){

        (item, error) in print (item as! NSURL)

Now when printing the value of the NSItemProvider I'm getting an NSURL pointing to the audio file in the filesystem.

Something like:


I guess there must be a a way to grab the file and store it or replay it in the AVAudioPlayer. I'm just not sure how to accomplish that.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.359546 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO