views:

117

answers:

2

How do I access the iTunes database from my application. I seems apple can access iphone and itunes from their apps. How do I do the same?

A: 

You might want to look into MPMediaLibrary Class Reference. This link might help you.

http://developer.apple.com/iphone/library/documentation/MediaPlayer/Reference/MPMediaLibrary_ClassReference/Reference/Reference.html

Siddhartha Gutha
That's an iPhone Framework, the OP is asking about a Desktop API for this
Abizern
A: 

Applescript will give you to access to iTunes and many other applications -- not sure how it works with iPhone. If you open the Applescript-Editor in the /Applications/Utilities folder, you will find the 'Open Dictionaries' command under the File menu. This will list all the applications you can access with Applescript and the methods and properties they support.

Apple has a special object, NSApplescript, that helps you integrate Applescript in your Cocoa app, see Technical Note TN2084 - Using AppleScript Scripts in Cocoa Applications. Applescript does have a bit of a steep learning curve, but examples are easily found on the internet and on your own computer in the /Library/Scripts folder

Elise van Looij