Using MediaPlayer framework.

Discussion in 'iOS Programming' started by Type4O, Jan 8, 2012.

  1. Type4O macrumors 6502

    Type4O

    Joined:
    Aug 23, 2011
    Location:
    Toronto, Canada
    #1
    I am new to iOS programming and am trying to write a small app that needs access to the mediaplayer framework. I can't do anything because there is no music player app in the iPhone simulator. Does anyone know how to get the music player app on the simulator or how to test without it? Specifically, this is the error I am getting:


    Could not open database at file://localhost/Users/Baron/Library/Application%20Support/iPhone%20Simulator/5.0/Media/iTunes_Control/iTunes/MediaLibrary.sqlitedb?readonly_shm=1: unable to open database file.

    Because I have no music player app in the simulator, this file path and file simply don't exist.

    Many thanks for any help.
     
  2. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #2
    Get a cheap used iPod Touch old generation, should cost you next to nothing, and you can test everything..
     
  3. xStep macrumors 68000

    Joined:
    Jan 28, 2003
    Location:
    Less lost in L.A.
    #3
    That suggestion needs to combined with the iOS release the OP is wanting to release on. Older iPod touches such as the 2nd gen won't even run iOS 4.3 for instance.
     
  4. Type4O thread starter macrumors 6502

    Type4O

    Joined:
    Aug 23, 2011
    Location:
    Toronto, Canada
    #4
    The problem is that as I am completely new to iOS programming, I would rather not spend the $99 until I feel comfortable with the language, but would like to try out an idea I have for an app. But, as I previously mentioned, the app needs the music player, which is not available in the simulator, and I can't put my app on my device unless I sign up for the program (spending the $99).

    Any ideas?
    Thanks again.


     
  5. xStep macrumors 68000

    Joined:
    Jan 28, 2003
    Location:
    Less lost in L.A.
    #5
    People in this situation have jail broken their device. I don't know the details, but when you do that and perhaps a couple other special things, you can load your developed app onto the jail broken device.
     
  6. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #6
    There is no music player for the Simulator. Your only choice is to find (buy, borrow) an iOS device for testing.
     
  7. seepel macrumors 6502

    seepel

    Joined:
    Dec 22, 2009
    #7
    You could insert fake data to get the rest of your UI up and running. In my app I create my own (selective) core data copy of the library once, and then the rest of the app interacts with my Core Data store. This allows me to run once on my device, copy over the store to the simulator and keep rolling on the UI without being held up by device builds for anything changes that don't require the Media Library. Maybe you could try something similar with a borrowed device.
     
  8. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #8
    That's a great idea.

    I've done something like that before by creating some fake GPS track data and writing a timer routine to feed that data to the Location delegate of an app running in the Simulator.
     

Share This Page