IPhone File Sharing: How do I recognize when files were added?

I have file sharing via iTunes working in my application ( What New link in iOS 3.2 ) by including the UIFileSharingEnabled key, but according to the documentation:

"Applications that support file sharing should be able to recognize when files have been added to the Documents directory and respond accordingly."

My question is, does my application work, and then the user decides to add a file, how can I respond to this event? And what event would I answer?

In other words, I know that my iPhone application needs to be done when a file is added, but not sure where to put this “response” code. Currently, if my application is running (it may be running in the background) and a file is being added, the only way to see the effect of this added file is to force the application to leave and then restart the application.

+3
source share
1 answer

, , . , iTunes. , , , , , , , , .

- (void)applicationDidBecomeActive:(UIApplication *)application
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+6

Source: https://habr.com/ru/post/1757478/


All Articles