Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Notification callback in iOS when iTunes sync/file transfer is complete

I have searched for how to receive callbacks in iOS5 when the file system has changed. I've found the following sample from Apple's site, but it only notifies the given delegate when a file is removed/created.

DirectoryWatcher class in the DocInteraction sample app

http://developer.apple.com/library/ios/#samplecode/DocInteraction/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010052

Is there an API call that I can make to receive a "sync is complete" callback event? Note, a user might transfer large files and I need to know when the transfer is complete. Also, in iOS5, iTunes sync can occur in the background, meaning that your application doesn't necessarily leave the foreground; hence this method is not called:

- (void)applicationDidBecomeActive:(UIApplication *)application
like image 225
mdupls Avatar asked Oct 21 '11 14:10

mdupls


1 Answers

I took the DirectoryWatcher code and made some modifications to poll the file sizes. https://github.com/hwaxxer/MHDirectoryWatcher

like image 103
hwaxxer Avatar answered Nov 02 '22 21:11

hwaxxer