56 Comments

Summary:

You’ve seen all the different drum apps, right? Well, they’re really easy to make. In this iPhone Dev Sessions article, I want to teach you how to make Bickboxx, an actual app that’s in the iTunes App Store. Grab Bickboxx (FREE) from the iTunes App Store […]

BickBoxx-1

You’ve seen all the different drum apps, right? Well, they’re really easy to make. In this iPhone Dev Sessions article, I want to teach you how to make Bickboxx, an actual app that’s in the iTunes App Store.

Grab Bickboxx (FREE) from the iTunes App Store if you want to see this puppy in action so you have an idea of what you’re building. Also, I’ve opened up the source code for free at Github. Feel free to download it, report issues, or even fork your own version and change it as you see fit.

More info on the open-source community project at Bickbot’s Bickboxx page.

Note: You don’t need to download the code from Github to get through the tutorial.

An On-going Project

I plan on adding more tutorials with enhancements to this project. Here are a couple of things that could be featured in future iPhone Dev Sessions.

  • Key logger
  • Adding analytics tracking
  • Adding application preferences
  • Track recorder and editor
  • Vibration feedback
  • Add your own custom sounds
  • Access your iPod library as a background track

Leave a comment with other enhancements you want to learn.

OK, let’s get to creating Bickboxx!

Get Started

Create a new View-based project in XCode. Name the project “Bickboxx”.

Download this zip file and unzip it. These are all the sounds, images, and icons you need for Bickboxx. Drag all these files to the Resources. Hat tip to John Ellenich for the graphics/sounds.

You need to copy the item to the project’s directory, so put a check mark next to “Copy items into destination group’s folder (if needed).” Your settings should look similar to this. Click Add.

Adding the background image in Interface Builder

Double-click BickboxxViewController.xib to open it in Interface Builder. Drag an Image View (UIImageView) from the Library to the View window. This will act as a placement holder for our background image.

Bring up the Attributes Inspector. Set the Image to Background.png.

Creating the Button in Interface Builder

Drag a Round Rect Button (UIButton) to the View.

Bring up the Attributes Inspector. We don’t want the button to look like an ugly white rectangle. Set the Type to Custom.

Further down the Attributes Inspector, set the button’s state to Normal (or Default State Configuration depending on your version of Xcode). This is what the button looks like when it’s not doing anything.

Set the button’s Image to B Inactive.png. You need to resize the button in the View to make sure the “B” button is fully shown.

Now, change the button’s state to Highlighted (or Highlighted State Configuration depending on your version of Xcode). This is what the button looks like when it’s pressed down.

Set the button’s Image to B Active.png.

Drag another Round Rect Button (UIButton) to the View and repeat this section for the letters “E”, “A”, and “T”. Your View should now look like this:

Close Interface Builder for now.

Build and Go to make sure everything is still working. Touch the buttons, and they should light up.

Adding the Sounds Code

We have an interface that doesn’t do anything. Let’s fix that. The audio framework we need isn’t added by default. We have to add the AudioToolbox framework.

Control+Click the Frameworks folder on the left. Go to Add → Existing Frameworks…

Select the AudioToolbox.framework from /System/Library/Frameworks.

Click OK and add it to the project.

Open BickboxxViewController.h and add this code to it.


#import <UIKit/UIKit.h>
#import <AudioToolbox/AudioServices.h>

@interface BickboxxViewController : UIViewController {
    CFURLRef        bNoteFileURLRef;
    SystemSoundID    bNoteFileObject;
    CFURLRef        eNoteFileURLRef;
    SystemSoundID    eNoteFileObject;
    CFURLRef        aNoteFileURLRef;
    SystemSoundID    aNoteFileObject;
    CFURLRef        tNoteFileURLRef;
    SystemSoundID    tNoteFileObject;
}

