Blog

Category Archives: Geekspeak

Help! iOS 7 broke my microphone input!

We hear a lot about people having problems with their music apps on iOS 7 no longer receiving audio. I thought it was time I posted an article describing why this is happening, and how to fix it.

iOS 7 introduced a bunch of new security and privacy features and restrictions. In particular, when an app wants to record audio, iOS 7 will block the app from doing so until the user gives permission. Usually this happens via an alert dialog in the app:

Screen Shot 2013 10 23 at 12 41 10

However, if one taps “Don’t Allow”, the system won’t ask again — ever. That can spell confusion and frustration (and support emails, and 1-star App Store reviews!) for users who tapped the dialog away without reading it, and then discovered they’re unable to record audio.

Alas, there’s not much that can be done about that from our end, except for explaining how to fix the issue once this happens.

The trick is to open Privacy Settings for the device, and enable Microphone access for the app. The controls can be found in the system Settings app:

Screenshot 2013 10 23 12 55 54

Screenshot 2013 10 23 12 29 13

Once you’ve turned this on, the app should begin receiving audio. Depending on certain factors, you may need to quit and restart the app.

Tagged , , | Comments closed

Want to be able to downgrade your apps? Save ‘em before updating.

Regrettably, the App Store doesn’t really make it easy to downgrade apps if an update goes awry. This can be pretty problematic if you use your apps for critical stuff like live music and it all goes horribly wrong the day before a gig.

That problem’s pretty easy to solve though. Just back up your apps before upgrading. That way you can try out new updates without the risk. Here’s how:

Open iTunes, then select the “Apps” section from the drop-down box on the top right:

Screen Shot 2013 05 30 at 13 49 14

Next, find the app you want to back up, right-click on it, and select “Show in Finder” (or whatever the Windows equivalent is!).

Screen Shot 2013 05 30 at 13 50 52

Finally, grab the “ipa” file, and copy it somewhere safe.

Screen Shot 2013 05 30 at 13 52 04

If you want to be really safe, grab a piece of software like Macroplant iExplorer which lets you access the files on your device. Then hook up your iDevice via USB, and back up the Documents and Library folders from within the app. That’ll save all your files and config just in case the update applies some non-backwards-compatible changes.

Screen Shot 2013 05 30 at 13 56 34


Now, you may update your app with impunity.

If you change your mind and want to go back to how it was before, drag that backup you made back into iTunes, and tell iTunes to replace the current version. Sync your device, and if you backed up your Documents/Library folder, drag your backup back into the original app folder within iExplorer.

By the way: If it’s too late to make a manual backup, but you use Time Machine or another backup utility, then you’ll find the older version of the app in your backup, within your iTunes music folder. For me, it’s in ~/Music/iTunes/Mobile Applications.

Tagged , , | Comments closed

Searching iOS header files with Xcode

I’m often having to grep through various iOS frameworks in search of error codes that appear (“What the bloody hell does -10867 mean?”). This can be a bit annoying – especially while working with Core Audio – so I put together an Alfred workflow that does it for me.

Here it is – type “hs” (short for “header search”) then the text you want to search for, and it’ll give you matching results. Hit enter to open that file:line combination in Sublime Text, or edit the action script to work with the editor of your choice.

Search Xcode Header Files.alfredworkflow

Screen Shot 2013 04 01 at 11 54 24

Tagged , , , , , | Comments closed

Encrypting and decrypting text with Alfred 2

Here’s a couple of Alfred 2 workflows that implement encryption and decryption via AES256, useful for doing things like sharing passwords.

Select some text (or copy it to the clipboard), and hit the encryption hotkey, and you’ll be prompted for a password; the encrypted contents will be copied to the clipboard.

Then when the recipient has the encrypted text, select or copy it, hit the decryption hotkey, and the original password will be requested. Then, the original text will be displayed and copied to the clipboard.

Encrypt.alfredworkflow

Decrypt.alfredworkflow

Screen Shot 2013 03 25 at 12 51 50

Screen Shot 2013 03 25 at 12 52 14

Tagged , , , , | Comments closed

The Amazing Audio Engine is here, and it’s open source and Audiobus-ready

Taae

I’m very pleased to announce that The Amazing Audio Engine has pulled into the station. It’s been a long time in the making, and there have been one or two minor distractions along the way, but I’m proud of the result:

A sophisticated and feature-packed but very developer-friendly audio engine, bringing you the very best iOS audio has to offer. We’re talking audio units, block or object-based creation and processing, filter chains, recording and monitoring anything, multichannel input support, brilliant lock-free synchronization and rich Audiobus support.

You’ll find The Engine, a bunch of documentation and the brand-new community forum at theamazingaudioengine.com

It’s also open source. And it’s ready for Audiobus.

Tagged , , , | Comments closed

Thirteen Months of Audiobus

Tomorrow, Monday December 10, my friend and partner-in-crime Sebastian Dittmann and I are launching a project over twelve months in the making: Audiobus. We’re very proud of what we’ve managed to do, and we both firmly believe that Audiobus is going to fundamentally alter the way people create music on the iPad and iPhone.

You can find out more about Audiobus itself at audiob.us, but I wanted to take a moment to breathe, look back, and explain why the hell I’ve been so quiet over the last year. Read More »

Tagged , , , , , , , | Comments closed

Three Years On The Road: The Story So Far

My partner Katherine and I just hit the three year point of our adventure abroad. Here’s the story so far, over on our travel blog:

Three Years On The Road

Tagged | Comments closed

Compiling Image Resources into a Static Library

I’ve recently been working on a static library for distribution to other developers — Audiobus — and I need to include a couple of graphical resources with the distribution. The usual solution to this is to include the resources separately in a bundle, and require the user to drop them in to their project along with the static library.

I thought I’d see if I could make the process just a little neater, and successfully devised a way to compile the images straight into the library, so the distribution remains nice and clean — just the library itself and a few header files.

Now, I can pop image resources into a folder, and after compiling, access them within the static library with:

UIImage *image = TPGetCompiledImage(@"Button.png");

It automatically handles “@2x” Retina images (although it doesn’t currently do “~ipad” versions).

Here’s how it’s done.

The magic is in a shell script which uses the xxd hex dump tool to create C code that represents the image data as a byte array, then creates around it a set of utilities to turn those arrays into UIImages on demand.

Along with it is a couple of template files — a header and implementation file — that describe the format of the derived code.

Finally, a little tweaking of the project in Xcode (with a brief foray into a text editor to work around some Xcode shortcomings) puts it all together. Read More »

Tagged , , , | Comments closed