• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
MPMediaPickerController crashes!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MPMediaPickerController crashes!


  • Subject: MPMediaPickerController crashes!
  • From: Andy Davidson <email@hidden>
  • Date: Mon, 31 Dec 2012 11:54:50 -0800
  • Thread-topic: MPMediaPickerController crashes!

I started using MPMediaPickerController way back in IOS 4. For unknown reason my code now crashes when the user taps on the "album" tab bar button . Tapping on the "song" works as expected. My test device is configure to use iTunes match and iCloud and IOS 6.0.2. When it crashes I get the following message in my debug console. I do not use ARC

2012-12-31 10:53:26.847 MusicTrainerLite[1950:907] -[UIImage albumImageWithFormat:artworkCacheID:canUseSurfaceBackedImage:]: unrecognized selector sent to instance 0x1e59db10
2012-12-31 10:53:26.848 MusicTrainerLite[1950:907] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImage albumImageWithFormat:artworkCacheID:canUseSurfaceBackedImage:]: unrecognized selector sent to instance 0x1e59db10'

What is really strange is the sample app demonstrating how to use MPMediaPickerController, http://developer.apple.com/library/ios/#samplecode/AddMusic/Introduction/Intro.html works! This sample app was last updated on oct 1 2009.

I have compared the sample app and its Xcode project settings to my app and can not figure out what the difference is?

The only difference I have found is the sample app does not set the deployment target. I set my mine to 4.3. (even when I do not set it I still crash). I also noticed in the source code they tweak the status bar. 

    // The media item picker uses the default UI style, so it needs a default-style

    // status bar to match it visually

#warning clean up debug

    UIStatusBarStyle statusBarStyle = [[UIApplication sharedApplication] statusBarStyle];

    SCILog(@"statusBarStyle = %d", statusBarStyle);

    [[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleDefault animated: YES];

    [self presentModalViewController:mediaPicker animated:YES];


This did not resolve the problem.

I checked to make sure I am using the same frameworks as the addMusic sample app.

I also noticed that sample addMusic app lets users down load songs from the MPMediaPickerController. 

I tried setting  mediaPicker.showsCloudItems = YES;and NO; still crashes

The sample app sets     [mediaPicker setAllowsPickingMultipleItems:YES]; I still crash no matter how this is set.


This is really really strange. I can not figure out what my bug is. 


Any comments or suggestions would be greatly appreciated.

Andy
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Sample files in coreaudio-api messages (was: Re: more ausampler questions….)
  • Next by Date: Media Kind: Podcast
  • Previous by thread: Re: unable to change volumes of mixer inputs? (iOS)
  • Next by thread: Media Kind: Podcast
  • Index(es):
    • Date
    • Thread