@property (readwrite)    CFURLRef        bNoteFileURLRef;
@property (readonly)    SystemSoundID    bNoteFileObject;
@property (readwrite)    CFURLRef        eNoteFileURLRef;
@property (readonly)    SystemSoundID    eNoteFileObject;
@property (readwrite)    CFURLRef        aNoteFileURLRef;
@property (readonly)    SystemSoundID    aNoteFileObject;
@property (readwrite)    CFURLRef        tNoteFileURLRef;
@property (readonly)    SystemSoundID    tNoteFileObject;

@end

At the top, we’re referencing AudioServices.h from the AudioToolbox framework we imported earlier.

Below that is the declaration of properties for four sounds for the “B”, “E”, “A” and “T” buttons.

bNoteFileURLRef is the file location reference for the bNoteFileObject. This is the sound the “B” button will make.

These are the properties for the “E”, “A” and “T” sounds as well.

The BickboxxViewController.m File

Open BickboxxViewController.m. We need to synthesize the getters/setters for our properties.

You can do this by adding this after @implementation BickBoxxViewController:


@synthesize bNoteFileURLRef, bNoteFileObject, eNoteFileURLRef,
eNoteFileObject, aNoteFileURLRef, aNoteFileObject,
tNoteFileURLRef, tNoteFileObject;

Changing the viewDidLoad Method

Locate the viewDidLoad method. It will be commented out. You want to uncomment it to activate it.

The viewDidLoad method gets called after all the UI components are created. This is a good place for any startup code you need your app to perform. In this case, we’ll need to set our properties to the correct sounds.

The first thing we need to do in viewDidLoad is get the main bundle for the app. The main bundle allows you to use a folder hierarchy to organize and locate many types of application resources including images, sounds, localized strings, and executable code.

After [super viewDidLoad];, add this code to get the main bundle for the app.


// Get the main bundle for the app
CFBundleRef mainBundle;
mainBundle = CFBundleGetMainBundle ();

To build the sound for the “B” button, we need to get the path of the sound file we want to play. The name of the sound file is B.aifc. This is the code to get the URL to the found file to play. Put this code after the code where you get the main bundle.


// Get the URL to the sound file to play
bNoteFileURLRef  =    CFBundleCopyResourceURL (
                                             mainBundle,
                                             CFSTR ("B"),
                                             CFSTR ("aifc"),
                                             NULL
                                             );

Note that valid system sound packages are .wav, .aif and .caf files.

Now that we have bNoteFileURLRef set we can associate the sound file with the system sound object bNoteFileObject. The AudioServicesPlaySystemSound function lets you very simply play short sound files.

Add this code after the code that gets the sound file URL.


// Create a system sound object representing the sound file
AudioServicesCreateSystemSoundID (bNoteFileURLRef, &bNoteFileObject);

We finished loading up the sound for the “B” button. We’ll need to load up the sounds for the “E”, “A” and “T” buttons.

Try to code this part yourself. If you get stuck, the viewDidLoad method should look like this when you’re done.


// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];

    // Get the main bundle for the app
    CFBundleRef mainBundle;
    mainBundle = CFBundleGetMainBundle ();

    // Get the URL to the sound file to play
    bNoteFileURLRef  =    CFBundleCopyResourceURL (
                                                 mainBundle,
                                                 CFSTR ("B"),
                                                 CFSTR ("aifc"),
                                                 NULL
                                                 );

    // Create a system sound object representing the sound file
    AudioServicesCreateSystemSoundID (bNoteFileURLRef, &bNoteFileObject);

    // Get the URL to the sound file to play
    eNoteFileURLRef  =    CFBundleCopyResourceURL (
                                                 mainBundle,
                                                 CFSTR ("E"),
                                                 CFSTR ("aifc"),
                                                 NULL
                                                 );

    // Create a system sound object representing the sound file
    AudioServicesCreateSystemSoundID (eNoteFileURLRef, &eNoteFileObject);

    // Get the URL to the sound file to play
    aNoteFileURLRef  =    CFBundleCopyResourceURL (
                                                 mainBundle,
                                                 CFSTR ("A"),
                                                 CFSTR ("aifc"),
                                                 NULL
                                                 );
    // Create a system sound object representing the sound file
    AudioServicesCreateSystemSoundID (aNoteFileURLRef, &aNoteFileObject);

    // Get the URL to the sound file to play
    tNoteFileURLRef  =    CFBundleCopyResourceURL (
                                                 mainBundle,
                                                 CFSTR ("T"),
                                                 CFSTR ("aifc"),
                                                 NULL
                                                 );

    // Create a system sound object representing the sound file
    AudioServicesCreateSystemSoundID (tNoteFileURLRef, &tNoteFileObject);
}

