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

DennisBlah

macrumors 6502
Original poster
Dec 5, 2013
485
2
The Netherlands
Hi all,

I'm looking for something to import files to the music library.
The same as using ALAssetsLibrary
I can import photos and videos to the photos library using:
Code:
[library writeImageDataToSavedPhotosAlbum: fileData metadata:nil completionBlock:^(NSURL *assetURL, NSError *error) {
  NSLog(@"Success writing image: %@", [assetURL path]);
  }];
//-----
[library writeVideoAtPathToSavedPhotosAlbum: [NSURL URLWithString: [zipOutputPath stringByAppendingString: [NSString stringWithFormat: @"/%@", fileName]]] completionBlock:^(NSURL *assetURL, NSError *error) {
  NSLog(@"Success writing video: %@", [assetURL path]);
  }];

I would also like to import audio files from my app to the music library.

Thanks in advance!
 
Nobody has any idea?
I found statements that it's not possible to copy music to the iPhone's library itself.

Why not? Why can you copy video's and images to the device's library then?
Whats going on here
 
I asked the same question approx. 10 months ago. No answers were put forward.
I ended up emailing the music file to my Mac and dropping it in iTunes, then sync my iPhone.
Ridiculous!!! Right??
I thought App extensions would help with this, but haven't had time to investigate the possibilities.
 
  • Like
Reactions: DennisBlah
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.