Application Crashed While Importing Songs from Ipod Library in iPhone for iOS 5.0

Application crashed while importing songs from Ipod library in iPhone for iOs 5.0

I have solved this issues,

just comment out this line

 fileName = [[fileName stringByAppendingString:@"-"] stringByAppendingString:[item valueForProperty:MPMediaItemPropertyArtist]];

because for some songs there is null artist so it's crash...................

Songs imported from ipod Library not working for iOS 5.1 but Works fine for 5.0 and later OS

Finally i got answer from here

really it's nice solution given by Albert.

how to import songs from iphone music library to my app

Please refer below Links..

You can access the Media Files in iTunes using MPMediaPickerController

MPMediaPickerController *mediaPicker = [[MPMediaPickerController alloc] initWithMediaTypes:MPMediaTypeMusic];
mediaPicker.delegate = self;
mediaPicker.allowsPickingMultipleItems = YES; // this is the default
[self presentModalViewController:mediaPicker animated:YES];

Below link is what you need.

http://iphoneghostrider.blogspot.in/2014/05/import-music-and-save-it-to-document.html

Below link is used to Import Media Files to Documents Directory

Application crashed while importing songs from Ipod library in Iphone for iOs 5.0

Below link is the sample give by Apple

https://developer.apple.com/library/ios/samplecode/AddMusic/Introduction/Intro.html

Hope it helps you...!

How to get file location of an song in iPod library in iOS

Due to copyright protection you can only play songs from music library. You can't access row audio file! But there are some tricks that can help like you can export music because you can do mixing type of stuff and after creating your new edited file you have new copy of your music file and you can send it I thing, but can't send directly from library like you send photo and video! You have to export it with export session first!

Refer this so post for that!

You should refer Apple sample code for that

And this so post and this tutoria also may helpful to you!

How can i record a song play from iPod library using MPMediaPickerController?

You can't record Songs imported from iPod library, you can only record mp3 file, for that you need to convert Mediaitem into mp3 format.

you can get referance for that from here, i hope this may help you.

Specific constraints of iOS sandboxing


  1. You will not have permission to read/write outside your application.
  2. You will not have permission to read/write outside your application.
  3. You will not have permission to read/write outside your application.

You can use the Media Player framework to access information about the user's library, but nothing using the filesystem.



Related Topics



Leave a reply



Submit