I just tested the code you posted and it works very well as is - no errors here.
So you probably forgot to do one (or more) of the following things:
- include
AudioToolbox
framework into your project
#import <AudioToolbox/AudioToolbox.h>;
in your ViewController.m file
- add sound1.wav file to your project
- check that sound1.wav is really sound1.wav and not Sound1.wav or similiar
- connect your IBAction method to some event that really gets triggered