iPod Library

Discussion in 'iOS Programming' started by khaos05, Jul 17, 2011.

  1. macrumors newbie

    Jul 6, 2011
    Hey everyone,

    I've been reading the iPhone Dev Documentation on using the MediaPlayer frameworks to access and play songs from the iPod library. However, the documentation and examples I can find are bland and not very helpful.

    Can anyone show me how to basically recreate the iPod app? At this point in my app development, I just need the app to open to show the iPod library (playlists, artists, songs, albums) and allow the user to navigate to the song and play it just as they would in the built-in iPod app.

    So far all I know to do is:
    MPMusicPlayerController *iPodPlayer = [MPMusicPlayerController iPodMusicPlayer];

    I don't know how to load the library into the view, or use any of the other functionality.

    Surely, it's somewhat "drag and drop" right? It would be a super pain to have to make ALL the ipod buttons in my app....
  2. macrumors 6502


    Dec 22, 2009
    Recreating the iPod App would be a giant project, don't be fooled into thinking something is simple, it never is.

    For accessing the library take a look at MPMediaQuery. And for loading that into a view take a look at some UITableView tutorials.
  3. macrumors 65816


    Dec 29, 2010
    Aartselaar // Antwerp // Belgium
    This actually made me facepalm.
    You think creating is just drag and dropping? creating the UI is mostly the easiest too, you "can" put some buttons in there in the XIB, but writing the code all around it is the harder part.
    Look, you can't do this in 1.2.3.
    I'd suggest you just start like every1 at the basics, learn what kind of controllers there are (hint, for this you need a tabbarcontroller). Learn how to switch views inside it, add navigation controllers to the tabs, learn how tableviews work, how to populate them, what happens if u click a cell. push new views. and that's just the basics. then you need to start learn how to mix that with your iPod library.

    Enough said, go.
  4. thread starter macrumors newbie

    Jul 6, 2011
    Well, I've been reading/watching tutorials and reading "iphone programming for dummies" like crazy.

    So far, my app has a tab bar controller, each with a nav controller, and a subsequent table view (for now). It loads and runs fine. Even have the icons set.

    All I need for the ipod part, is to load my tab and nav controller, with the user's ipod library. So inside the tab, does it need to be under a nav controller (so the user can click a song and navigate back to list) or implemented in some other way. I just want to list the library (sorted by artist, album, or all songs) and when the user selects a song, it will push a new view with album art, pause, next, and a few custom buttons.

    Sorry for the "drag and drop" comment. Apple normally makes things so user friendly, but I've learned developing for iOS isn't included in that list. I just figured since they gave you access to library, at least the core functionality of the ipod would be straightforward (i.e. loading a table view with songs, clicking would play song, etc.)

Share This Page