Creating Our IBActions

Our BEAT buttons need to be associated with IBActions to make them do something. First, let’s declare the methods. Open BickboxxViewController.h and add this code before the @end line.

- (IBAction)bSound:(id)sender;
- (IBAction)eSound:(id)sender;
- (IBAction)aSound:(id)sender;
- (IBAction)tSound:(id)sender;

Your BickboxxViewController.h should now look like:


#import <UIKit/UIKit.h>
#import <AudioToolbox/AudioServices.h>

@interface BickBoxxViewController : UIViewController {
    CFURLRef        bNoteFileURLRef;
    SystemSoundID    bNoteFileObject;
    CFURLRef        eNoteFileURLRef;
    SystemSoundID    eNoteFileObject;
    CFURLRef        aNoteFileURLRef;
    SystemSoundID    aNoteFileObject;
    CFURLRef        tNoteFileURLRef;
    SystemSoundID    tNoteFileObject;
}

@property (readwrite)    CFURLRef        bNoteFileURLRef;
@property (readonly)    SystemSoundID    bNoteFileObject;
@property (readwrite)    CFURLRef        eNoteFileURLRef;
@property (readonly)    SystemSoundID    eNoteFileObject;
@property (readwrite)    CFURLRef        aNoteFileURLRef;
@property (readonly)    SystemSoundID    aNoteFileObject;
@property (readwrite)    CFURLRef        tNoteFileURLRef;
@property (readonly)    SystemSoundID    tNoteFileObject;

// The new code you added
- (IBAction)bSound:(id)sender;
- (IBAction)eSound:(id)sender;
- (IBAction)aSound:(id)sender;
- (IBAction)tSound:(id)sender;

@end

Close the file and open BickboxxViewController.m. Add the implementation to make the IBAction methods make the appropriate system sounds by invoking the AudioServicesPlaySystemSound method.

To play the “B” sound, the implemented method should make a call to AudioServicesPlaySystemSound and use the bNoteFileObject we created above. Add this after the property synthesis code:

- (IBAction)bSound:(id)sender {
AudioServicesPlaySystemSound (self.bNoteFileObject);
}

Add similar implementations for the “E”, “A” and “T” sounds as well.

For reference, the top of BickboxxViewController.m should look like:


#import "BickBoxxViewController.h" 

@implementation BickBoxxViewController

@synthesize bNoteFileURLRef, bNoteFileObject, eNoteFileURLRef,
eNoteFileObject, aNoteFileURLRef, aNoteFileObject,
tNoteFileURLRef, tNoteFileObject;

- (IBAction)bSound:(id)sender {
    AudioServicesPlaySystemSound (self.bNoteFileObject);
}

- (IBAction)eSound:(id)sender {
    AudioServicesPlaySystemSound (self.eNoteFileObject);
}

- (IBAction)aSound:(id)sender {
    AudioServicesPlaySystemSound (self.aNoteFileObject);
}

- (IBAction)tSound:(id)sender {
    AudioServicesPlaySystemSound (self.tNoteFileObject);
}

For the last piece of code, we need to clean up our mess so we don’t have memory leaks. At the bottom of BickboxxViewController.m, add these lines to your dealloc method:


