I’ve been away from XCode and iOS for some time, doing my bid in Android land. (I’ve also seriously neglected my blog, apologies to both of my loyal readers, I know there’s only two of you!) The interesting thing is how much you realize you knew when you go back. Even more interesting is how much you forgot and has much changes in a brief matter of months. I overheard some of my former iOS coworkers talking about lsd errors and thought they were taking drugs. At any rate, today’s topic is a simple tip that I keep forgetting.
Ringtones for iPhones!
This is a two step process involving conversion and consumption. Ringtones must be in the m4a file format but use a “.m4r” extension. The easiest way make them is to use “afconvert” to convert any existing audio file to “m4a” format using this syntax:
afconvert -v -f m4af ./MyInputFile.wav ./MyOutputFile.m4r
The -v flag allows verbose output which let’s you see what the command is doing. The -f is a way of specifying the output format. Consumption of these ringtones is as simple as dragging and dropping the “.m4r” file into iTunes under the ringtone section so that the next time you synch your device it will include the new ring tone. You may also need to select your device in iTunes, click on the “Tones” tab and enable ringtone sync in iTunes for this to work.