Monthly Archives: August 2014

AVFoundation audio recording with Swift

Swift Language

Swift AVFoundation Recorder Use AVFoundation to create an audio recording. Introduction Creating a Recorder Recorder Delegate Recording Summary Resources Introduction AVFoundation makes audio recording a lot simpler than recording using Core Audio. Essentially, you simply configure and create an AVAudioRecorder instance, and tell it to record/stop in actions. Creating a Recorder The first thing you […]

Posted in AVFoundation, Computer Music, Swift | Tagged , | 30 Responses

Swift AVFoundation to play audio or MIDI

Swift Language

Swift AVFoundation There are many ways to play sound in iOS. Core Audio has been around for a while and it is very powerful. It is a C API, so using it from Objective-C and Swift is possible, but awkward. Apple has been moving towards a higher level API with AVFoundation. Here I will summarize […]

Posted in Swift | Tagged , | 28 Responses

Swift Dropbox quick tip

Swift Language

Quick Tip If you’re going to use the Dropbox API in your Swift app, you will need a bridging header. If you don’t have one, just create a dummy Objective-C class and you will be prompted to have one created for you. Then delete the dummy class. Then add DropboxSDK.h to the bridging header. Blammo. […]

Posted in Swift | Tagged , | Leave a comment

Swift documentation

Swift Language

In the release notes for XCode 6 beta 5, they mention that they are using reStructuredText (quick reference) for javadoc style documentation. It has a long way to go, but it’s a start. Like Java, you can create documentation blocks like this:

N.B. For old timey Objective-C guys, HeaderDoc uses /*! instead of /** […]

Posted in Swift | Tagged , , | Leave a comment