- (void)dealloc {
    [super dealloc];
    AudioServicesDisposeSystemSoundID (self.bNoteFileObject);
    AudioServicesDisposeSystemSoundID (self.eNoteFileObject);
    AudioServicesDisposeSystemSoundID (self.aNoteFileObject);
    AudioServicesDisposeSystemSoundID (self.tNoteFileObject);
    CFRelease (bNoteFileURLRef);
    CFRelease (eNoteFileURLRef);
    CFRelease (aNoteFileURLRef);
    CFRelease (tNoteFileURLRef);
}

We’re done coding. Build and Go the project to make sure nothing is on fire. Your buttons won’t make any sounds yet. We’ll need to link our code to our interface.

Linking the buttons to the code in Interface Builder

Now that our code is done, we can link our buttons to our code. We’ll start with the “B” button link it with the bsound method. To do this, open up BickboxxViewController.xib.

Control+Click on the File’s Owner object so we can link our “B” button to our bsound.

Drag from the bSound in File’s Owner to the “B” button in the View.

An overlay should pop up. Choose Touch Down. The normal default is to execute the action when the finger is lifted from the button. We don’t want that. Soundboards don’t work that way. This will call the bSound IBAction method when the button is pressed down.

Do this linking with the rest of the buttons. When you’re done, Control+Clicking File’s owner should look like this.

Here’s a video of me using Bickboxx to practice for my opening act for Paul Oakenfold.

You’re done!

That’s it — you’re done! Compile and run this and you’ll be DJ-ing parties with Moby in no time.

Again, you can download the source from social coding site Github. Feel free to file issues here if the code needs fixing or enhancing.

Homework

Are you ready to apply your newfound knowledge? Solidify it with this extra credit assignment.

Your homework: Add a new button and a new sound to the project.

If there are any typos, problems, suggestions, or questions, let me know here in the comments.

