core-data

Add images in NSAttributedString and save to Core Data peformance

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-07 02:57:08
问题 I'm encountering this huge performance issue while saving the NSAttrbutedString with images in it to Core Data. There is a UITextView where allows the user to input text as well as adding images. When user finishes typing and click ' done ' button, it will be saved to CoreData, and shows in a TableView. Here is how I save the content when click 'done' button: Create a private MOC and assign the AppDelegates managedObjectContext as its parent MOC. privateMOC = NSManagedObjectContext

Archive is not success, due to error code -1, Although I can do build and install in my devices with developement profile

僤鯓⒐⒋嵵緔 提交于 2020-01-06 21:09:37
问题 My Application is coded with swift 3 And core-data as offline information storage. I'm not able to archive my application due to long list or error like <unknown>:0: error: no such file or directory: '/Users/Ashwin/Library/Developer /Xcode/DerivedData/BeerScout-eweygxkfdhbkbkalbiyywrsuievg/Build /Intermediates/ArchiveIntermediates/BeerScout/IntermediateBuildFilesPath /BeerScout.build/Release-iphoneos/BeerScout.build/DerivedSources /CoreDataGenerated/BeerScout/Beer+CoreDataClass.swift' ... And

fetchresultscontroller issue or managed object context?

假装没事ソ 提交于 2020-01-06 19:56:33
问题 Reference POST: Core Data - Basic Questions I am able to get the Managed object context from this piece of code. It bring me to another question. I have 2 VIEW CONTROLLERS and 1 NSObject Userlookup (VC) UserlookupSettings(VC) FetchProcessor (NSObject) In sequence, Userlookup vc loads first and has a button to load the Userlookupsettings VC + a textbox and UiButton. When the app is loaded and I hit the SETTINGS uibutton, things work fine... however, when i do the search (FetchProcessor) and

Accessing data attribute of NSManagedObject gives me memory issues

自作多情 提交于 2020-01-06 19:38:50
问题 I think I might be accessing this wrong, perhaps somebody could point me in the right direction. I have a Entry entity, which has a one-to-many relationship with the Media entity. The Media entity contains a data attribute called originalImage . The first 50 Entry entities that this iterates through do not have any media items in the set. After that, it slows down as it accesses the originalImage attribute and eventually runs out of memory and quits to the home screen, without any message

coredata accessing data relationship fault

本小妞迷上赌 提交于 2020-01-06 19:34:03
问题 I have coredata project here is my .h file: @interface Content : NSManagedObject @property (nonatomic, retain) NSString * title; @property (nonatomic, retain) NSString * body; @property (nonatomic, retain) Categories *category; @property (nonatomic, retain) NSSet *tags; @end @interface Content (CoreDataGeneratedAccessors) - (void)addTagsObject:(Tags *)value; - (void)removeTagsObject:(Tags *)value; - (void)addTags:(NSSet *)values; - (void)removeTags:(NSSet *)values; And I'm populating the my

UITableView doesn't refresh when NSPredicate set

流过昼夜 提交于 2020-01-06 18:43:31
问题 Preface: I tried [self.tableview reloadData] . My app doesn't crash, but it doesn't refresh, either. I'm trying to display 2 sets of results on one TableViewController depending upon whether an NSPredicate is set. I'm trying to find a jargon free answer how I can update a UITableViewController once a predicate is set. My data displays properly the when the view initially loads. My predicate sets properly, all the log statements I've thrown in return values...but nothing happens when it's set.

After adding objects via CoreDataGeneratedAccessors to-many relationships's NSSet is empty

冷暖自知 提交于 2020-01-06 18:36:40
问题 I have two Core Data entities: Parent and Child . Parent has to-many relationship to a Child called children . Inverse relationship from is Child.parent . So parent has CoreDataGeneratedAccessors : - (void)addChildrenObject:(Child *)value; and - (void)addChildren:(NSSet *)value; . Problem: after I add Child(s) by using one of those accessors and save managedObjectContext parent.children is empty. At the same time parent property of every added Child point to proper instance of Parent and

Request for member tableView in something not a structure or union

醉酒当歌 提交于 2020-01-06 18:33:52
问题 Please help with this issue, I'm trying to populate my table cells with coreData db; I'm porting an example from iPhone to iPad, the problem is that in the iPad in my table view. I'm using: @interface FailedBanksViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, NSFetchedResultsControllerDelegate> not the @interface FailedBanksListViewController : UITableViewController <NSFetchedResultsControllerDelegate> for the whole table view but a table inside my view, so I

Core Data getting [_NSObjectID_48_1 userName]: unrecognized selector sent to instance

大憨熊 提交于 2020-01-06 16:11:35
问题 A->>B I have two entities A&B and each are related as one to many relationship. I am trying to access specific B attribute value and all A entity attributes by grouping. However I am getting error as [_NSObjectID_48_1 userName] : unrecognized selector sent to instance when I try to access relationship object of B(that is a). NSManagedObjectContext *context = [[SamCoreDataHelper sharedInstance] managedObjectContext]; NSFetchRequest *fr = [[NSFetchRequest alloc] initWithEntityName:@"B"];

Core Data getting [_NSObjectID_48_1 userName]: unrecognized selector sent to instance

让人想犯罪 __ 提交于 2020-01-06 16:11:33
问题 A->>B I have two entities A&B and each are related as one to many relationship. I am trying to access specific B attribute value and all A entity attributes by grouping. However I am getting error as [_NSObjectID_48_1 userName] : unrecognized selector sent to instance when I try to access relationship object of B(that is a). NSManagedObjectContext *context = [[SamCoreDataHelper sharedInstance] managedObjectContext]; NSFetchRequest *fr = [[NSFetchRequest alloc] initWithEntityName:@"B"];