importing to Music app's Library

Discussion in 'iOS Programming' started by DennisBlah, Sep 2, 2015.

  1. DennisBlah macrumors 6502

    DennisBlah

    Joined:
    Dec 5, 2013
    Location:
    The Netherlands
    #1
    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!
     
  2. DennisBlah thread starter macrumors 6502

    DennisBlah

    Joined:
    Dec 5, 2013
    Location:
    The Netherlands
    #2
    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
     
  3. Zelda macrumors member

    Joined:
    Aug 10, 2014
    #3
    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.
     

Share This Page