You’re subscribed! If you like, you can update your settings

  1. Tutorial: muzyczna aplikacja + kod źródłowy | appledev.pl Monday, May 11, 2009

    [...] muzyczną aplikację, to zapraszam do zapoznania się z tutorialem na stronie theAppleBlog – iPhone Dev Sessions: Create a Drum App. Post opisuje sposób stworzenia aplikacji muzycznej [...]

  2. Awesome tutorial and cool app!!! Thanks for sharing!!!!!!!!

  3. Michael Bubrick Monday, May 11, 2009

    Bravo! This is an awesome, logical, concise step-by-step tutorial. Cheers from the undevelopers of the world.

  4. Great! Thanks a lot!

  5. Great work, how come you did not use Avaudio player? Also if I wanted to jump the gun and get started, how would I go about to coding a sequencer to record my patterns? Thanks in Advance!

  6. Awesome tutorial. Finally, something new. I’m tired of looking at table view tutorials. I can’t wait to see more!

  7. What to read on the GigaOM network Tuesday, May 12, 2009

    [...] | 10:03 AM PT | 0 comments Verizon MiFi 2200 review: mobile broadband done right (jkOnTheRun) iPhone dev sessions: Create a drum app (TheAppleBlog) Torrents on your iPhone? Yes! No! Maybe! (NewTeeVee) Google defends its power [...]

  8. That was a refreshing change as tutorials go. Quick results. Simple explanation.

    Of course, now we want more.

  9. Rajesh Rajappan Tuesday, May 12, 2009

    Thank you! That is an awesome app.

  10. Jay Robinson Tuesday, May 12, 2009

    Could you change the B-E-A-T to be F-A-R-T?

  11. Henry Balanon Wednesday, May 13, 2009

    @Magnan: Didn’t use it because it’s a short sound.

    @Jay: Yeah I’m working on it right now! jk :)

  12. I’m looking forward to your Future tutorials

  13. Tuesday Afternoon News | MacTalk Test Friday, May 15, 2009

    [...] Apple Blog has a nice tutorial on making a drum iPhone app. Good way to get a handle on tapping and um, audio, and timing, and stuff. [...]

  14. Уроки iPhone SDK: Создаем приложение – “Ударная установка” | LookApp.ru – обзоры программ и игр для iPhone Saturday, May 16, 2009

    [...] Текст оригинальной статьи на английском языке [здесь] [...]

  15. Best set of iPhone tutorials ever!

    A-W-E-S-O-M-E job, i cant express how tankful i am for this.

    I’ll be sure to check your site daily from now on.

  16. Weekly App Store Picks: May 16, 2009 Sunday, May 17, 2009

    [...] Henry Balanon helped melt away those Monday blues with a new iPhone Dev Sessions tutorial. For coders and tech-minded musicians alike, this should be a particularly interesting one, as [...]

  17. Hi, this is about the
    Changing the viewDidLoad Method
    Locate the viewDidLoad method. It will be commented out. You want to uncomment it to activate it.

    part, how do you uncomment it?

  18. Hi, i really need help please!

    Locate the viewDidLoad method. It will be commented out. You want to uncomment it to activate it.

    how and what is “uncommenting it”

  19. Henry Balanon Tuesday, May 19, 2009

    @louisweeg Remove the /* and the */ from the block of code and it will uncomment it. You’ll know it’s uncommented when it is no longer green in Xcode.

  20. Thanks for this wonderful Tutorial. I was able to try my hands on this application on my macbook. I am looking forward to see more.

    Thanks
    Sadish Bala

  21. Hey i found a new app called RockDrum it triggers the sound with the accelerometer you just play like using air drumsticks in a virtual rockdrum.

    Also includes a kind of beatbox feature take a look at

    http://www.vfxwarrior.com

  22. 43 iPhone Development Resources Monday, June 1, 2009

    [...] MattJ’s collection of iPhone developer resources. A lot of good stuff here including our very own Create A Drum App tutorial. [...]

  23. 200ml » Create a Drum App Tuesday, June 9, 2009

    [...] iPhone Dev Sessions: Create a Drum App Written on May 11, 2009 by Henry Balanon and 24 people have commented [...]

  24. I’m loving these, trying to start programming myself, got dozens of ideas I’d like to get on the app store asap – where’s the best place to hire a developer…? btw I’m UK based.

  25. Great tutorial, but it breaks Apple’s design guidelines….SystemSound shouldn’t be used for game sounds.

  26. I’m trying to replace one of the button sounds with my own sound, but nothing will play. Does my file need to be a specific type of file?

  27. Alex Witkamp Thursday, July 9, 2009

    @Julia in the ViewController.m you can replace the CFSTR with the filename and the file extension. Not all files are supported.

    Btw, how can you make the sound to play twice when you click it twice?

    Press once: Thiing
    Press twice now: Thii-Thiing
    Press twice the way I want it: Thii-Thii-ng-ng

    Can anyone help me with this?

  28. iPhone Dev Sessions: Create a Drum App « Netcrema – creme de la social news via digg + delicious + stumpleupon + reddit Sunday, July 12, 2009

    [...] iPhone Dev Sessions: Create a Drum Apptheappleblog.com [...]

  29. When will we see a continuation of this project as promised?

  30. how do you use this with a tab bar app?

    i have created the tabs and screens, and added the relevant code, but when i press the button to play the sound, the app crashes out.

  31. Hi, firstly thank you so much for this tutorial, it’s been the most helpful one I’ve found after hours of searching! I’ve completed the app as per the tutorial and now I’m learning how to customize it. My question is this: I’m trying to customize the sounds and I noticed in the above comments that for longer sound files you need to use Avaudio right? To use this would I just import it into the frameworks and change the code accordingly? I’m going to experiment with other techniques too. Thank you so much for writing this and giving me the confidence to try out something completely new!
    Thanks so much for you help I really appreciate it!

  32. I try too replace the sound with my own and I change the code too my extension in the ViewController.m but nothing plays still! What are supported file types and how do I make a .AIFC file?

  33. iPhone Dev Sessions: Adding Analytics to Your App Monday, August 10, 2009

    [...] to another episode of TheAppleBlog’s iPhone Dev Sessions. We left off with a drum app tutorial called Bickboxx. For this tutorial, we’re building off of the first Bickboxx project, so go back and finish it if [...]

  34. iPhone Dev Sessions: Adding Analytics to Your App « CodeEdoc – Technology And Programming News Monday, August 10, 2009

    [...] to another episode of TheAppleBlog’s iPhone Dev Sessions. We left off with a drum app tutorial called Bickboxx. For this tutorial, we’re building off of the first Bickboxx project, so go back and finish it if [...]

  35. Hi Henry,

    I downloaded the code from github, and opened with xcode. When I built and ran it in simulator, the app crashed with this error: “The application code must be 32 characters”.

    Is the code working?

    1. I am having the exact same problem as Jason. Downloaded the code, built and ran, simulator opens but the app crashes — “The application BickBoxx quit unexpectedly.” The report says ” ‘The application code must be 32 characters’.”

  36. Help, 2 errors, and a shitload of warnings, look:

    Line Location BickBoxxViewController.xib:8: This view overlaps one of its siblings.
    Line Location BickBoxxViewController.xib:8: This view overlaps one of its siblings.
    Line Location BickBoxxViewController.xib:8: This view overlaps one of its siblings.
    Line Location BickBoxxViewController.xib:8: This view overlaps one of its siblings.
    Line Location BickBoxxViewController.xib:9: This view overlaps one of its siblings.
    Line Location BickBoxxViewController.xib:10: This view overlaps one of its siblings.
    Line Location BickBoxxViewController.xib:11: This view overlaps one of its siblings.
    Line Location BickBoxxViewController.xib:12: This view overlaps one of its siblings.
    Line Location Tool:0: collect2: ld returned 1 exit status
    Line Location Tool:0: “_AudioServicesPlaySystemSound”, referenced from:
    Line Location Tool:0: symbol(s) not found
    Line Location Tool:0: -[BickBoxxViewController viewDidLoad] in BickBoxxViewController.o
    Line Location Tool:0: -[BickBoxxViewController viewDidLoad] in BickBoxxViewController.o
    Line Location Tool:0: -[BickBoxxViewController viewDidLoad] in BickBoxxViewController.o
    Line Location Tool:0: -[BickBoxxViewController viewDidLoad] in BickBoxxViewController.o
    Line Location Tool:0: “_AudioServicesCreateSystemSoundID”, referenced from:
    Line Location Tool:0: -[BickBoxxViewController bSound:] in BickBoxxViewController.o
    Line Location Tool:0: -[BickBoxxViewController dealloc] in BickBoxxViewController.o
    Line Location Tool:0: -[BickBoxxViewController dealloc] in BickBoxxViewController.o
    Line Location Tool:0: -[BickBoxxViewController dealloc] in BickBoxxViewController.o
    Line Location Tool:0: “_AudioServicesDisposeSystemSoundID”, referenced from:
    Line Location Tool:0: -[BickBoxxViewController tSound:] in BickBoxxViewController.o
    Line Location Tool:0: -[BickBoxxViewController aSound:] in BickBoxxViewController.o
    Line Location Tool:0: -[BickBoxxViewController eSound:] in BickBoxxViewController.o
    Line Location Tool:0: -[BickBoxxViewController dealloc] in BickBoxxViewController.o

  37. nvm, i fixed it

  38. great job…
    thanks for sharing .. :)

  39. I’m not sure why the app crashes when I “Build and Go” the code from github, but I just tried it from the tutorial and it worked! (I tried the tutorial last night and ended up with a lot of errors — my fault I’m sure). Anyway, thank you very very much for posting this tutorial and the code — I am as much a beginner as is possible with app development and this helped me a great deal.

  40. Excellent!!! Thank you very much from Argentina!!!!
    Now we want more tutorials!!

  41. Джентльмен возвращается домой поздно вечером.Погода отвратительная:дождь,снег,ветер.У самого дома он замечает промокшую и продрогшую симпатичную девушку.Естественно,он,как истинный джентльмен,приглашает ее к себе домой,угощает кофе,укутывает пледом.Но гостья все время продолжает твердить,что ей холодно.Наконец,когда джентльмен уже не знает что и делать,она говорит: -А вот мой муж в таких случаях всегда согревал меня своим телом… -Простите,мадам,но не могу же я в такую погоду идти искать тело вашего мужа…

  42. I get up to the bit where you open the xib and control click for the file owner but I don’t see what you have on your tutorial. Must have done something wrong but have tried it 3 times and get the same thing. Any ideas????

  43. Me vs. Objective C « Clubiphoneapps's Blog Tuesday, December 15, 2009

    [...] Categories application development Games ideas Interface Design iPhone Journey Uncategorized Me vs. Objective C December 15, 2009, 8:15 pm Filed under: Uncategorized Tutorial:  iPhone Dev Sessions: Create a Drum App [...]

  44. Won’t build, have 4 errors and am a bit stuck
    Category: Error: expected * before *
    bickboxxViewController.m:13:0 Expected identifier before ‘synthesize’
    Category: Error: method definition not in @implementation context
    bickboxxViewController.m:17:0 Method definition not in @implementation context
    Category: Error: Other
    bickboxxAppDelegate.m:21:0 Request for member ‘view’ in something not a structure or union
    bickboxxViewController.m:15:0 @synthesize property must be in implementation context

    Help would be great

    1. All fixed… ta very much!

  45. 43 iPhone Development Resources | Experts Developers Wednesday, January 13, 2010

    [...] collection of iPhone developer resources. A lot of good stuff here including our very own Create A Drum App tutorial. VN:F [1.8.0_1031]Rating: +1 (from 1 vote)43 iPhone Development Resources10.0101 [...]

  46. this tutorial is fabulous! i’m beyond “new” to all of this development and this was by far the best tutorial i’ve come across. i, too, had a little trouble “uncommenting” at the “viewDidLoad” method, but was proud of myself for figuring it all out myself.
    i would LOVE to see more tutorials like this!

  47. Hmm i get this error when i try the sample code:

    *** Terminating app due to uncaught exception ‘InvalidApplicationCode’, reason: ‘The application code must be 32 characters’
    2010-01-25 23:31:17.618 BickBoxx[1403:207] Stack: (
    32502875,
    2509088009,
    11387,
    9515,
    2811423,
    2849290,
    2837384,
    2819795,
    2846901,
    39440081,
    32287616,
    32283720,
    2813545,
    2850819,
    9404,
    9258
    )

    Im using the Simulator 3.1.2 – Debug (get the same error with Release)
    Anyone knows this error?

    1. I’m getting the same error. I hope someone know’s what is causing this. It would really nice to get this too work. I have tried other versions of the simulator and still isn’t working. :(
      Thanks,
      Joe

  48. everything works except the sound and I can’t understand what the problem.

  49. had a few bugs and eventually managed to find out where i’d gone wrong by downloading source code and comparing with what I’d done.

    great tutorial thanks.

  50. Final Project FAQ « Music 147 – Spring 2010 Saturday, May 29, 2010

    [...] answer is yes, of course! Thanks to the person who asked the question, here is a link that all of us can check out.  The simplified version of the article is as [...]

  51. Wednesday, May 26, 2010 « Music 147 – Spring 2010 Saturday, May 29, 2010

    [...] Sound file playback tutorial is here. [...]

  52. Gabriel Parriaux Wednesday, August 11, 2010

    Great tutorial, thank you!

    Actually, I have a problem when I run the app on my iPhone 4: there is no sound at all. When I run it in the simulator, the sound works perfectly. No error, nothing.

    Very strange also: the original app Bickboxx from the appstore worked on my iPhone first time I launched it, with sound and all, but now the sound doesn’t work anymore too!! Really wierd! Tried to shut down and up again the iPhone, but still the same problem.

    Someone has seen the same? Any hint?

    Last question: we are two teachers who want to study iPhone development with students (beginners). If you know more tutorials of such a quality, that we can follow from beginning to the end, with code, we would be very pleased if you want to share some links! Thanks a lot by advance!

Comments have been disabled for this post