Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

milanjansari

macrumors newbie
Original poster
Jul 8, 2009
4
0
I'm using MediaPlayer.framework for access Music library it's works in OS 3.0 but when user run in OS 2.2.1 that time its give alert (i.e This feature not work in below 3.0 version) but when user run in OS 3.0 that its open music library.

i have done this step.

1) Add MediaPlayer.framework and it's Type Declare Weak
2) Here is the code which i am using.

onClick event
- (void)pickASongid)sender
{

Class mailClass = (NSClassFromString(@"MFMailComposeViewController") );
if (mailClass != nil)
{

MPMediaPickerController *picker = [[MPMediaPickerController alloc] initWithMediaTypes:MPMediaTypeMusic];
picker.delegate = self;
[self presentModalViewControllericker animated:YES];
[picker release];
}
else
{

UIAlertView *alert = [[UIAlertView alloc]initWithTitle:mad:"OS 3.0" message:mad:"It's Not working in below 3.0" delegate:self cancelButtonTitle:mad:"ok" otherButtonTitles:nil];
[alert show];
[alert release];
}
}

when I'm runing the app on my 2.2.1 device, I've got the following error:
dyld: Symbol not found: _OBJC_CLASS_$_MPMediaQuery
Referenced from: /var/mobile/Applications/EB544E0A-AE30-4DC8-BE9B-37B4F7C56EE2/CS2.app/CS2

Expected in: /System/Library/Frameworks/MediaPlayer.framework/MediaPlayer
Does anyone know what i am missing?

Thank you
 
hello,

i'm using below path.

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/Frameworks/MediaPlayer.framework
 
Only 3.0 gives access to the iPod's music library. It's not available in 2.x

EDIT: nevermind, I just read through your post again, I misunderstood the question.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.