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?
# 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.
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.
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.
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/"
Yes you need to test on a device to access the media library.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With