uimanageddocument

Are NSPersistentDocument and UIManagedDocument compatible?

心已入冬 提交于 2020-05-13 07:13:50
问题 I would like to create a NSPersistentDocument in Mac OS X and read this document as a UIManagedDocument on iOS 7. Is this possible? Are both file formats compatible? Thank you! 回答1: Interesting question - I can confirm that the basic core data files are compatible. I have a Mac app and an iOS app using the same file that gets synced using iCloud. The app is a document based app and currently I have been storing the actual database file in iCloud so the whole file gets sync'ed by iCloud. This

Are NSPersistentDocument and UIManagedDocument compatible?

三世轮回 提交于 2020-05-13 07:13:05
问题 I would like to create a NSPersistentDocument in Mac OS X and read this document as a UIManagedDocument on iOS 7. Is this possible? Are both file formats compatible? Thank you! 回答1: Interesting question - I can confirm that the basic core data files are compatible. I have a Mac app and an iOS app using the same file that gets synced using iCloud. The app is a document based app and currently I have been storing the actual database file in iCloud so the whole file gets sync'ed by iCloud. This

Core Data & UIManagedDocument in Xcode 4.3: Can't merge models

本秂侑毒 提交于 2020-01-24 12:05:48
问题 I'd like to thank all the people that contribute to this website. I am one h*ll of a noob at programming and you all help me out so much. With that said, let's get on with my latest problem! I am creating an app that uses a UIManagedDocument to store a Core Data model for me. I use to create the UIManagedDocument with the following code, but now with Xcode 4.3.2 (The one that updates with the Mac App Store) I have an issue. Here's the code: NSURL *url = [[[NSFileManager defaultManager]

Multiple UIManagedDocument For Read & Write

别等时光非礼了梦想. 提交于 2020-01-17 05:08:21
问题 I'm building a tab bar application for iPhone and i'm using Core Data with two UIManagedDocument s. In the first tab, i write the data to database and in the second i read them into UITableView with UIFetchedResultsController . At the start of application, if i write data first, and after then i read results, it works fine. Results appear in the second tab immediately. However, if i read some data first and after then if i write something to database, results appear in second tab with

How to get the annotated text for a DictionaryAnnotator

[亡魂溺海] 提交于 2020-01-03 05:23:15
问题 I have a dictionary created from the DictionaryCreator from UIMA, I would like to annotate a piece of text using the DictionaryAnnotator and the aforementioned dictionary, I could not figure out how to get the annotated text. Please let me know if you do. Any help is appreciated. The code, the dictionary-file and the descriptor is mentioned below, P.S. I'm new to Apache UIMA. XMLInputSource xml_in = new XMLInputSource("DictionaryAnnotatorDescriptor.xml"); ResourceSpecifier specifier =

UIManagedDocument + iCloud “Big Picture”?

一世执手 提交于 2020-01-01 11:55:51
问题 I am working on my first "iCloud App". I worked through the Apple docs and the Stanford videos but I am still struggling to understand the "Big picture" of iCloud. My goal is to create a "Library style" app (which is Apples term for an app with "a single Core Data stack with a single persistent store coordinator and a single persistent store") like the Employees example. Following the Stanford videos I am using a UIMangedDocument to setup all Core Data stuff and enable the iCloud capabilities

State preservation and restoration strategies with Core Data objects in a UIManagedDocument

自闭症网瘾萝莉.ら 提交于 2019-12-23 20:13:23
问题 I'm starting to try and add support for state preservation and restoration to my iOS app, which has a Core Data component to it that I access via a UIManagedDocument. I'm starting to add the restoration identifiers to my view controllers, and have hooked up the required functions (currently empty) within my AppDelegate, and controllers. I have an object that could potentially be referenced by multiple view controllers so I plan to try and preserve and restore this within my AppDelegate and

State preservation and restoration strategies with Core Data objects in a UIManagedDocument

别等时光非礼了梦想. 提交于 2019-12-23 19:50:36
问题 I'm starting to try and add support for state preservation and restoration to my iOS app, which has a Core Data component to it that I access via a UIManagedDocument. I'm starting to add the restoration identifiers to my view controllers, and have hooked up the required functions (currently empty) within my AppDelegate, and controllers. I have an object that could potentially be referenced by multiple view controllers so I plan to try and preserve and restore this within my AppDelegate and

Set a lastModificationDate attribute after NSManagedObjectsDidChangeNotification creates an infinite loop

試著忘記壹切 提交于 2019-12-22 11:25:21
问题 I added a lastModifiedDate attribute to all my entities to avoid duplicates when syncing the UIManagedDocument with iCloud, something that I found it can happen if I create new entities with an offline device (iPad) and, at the same time, I create the same entities using another online device (iPhone). I wanted to set this attribute whenever an object changes so I subscribed for NSManagedObjectContextObjectsDidChangeNotification . The code I wrote to set the lastModifiedDate creates an

UIManagedDocument OpenWithCompletionHandler never returns

喜欢而已 提交于 2019-12-22 10:15:07
问题 I am running into a weird problem. I am sure that I did something to a file somewhere else in my code and it didn't close properly or something, but now it is in a state where it reports as being closed, but when I call OpenWithCompletionHandler it never returns. See below: //if the file is closed, open it and then set up the controller if (file.documentState == UIDocumentStateClosed){ //---- this code executes [file openWithCompletionHandler:^(BOOL success){ // ---- this code NEVER executes