View UpdateRealmObject.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Writes a set of objects in the database. | |
- parameter objects: Array of `Objects` to be stored on the database | |
- parameter configuration: Realm `Configuration` in which the write action will be performed | |
- parameter update: Enabled the custom *update* maintaining existing relationships | |
*/ | |
static func write(objects : [Object], configuration: Realm.Configuration, update: Bool = false) { | |
if let realm = try? Realm(configuration: configuration) { | |
realm.beginWrite() |
View KVOOperationQueue.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface KVOOperationQueue() | |
@property(nonatomic, strong) NSOperationQueue *queue; | |
@end | |
@implementation KVOOperationQueue | |
-(id)init{ | |
self = [super init]; | |
if(self){ | |
filePath = filename; |