access music database from cocoa

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?


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

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

Need Your Help

Android Share intent - issue with Facebook

android facebook android-intent share

I need to share text and one image from my application via a share intent. I read this article. I thought it would be easy to create share intent. But it is not so easy, because there is a problem ...

Reduce code repetition in express API route

node.js express mongoose

I'm learning express and am currently writing an API, and have this structure: