Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can i access iPod Library on simulator?

I am trying some code to open the iPod Library using the simulator but the app crashes with this error:

MPMediaLibrary: Unable to launch iPod library server: application not found

Do I need an actual iPhone to test this code?

like image 887
coure2011 Avatar asked Jul 01 '10 16:07

coure2011


People also ask

How do I access iOS simulator files?

# Open application folder in Finder First, copy the path to the app folder from Xcode console. Then open Finder, click on Go -> Go to Folder and paste the application directory path. You will now be able to browse all the files in your application folder.

Where is iOS simulator data stored?

type: ~/Library/Application Support/iPhone Simulator. The Directories are the iOS version of the different Simulators. The Sub Directories are the Apps install on the simulator.

What is iPod library?

In the Music app , the library includes music you added or downloaded from Apple Music, music and videos you synced to iPod touch, TV shows and movies you added from Apple Music, and your iTunes Store purchases.


3 Answers

I've had some success using MPMediaLibrary / MPMediaQuery on the simulator (not playing music, but at least able to query for items) and xcode 4.6.3

I used iFunBox to copy these files from my device:

'Raw File System'/iTunes_Control/iTunes/MediaLibrary.sqlitedb
'Raw File System'/iTunes_Control/iTunes/MediaLibrary.sqlitedb-shm
'Raw File System'/iTunes_Control/iTunes/MediaLibrary.sqlitedb-wal
'Raw File System'/iTunes_Control/iTunes/Artwork

onto my mac in the folder:

"~/Library/Application Support/iPhone Simulator/6.1/Media/iTunes_Control/iTunes/"
like image 128
JosephH Avatar answered Sep 22 '22 16:09

JosephH


Yes you need to test on a device to access the media library.

like image 43
prendio2 Avatar answered Sep 23 '22 16:09

prendio2


Clarification to answer JosephH:

it even works in Xcode 6 but the files should be placed in a folder:

"~/Library/Developer/CoreSimulator/Devices/########-####-####-####-############/data/Media/iTunes_Control/iTunes"

where ########-####-####-####-############ - will be different for different versions of the simulator phone

like image 23
Rinat Abidullin Avatar answered Sep 20 '22 16:09

Rinat Abidullin