Is there a way to get notified when a user drags a file into iTunes File Sharing and Sync?

When I connect the iPhone to iTunes and drag the file into the “File Sharing” section of my application, the application disappears for a moment on the screen and then returns. It seems that none of the delegation methods of the application starts at this time, not even something like "went into the background, came to the fore."

As soon as my application returns after synchronization, when the user has added or deleted files, I want to refresh the screen.

Maybe a notification has been sent?

+3
source share
3 answers

- (void)applicationWillResignActive:(UIApplication *)application - (void)applicationDidBecomeActive:(UIApplication *)application

+4

, <MediaPlayer/MediaPlayer.h> framework [MPMediaLibary defaultMediaLibrary] MPMediaLibraryDidChangeNotification, , - , iTunes.

, :

#import <MediaPlayer/MediaPlayer.h>

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(<#selector#>:) name:MPMediaLibraryDidChangeNotification object:[MPMediaLibrary defaultMediaLibrary]];

, - (void)beginGeneratingLibraryChangeNotifications

+6

applicationWillResignActive iOS 5.0.

DirectoryWatcher DocInteraction.

+1

All Articles