Reputation: 1
I am testing the MixerHost sample code. However the following code: NSURL *beatsLoop = [[NSBundle mainBundle] URLForResource: @"beatsMono" withExtension: @"caf"]; the beatsLoop is nil.
What's the reason for that? Should I first create the beatsMono.caf file and then put into some specific path?
Any comments and solutions will be highly appreciated.
Thanks, finspoo
Upvotes: 0
Views: 2699
Reputation: 94794
Should I first create the beatsMono.caf file and then put into some specific path?
Yes. The file beatsMono.caf (case sensitive!) must exist in your application bundle for that method to succeed. This is done by adding the file to the target as a resource in XCode, you cannot do it at runtime.
Upvotes: 5