How to integrate iCloud into an application without documents?

I read Apple tutorials and Ray Wenderlich tutorial. It seems like I'm forced to use UIDocument, so I read it in the docs. I found that using a document-based approach effectively.

My problem is that I don’t want to get attached to the methods specific to the platform (iOS), so my application has its own models created from scratch, which are inherited only from NSObject. This includes saving / loading.

Now I need to integrate iCloud along with older models. How can I do this elegantly / efficiently when I can keep my old model implementation and be able to integrate iCloud?

+5
source share
1 answer

UIDocument. iCloud NSFileManager NSMetadataQuery. :

  • , , iCloud
  • -[NSFileManager setUbiquitous:itemAtURL:destinationURL:error:] iCloud.
  • ( ) NSMetadataQuery URL.

  • NSMetadataQuery iCloud.
  • -[NSFileManager startDownloadingUbiquitousItemAtURL:error:], .
  • NSMetadataQuery URL [NSURL resourceValuesForKeys:].

  • NSFileCoordinator ubiquity.
  • NSFilePresenter .

WWDC 2012 (, , 2011, ), , , iOS.

+8

All Articles