Still a very simple program.
Swift (5)
VirtualBox on OS X
Android Studio (2)
Android Studio
Swift and Audio
Many people are now developing applications for iOS.
// // ViewController.swift // import UIKit import AVFoundation class ViewController: UIViewController, AVAudioPlayerDelegate { var audioPlayer:AVAudioPlayer! @IBOutlet var button:UIButton! override func viewDidLoad() { super.viewDidLoad() let audioPath = NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource("myfile", ofType: "mp3")!) audioPlayer = try!AVAudioPlayer(contentsOfURL: audioPath, fileTypeHint: nil) audioPlayer.delegate = self audioPlayer.prepareToPlay() audioPlayer.play() } }
The storyboard is just a dummy, but you can hear the sound with the Simulator.