Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NSSound undeclared on iPhone?

sound = [[NSSound alloc] initWithContentsOfFile:@"staticbeam09.wav" byReference:YES];

Code referenced from Apple docs. Getting an error when I put this in viewDidLoad. If I put

NSSound *sound;

in the header file, I get the specifier-qualifier error at the top of my implementation file. What do I have to do to make this work? I was just pasting the code from Apple's documentation - has this been deprecated? Thanks for your help!

like image 300
quantumpotato Avatar asked Dec 17 '25 00:12

quantumpotato


1 Answers

There is no NSSound class in iPhone SDK It's only for MacOS

like image 114
oxigen Avatar answered Dec 19 '25 19:12

oxigen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!