iOS Using MediaPlayer framework.

Type4O

macrumors 6502
Original poster
Aug 23, 2011
331
117
Toronto, Canada
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.
 

xStep

macrumors 68020
Jan 28, 2003
2,006
99
Less lost in L.A.
Get a cheap used iPod Touch old generation, should cost you next to nothing, and you can test everything..
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.
 

Type4O

macrumors 6502
Original poster
Aug 23, 2011
331
117
Toronto, Canada
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.


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.
 

xStep

macrumors 68020
Jan 28, 2003
2,006
99
Less lost in L.A.
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.
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.
 

seepel

macrumors 6502
Dec 22, 2009
471
0
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.
 

firewood

macrumors 604
Jul 29, 2003
7,656
887
Silicon Valley
You could insert fake data to get the rest of your UI up and running.
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.