★ TouchArcade needs your help. Click here to support us on Patreon.

AVAudioPlayer causing simulator crash

07-13-2009, 04:00 AM
Joined: Mar 2009
Location: Oslo, Norway
Posts: 731
AVAudioPlayer causing simulator crash

I posted this over at Apple's dev.forums last night, but perhaps someone here can help?

I have hacked together the following code to play an aac I've created in Garageband

// Creates the bundle "bundle" and fills it with the address of the mainBundle
     NSBundle *bundle = [NSBundle mainBundle];
// Gets the path for the mainSong
     NSString *path = [bundle pathForResource:@"mainSong" ofType:@"m4a"];

// Checks if the path exists
     if (path != nil){
// Creates an URL with the path defined above
          NSURL *url = [NSURL fileURLWithPath:path];

//Creates the AVAudioPlayer mainSong and fills it with the song from the above URL
AVAudioPlayer *mainSong = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:NULL];
          [mainSong prepareToPlay];

// plays the song
          [mainSong play];

NSLog(@"Error! %@", path);
The code returns no errors or warnings when built but when compiling to run in the simulator I get the following error message:

Error loading /Library/QuickTime/LiveType.component/Contents/MacOS/LiveType:
262): Symbol not found: _SCDynamicStoreCopyConsoleUser
Referenced from:

Expected in:
The program then ends without running and without the simulator reporting the "normal" the app crashed (or whatever it normally says)... Anyone?

Last edited by NickFalk; 07-13-2009 at 04:39 AM.
07-13-2009, 06:25 AM
Ensure the frameworks you've added to the project are the iPhone versions.

Didev Studios || Twitter || YouTube || Facebook
GeoSnake || Bugz || Review Scraper (Open Source)
07-13-2009, 06:36 AM
This is a common error and if you look at what the compiler is telling you it's pretty easy to track down and fix. Simply go to YourHardrive/Library/Quicktime and remove the offending components. In this case it looks like a LiveType component. Rinse and repeat.
07-13-2009, 06:45 AM
Joined: Mar 2009
Location: Oslo, Norway
Posts: 731