I've been searching all over the web and have found solutions to mounted device detection from within a Cocoa App using the NSWorkspace notification system. However this notification doesn't seem to be triggered when an Apple device is docked.

I specifically want my OSX App to detect docked iPads/iPhones, be able asses whether the iOS version of my App is installed and then synchronise files. I realise that the easiest way to do this is using iCloud, but I do not as yet have a developer membership with Apple and would like the option to be able to synchronise files without the internet.

An iTunes like system would be ideal. Any ideas.

Thanks in advance.

有帮助吗?

解决方案

Apple don't provide any official APIs for doing what you ask.

Unofficially, you can try the stuff here: https://bitbucket.org/tristero/ipodaccessframework

You can definitely use it to determine whether a particular app is installed (by looking for a match for its bundle-id) and you can read/write files to/fro a particular apps document directory.

Disclaimer: this one is mine. There are definitely other libraries around that achieve similar results.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top