Tag: iOS

Blob update

Version 1.1 update to Blob now available in the iOS App store.


Blob (by Bjorn Lindberg)  was converted in 2011 to run as a webApp using SenchaTouch 1.0 and Phonegap 0.94. Both of these frameworks have evolved to the point that the original code is no longer workable.

Here is an update to the Web app version: http://zerokidz.com/blob1.1/www/sencha-index.html


  • Updated Sencha Touch containers and html canvas setup to same methods used in SecretSpot.
  • Improved algorithm for setting width/height of Blob window based on actual window dimensions – this makes it run better as a Web app on a desktop computer.
  • In process of updating icons and launch screens for Apple requirements.
  • screen size issues resolved by setting as universal app, and migrating launch images to asset manager – in Xcode –  and removing the status bar with settings in the plist file.
  • Lots of small things needed to upgrade to iOS 7.


Like SecretSpot, The native app runs only in portrait orientation.


After this update has been submitted to Apple, I will try to convert it to run in current versions of Sencha Touch and Phonegap. There is relatively small amount of Sencha code in the app: A main window, toolbar, canvas window,  and a few customized buttons.


SecretSpot update

Version 1.1 update to SecretSpot now available in the iOS app store.


SecretSpot was written in 2011 as a webApp using SenchaTouch 1.0 and Phonegap 0.94. Both of these frameworks have evolved to the point that the original code is no longer workable. With iOS 6, the app version of secretSpot broke. Audio was only triggering with every other touch.

Instead of upgrading javascript code, I made a few changes to the phonegap library so it would compile in iOS 7, then added new icons and splash screen files – and resubmitted the app.

One change was to alter the way that launch images get loaded during webView initialization, to prevent annoying white flashes. This version also does an extra load of the launch image – instead of just going to a black background while the webView is loading. If this ends up being too slow, then it may be better to go directly black background following initial launch image. See this post: http://stackoverflow.com/questions/2531621/iphone-uiwebview-inital-white-view


The native app runs only in portrait orientation. This is something the app has had problems with before. Something has changed in the process of detecting current orientation. Its likely to be a Phonegap issue as the Web app version works fine.

I may have a look at this  bug – and apply updates to the Blob app as well. But the real solution is to upgrade to current versions of the frameworks.


This is more a documentation thing: If you don’t touch the canvas when the app starts, then there will be no sound unless you restart the app.


updates to audioGraph for iOS 7

Submitted an update (1.2) to Apple for audioGraph today.

Mostly bug fixes:

  • screen size issues in iPod touch 5g
  • missing icon files for retina
  • fixed crash on load
  • made play buttons more visible for triggering samples
  • solved no root view controller error
  • new splash screen for iPod touch 5g
  • etc.,
  • fixed sync issues with github and Xcode

The upgrade to App store is 1.2 but the github version is at 1.3 – as there were a few incidental issues that didn’t get in the submission.

Next release should deal with these issues:

Version 2 should have automatic reference counting and make use of new NSNotification method of handing delegates.

I would like to leave the current version alone and start a new project from scratch – because the iOS dev process has changed greatly in 3 years.

Note: current local source code is in tkzic/coreaudio/audioGraph1.3

github is: https://github.com/tkzic/audiograph


iOS distribution provisioning


While preparing an upgrade for audioGraph today – ran into problems trying to upload and validate the binary (via archive in xcode 5)

The answer:

  • create a new distribution provisioning profile, after registering the upgrade in itunes connect.
  • download the profile and drag into xcode.
  • follow the instructions on this stack overflow post


Also – there were issues with icons. You need to assign the filenames in the .plist file

developing iOS apps with javascript and phonegap

Just worked through the first example in a tutorial: http://coenraets.org/blog/phonegap-tutorial/

by Christopher Coenraets.

How to develop using phonegap.build https://build.phonegap.com/

  • Write a javascript web app.
  • Submit to github or zip the folder
  • Upload to phonegap.build
  • Compile (for iOS you need to have previously submitted developer certificates)
  • After compiling, scan a QR code (in the browser) using your mobile device. This installs the app

Don’t yet know the steps to getting it in the app store, but this is amazing.


Use gen~ to build iOS AU effects


  1. In Max, write a gen~ patch and export as c++ to xcode
  2. Compile AU effect in xcode (code-signing with Audiobus API key) and launch on iPad
  3. Any app which recognizes Audiobus protocol can find and use your effect.


There are instructions at http://cycling74.com/wiki/index.php?title=Gen_Code_Export_iOS – which are expanded upon here.

Preliminaries to Preliminaries…

  1. Download the gen~ tremelo effect patch which runs ‘as is’ – and is set up to work as an AU effect with controls – from here: http://designingsound.org/2013/04/a-tremolo-au-plugin-with-max – the download button is near the end of the blog post.
  2. Download the c74 sample project  Media:iOSGenFilter.zip and copy it somewhere. This will be your project folder. It contains an xcode project file  and source code for the audiobus AU wrapper thing.
[annotations to c74 wiki notes follow:]


  • Download the AudioBus SDK [1] – You will need to register as a developer. (alternatively, you can clone the github archive)
  • Download The Amazing Audio Engine SDK [2] (alternatively, you can clone the github archive)
  • Download the AudioBus iOS app in order to test [3] – It costs $4.99. Install it on your iPad or iPhone/iPod
  • Obtain a temporary Audiobus API key – You can’t do this until after you finish step 9 below.


Building an Audiobus iOS project

  1. Duplicate the provided Xcode project – (not necessary unless you want to change the project name – you already copied it into your project folder). If you want to duplicate it – check out this stackOverflow post: http://stackoverflow.com/questions/6428247/duplicating-an-xcode-4-project
  2. Copy The Amazing Audio Engine SDK to the project folder. – Here are specifics:
    1. Launch TheAmazingAudioEngine.xcodeproj
    2. In xcode, build it
    3. In ‘products’ group  in xcode navigator, <ctrl>-click on the libTheAmazingAudioEngine.a file and open in finder.
    4. Copy this file into iosGenFilter folder inside your project folder
    5. You can close the AmazingAudioEngine project in Xcode now.
    6. Now, in finder, copy the AmazingAudioEngine folder (the one that contains .h and .m files) into the iosGenFilter folder
  3. From Audiobus SDK, copy the Audiobus folder and libAudiobus.a file to the  iosGenFilter folder
  4. Open the tremelo Max patch which you downloaded.
  5. In Max, Send gen~ the exportcode message in order to export the genpatcher as C++ code – actually do this…
    1. Using inspector on the gen~ object Choose the GenFilter folder (inside iosGenFilter folder) to save the exported code to.
    2. Lock patch and click on the exportcode message box to export the code.
  6. Launch GenFilter.xcodeproj in the iosGenFilter folder.
  7. In xcode, Change the namespace used in GenFilter.mm to match that of the exported code
    1. This means, find the statement near top of file starting with “using namespace” and make it look like this: using namespace gen_exported;
    2. (if you get a bunch of errors – then you need to find out what your exported code is called. It will be the most recent .cpp file in the GenFilter folder.)
  8. Copy your Audiobus API key to the appropriate location in AppDelegate.mm – can’t do this just yet – so skip.
  9. Connect your iPad to the computer. Build the project for iPad
  10. In ‘products’ group  in xcode navigator, <ctrl>-click on the libThe GenFilter.app file and select ‘open in finder’.
    1. <ctrl>-click GenFilter.app in finder and select ‘open package contents’. – leave this finder window open
    2. in a broswer go to http://developer.audiob.us/temporary-registration – you’ll probably need to login with your user/password set up earlier.
    3. drag the info.plist file from the finder window (step A) into the dropbox in the browser.  You should get a screen with your temporary API key. I had to do this twice to get it to work.
    4. Now copy the API key into the AppDelegate.mm file replacing the one in the following statement – it was around line 50. – re-build project to make sure you have no errors
   // Create an Audiobus instance
    self.audiobusController = [[[ABAudiobusController alloc] initWithAppLaunchURL:[NSURL URLWithString:@"genfilter.audiobus://"] apiKey:@"MTM4MDY1ODQzNSoqKkdlbkZpbHRlcioqKmdlbmZpbHRlci5hdWRpb2J1czovLw==:caS8WT1r4OmYz6t89pDq37qNi29hwFba+7+7bP8WubzyKN7Xj+tnU31/Wcaw580zQg8Jz+vC6Ha0H+qDM9JhdBxfQZ7w/R0VHrvsbZYQEJkj1bNpg2h2DfsF1mvFr6jb"] autorelease];
Now do the following steps (with iPad still connected to your computer)
  1. Launch audiobus on your iPad
  2. click the run button in xcode to launch GenFilter on your iPad
  3. In audiobus, select mic input, headphone output, and GenFilter for effect.