CoreData/Realm sweet wrapper written in Swift

Related tags

Database SugarRecord
Overview

SugarRecord

Twitter: @carambalabs CocoaPods Compatible Language: Swift Language: Swift Build Status Carthage Compatible

What is SugarRecord?

SugarRecord is a persistence wrapper designed to make working with persistence solutions like CoreData in a much easier way. Thanks to SugarRecord you'll be able to use CoreData with just a few lines of code: Just choose your stack and start playing with your data.

The library is maintained by @carambalabs. You can reach me at [email protected] for help or whatever you need to commend about the library.

paypal

Features

  • Swift 3.0 compatible (Xcode 8.0).
  • Protocols based design.
  • For beginners and advanced users
  • Fully customizable. Build your own stack!
  • Friendly syntax (fluent)
  • Away from Singleton patterns! No shared states 🎉
  • Compatible with OSX/iOS/watchOS/tvOS
  • Fully tested (thanks Nimble and Quick)
  • Actively supported

Setup

CocoaPods

  1. Install CocoaPods. You can do it with gem install cocoapods
  2. Edit your Podfile file and add the following line pod 'SugarRecord'
  3. Update your pods with the command pod install
  4. Open the project from the generated workspace (.xcworkspace file).

Note: You can also test the last commits by specifying it directly in the Podfile line

Available specs Choose the right one depending ton the configuration you need for you app.

pod "SugarRecord/CoreData"
pod "SugarRecord/CoreData+iCloud"

Carthage

  1. Install Carthage. You can do it with brew install carthage.
  2. Edit your Cartfile file and add the following line `github "carambalabs/sugarrecord".
  3. Execute carthage update
  4. Add the frameworks to your project as explained on the Carthage repository.

Reference

You can check generated SugarRecord documentation here generated automatically with CocoaDocs

How to use

Creating your Storage

A storage represents your database. The first step to start using SugarRecord is initializing the storage. SugarRecord provides a default storages, CoreDataDefaultStorage.

// Initializing CoreDataDefaultStorage
func coreDataStorage() -> CoreDataDefaultStorage {
    let store = CoreDataStore.named("db")
    let bundle = Bundle(for: self.classForCoder)
    let model = CoreDataObjectModel.merged([bundle])
    let defaultStorage = try! CoreDataDefaultStorage(store: store, model: model)
    return defaultStorage
}
Creating an iCloud Storage

SugarRecord supports the integration of CoreData with iCloud. It's very easy to setup since it's implemented in its own storage that you can use from your app, CoreDataiCloudStorage:

// Initializes the CoreDataiCloudStorage
func icloudStorage() -> CoreDataiCloudStorage {
    let bundle = Bundle(for: self.classForCoder)
    let model = CoreDataObjectModel.merged([bundle])
    let icloudConfig = CoreDataiCloudConfig(ubiquitousContentName: "MyDb", ubiquitousContentURL: "Path/", ubiquitousContainerIdentifier: "com.company.MyApp.anothercontainer")
    let icloudStorage = try! CoreDataiCloudStorage(model: model, iCloud: icloudConfig)
    return icloudStorage
}

Contexts

Storages offer multiple kind of contexts that are the entry points to the database. For curious developers, in case of CoreData a context is a wrapper around NSManagedObjectContext. The available contexts are:

  • MainContext: Use it for main thread operations, for example fetches whose data will be presented in the UI.
  • SaveContext: Use this context for background operations. The context is initialized when the storage instance is created. That context is used for storage operations.
  • MemoryContext: Use this context when you want to do some tests and you don't want your changes to be persisted.

Fetching data

let pedros: [Person] = try! db.fetch(FetchRequest<Person>().filtered(with: "name", equalTo: "Pedro"))
let tasks: [Task] = try! db.fetch(FetchRequest<Task>())
let citiesByName: [City] = try! db.fetch(FetchRequest<City>().sorted(with: "name", ascending: true))
let predicate: NSPredicate = NSPredicate(format: "id == %@", "AAAA")
let john: User? = try! db.fetch(FetchRequest<User>().filtered(with: predicate)).first

Remove/Insert/Update operations

Although Contexts offer insertion and deletion methods that you can use it directly SugarRecords aims at using the operation method method provided by the storage for operations that imply modifications of the database models:

  • Context: You can use it for fetching, inserting, deleting. Whatever you need to do with your data.
  • Save: All the changes you apply to that context are in a memory state unless you call the save() method. That method will persist the changes to your store and propagate them across all the available contexts.
do {
  db.operation { (context, save) throws in
    // Do your operations here
    try save()
  }
} catch {
  // There was an error in the operation
}
New model

You can use the context new() method to initialize a model without inserting it in the context:

do {
  db.operation { (context, save) throws in
    let newTask: Track = try context.new()
    newTask.name = "Make CoreData easier!"
    try context.insert(newTask)
    try save()
  }
} catch {
  // There was an error in the operation
}

In order to insert the model into the context you use the insert() method.

Creating a model

You can use the create() for initializing and inserting in the context in the same operation:

do {
  db.operation { (context, save) throws -> Void in
    let newTask: Track = try! context.create()
    newTask.name = "Make CoreData easier!"
    save()
  }
}
catch {
  // There was an error in the operation
}
Delete a model

In a similar way you can use the remove() method from the context passing the objects you want to remove from the database:

do {
  db.operation { (context, save) throws in
    let john: User? = try context.request(User.self).filteredWith("id", equalTo: "1234").fetch().first
    if let john = john {
      try context.remove([john])
      try save()
    }
  }
} catch {
  // There was an error in the operation
}

> This is the first approach of SugarRecord for the interface. We'll improve it with the feedback you can report and according to the use of the framework. Do not hesitate to reach us with your proposals. Everything that has to be with making the use of CoreData easier, funnier, and enjoyable is welcome! 🎉

RequestObservable

SugarRecord provides a component, RequestObservable that allows observing changes in the DataBase. It uses NSFetchedResultsController under the hood.

Observing

class Presenter {
  var observable: RequestObservable<Track>!

  func setup() {
      let request: FetchRequest<Track> = FetchRequest<Track>().filtered(with: "artist", equalTo: "pedro")
      self.observable = storage.instance.observable(request)
      self.observable.observe { changes in
        case .Initial(let objects):
          print("\(objects.count) objects in the database")
        case .Update(let deletions, let insertions, let modifications):
          print("\(deletions.count) deleted | \(insertions.count) inserted | \(modifications.count) modified")
        case .Error(let error):
          print("Something went wrong")
      }
  }
}

Retain: RequestObservable must be retained during the observation lifecycle. When the RequestObservable instance gets released from memory it stops observing changes from your storage.

NOTE: This was renamed from Observable -> RequestObservable so we are no longer stomping on the RxSwift Observable namespace.

⚠️ RequestObservable is only available for CoreData + OSX since MacOS 10.12

Resources

Contributors

glebosushichopfoxlingZevEisenbergkonyu

yuuki1224YTN01gitter-badgersergigraciaadityatrivedi

Adlai-Hollerakshaynhegdegoingreenstartupthekidctotheameron

davidahouseA8-MokeArasthelLuizZakliterator

madeinqckoliskodukemikerafalwojcikthad

chrispixReadmeCriticavielgrdougangrangej

fjbelchidcvzpepibumur

About

This project is funded and maintained by Caramba. We 💛 open source software!

Check out our other open source projects, read our blog or say 👋 on twitter @carambalabs.

Contribute

Contributions are welcome 🤘 We encourage developers like you to help us improve the projects we've shared with the community. Please see the Contributing Guide and the Code of Conduct.

License

The MIT License (MIT)

Copyright (c) 2017 Caramba

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Comments
  • The `SugarRecord-iOS [Debug]` target overrides the `EMBEDDED_CONTENT_CONTAINS_SWIFT`

    The `SugarRecord-iOS [Debug]` target overrides the `EMBEDDED_CONTENT_CONTAINS_SWIFT`

    Hi, awesome this is such a great API. Though I'm getting this error when trying to install the pod I've added: pod 'SugarRecord', :git => 'https://github.com/gitdoapp/sugarrecord.git' to the pod file though the error happens below. I've tried adding $(inherited) to: Header Search Paths Other Linker Flags Preprocessor Macros in Project -> Target -> Build Settings Though still the same error. Thanks in advance if you can help. /********************************************/ [!] The SugarRecord-iOS [Debug] target overrides the EMBEDDED_CONTENT_CONTAINS_SWIFT build setting defined in Pods/Target Support Files/Pods-SugarRecord-iOS/Pods-SugarRecord-iOS.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the$(inherited)` flag, or - Remove the build settings from the target.

    opened by Ged2323 15
  • unable to install sugarrecord as submodule

    unable to install sugarrecord as submodule

    I'm trying to setup my project to use sugarrecord as a submodule but i am unable to get the application to compile.

    I want to use CoreData and RestKit, and I followed your instructions on the wiki, but it keeps saying builds fails (no error) i'm not sure what i'm doing wrong.

    do you have example application that has sugarrecord imported as a submodule?

    opened by eschan 14
  • How to manually call the save method?

    How to manually call the save method?

    I found that when i call model.save() or model.endWriting(), they are not save to database. Sometimes , I want to manually call the save method to save data immediately in database. like:

    [MagicalRecord saveUsingCurrentThreadContextWithBlockAndWait:nil];
    
    opened by foxling 13
  • RestKit Integration Guide

    RestKit Integration Guide

    I would love to be able to integrate with Restkit. there's already a few examples of how to integrate MagicalRecord with RestKit

    see: https://github.com/m1entus/MZFlickrMania/blob/master/FlickrMania/MZAppDelegate.m#L40-L57

    https://github.com/RestKit/RKGist/blob/master/TUTORIAL.md#configuring-restkit--core-data https://github.com/magicalpanda/MagicalRecord/blob/develop/Docs/GettingStarted.md

    also, do you guys think they will work well together?

    opened by yelled3 13
  • Single quote the string predicates on the finder and consider other types

    Single quote the string predicates on the finder and consider other types

    What?

    • Commented here: https://github.com/SugarRecord/SugarRecord/pull/87#issuecomment-67567564 Just how we have implemented the finder if you want to filter using an string you have to single-quote it which is something most of users forget about.
    • We could split the by() method into: by(name: String, stringValue: String) by(name: String, intValue: String)

    Steps

    • [ ] Add methods to the SugarRecordObjectProtocol
    • [ ] Add methods to the Finder
    • [ ] Test SugarRecord objects methods:
      • [ ] Objective-C
      • [ ] Realm
    • [ ] Teste SugarRecordFinder methods: Note: Basically the tests would consist on checking if the predicate has the right format
    opened by pepicrft 11
  • Extra Argument 'equalTo:' issue

    Extra Argument 'equalTo:' issue

    Why won't this compile:

    if let extId:NSNumber = subJson["id"].number{

    ==> error here: let category: Categorization? = Categorization.by("extID", equalTo: extId).find()?.first as Categorization?

    opened by jimijon 10
  • Add RestKit sample to example

    Add RestKit sample to example

    What?

    Adds RestKit sample to the example project Resolves part of https://github.com/SugarRecord/SugarRecord/issues/69

    What should be tested?

    • CocoaPods
    • RestKit view controller

    What tasks are remaining?

    • [x] Add CocoaPods to the project
    • [x] Add RestKit view controller
    opened by rdougan 9
  • iCould support

    iCould support

    Which iOS version for iCloud is supported iOS 7, iOS 8 or both. And is there some specific steps to add iCloud support different from just change the CoreDataStack and enable iCloud?

    opened by aatanosv-appolica 9
  • RequestObservable with Sectioned Tableview

    RequestObservable with Sectioned Tableview

    Right now I am struggling to see how the RequestObservable properly captures the ability to have sections within a UITableView.

    The problem is within the information passed through the observe closure. When an insertion, deletion, or update occurs, the closure is only provided with the row from the NSIndexPath, which is not sufficient in determining where the modification actually occurred.

    There are some work arounds that can be done for adds and updates, however, for deletes, which only provide the row which was deleted (and not even the object that was deleted), there is no way to know from which section it was deleted.

    As of right now, the only solution I can figure is having to maintain essentially two lists, one which would be a "master" list, which would be used in the delete scenario, to go row -> object. And then a dictionary to be used as the "sectioned" list, where I maintain the actual "state" of the list.

    opened by cody1024d 8
  • call observer.OnNext(()) so we can use map functions

    call observer.OnNext(()) so we can use map functions

    This is to allow using map or flatMap with rx operations

    Re-Create pull from separate branch to avoid updating pull request from my dev branch.

    Signed-off-by: John Grange [email protected]

    opened by grangej 8
  • Fixed for Swift 1.2

    Fixed for Swift 1.2

    "Forced failable conversion now uses the as! operator."

    "Immutable (let) properties in struct and class initializers have been revised to standardize on a general “lets are singly initialized but never reassigned or mutated” model."

    opened by dcvz 8
  • Swift 5 and build fixes

    Swift 5 and build fixes

    A pull request from a fork by @aporat that does work on Swift 5 and Xcode 11.x.

    Anyone can use it with pod 'SugarRecord', :git => 'https://github.com/aporat/SugarRecord.git'.

    opened by rivera-ernesto 0
  • how to update an record ?

    how to update an record ?

    What

    Well I want to update an record which is already inserted.

    Context

    I'm saving records in the database. For example I saved data in db at 1:50 PM and now I sync app at 2:50 PM and want to update the same records , but It do Insert of new record. I tried finding the update function but no success

    opened by patriksharma 0
  • App Crashes when using observable

    App Crashes when using observable

    What

    Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'An instance of NSFetchedResultsController requires a fetch request with sort descriptors'

    Context

    let request : FetchRequest<DataObject> = FetchRequest<DataObject>()
        
                    self.observable = db.observable(request: request)
                    
                    pedometerDataObservable.observe { (changes) in
                        switch changes {
    
                        case .initial(let objects):
                            print("\(objects.count) objects in the database")
                        case .update(let deletions, let insertions, let modifications):
                            print("\(deletions.count) deleted | \(insertions.count) inserted | \(modifications.count) modified")
                        case .error(let error):
                            print("Something went wrong", error.localizedDescription)
                        }
                    }
    
    opened by firecrackerz 1
  • Taking CoreData operations off main thread

    Taking CoreData operations off main thread

    Hello guys!

    What

    According to best practices, it is better to do Coredata related operations in the background, not to cause any possible performance drops, or UI blocks

    I feel like you are doing some database access in the main thread:

    Context

    Class: CoreDataObservable, function:observe, and Class:CoreDataDefaultStorageTests function:spec, both calling fetch which is doing database operations

    Proposal

    Don't you think it would be better to take these operations off the main thread?

    opened by saraseif 0
  • Can you adapter Swift 4.1

    Can you adapter Swift 4.1

    What

    Describe here your issue, a bug you found, an idea that you had, something that you think can be improved...

    Context

    Provide information that helps with understanding your issue. For example your use case that the project doesn't cover, what you were doing when you found the bug... You can also provide the version of the library that you were using, how you integrated it with your project, the platform version...

    Proposal

    Attach your own proposal (if you have it). We'll discuss in on the issue to find the best one that fits into the library.

    opened by andanyoung 0
  • iOS Carthage build fails with Swift 4.1

    iOS Carthage build fails with Swift 4.1

    What

    After updating to Xcode 9.3 (9E145) and Swift 4.1, an iOS project that depends on SugarRecord 3.1.3 fails to build. Carthage reports a compile error in CoreDataObservable.swift:

    <unknown>:0: error: unable to execute command: Segmentation fault: 11
    
    	/usr/bin/xcrun xcodebuild -workspace /Users/goleinik/Workspaces/***/iOS/Carthage/Checkouts/SugarRecord/SugarRecord.xcworkspace -scheme iOSCoreData -configuration Debug -derivedDataPath /Users/goleinik/Workspaces/***/iOS/Carthage/Build/DerivedData/9.3_9E145/SugarRecord/db21b8b2a568193600ce011d682c3bb6031864fc -sdk iphonesimulator -destination platform=iOS\ Simulator,id=7AFE625D-6C2C-4A03-BD51-706FDB1F0A16 -destination-timeout 3 ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES build (launched in /Users/goleinik/Workspaces/***/iOS/Carthage/Checkouts/SugarRecord)
    

    Context

    Sugar Record Release 3.1.3 Carthage Version: 0.29.0 OSX 10.13.4 Xcode 9.3 (9E145) Swift 4.1 Base SDK iOS 11.3

    opened by glebo 0
Releases(3.1.3)
  • 3.1.3(May 8, 2017)

  • 3.1.2(Apr 9, 2017)

    Bump podspec to 3.1.2 Add backgroundOperation method to the storage (#325)

    • [background-operation] Add backgroundOperation method to the storage

    • [background-operation] Fix unit tests

    • [background-operation] Add tests to backgroundOperation

    • [background-operation] Remove realm from storage type Update deprecated syntax on the README file Bump podspec to 3.1.1 Update Bundle dependencies Remove Realm support

    Source code(tar.gz)
    Source code(zip)
  • 3.1.1(Apr 7, 2017)

  • 3.0.3(Mar 23, 2017)

  • 3.0.2(Mar 23, 2017)

  • 3.0.1(Mar 23, 2017)

    Bump podspec to 3.0.1 Updated the github URL that's being called to use HTTPS (#314)

    Use the right NSFetchedResultsControllerDelegate method. Fix for Delegate method not being called. (CoreDataObservable with no informations #307) (#310)

    fixed documents directory for tvOS (#309)

    Implement tests for the new Request methods Add filteredWith IN and NOT IN (#305)

    • fiteredWith IN and NOT IN added

    • Update Request.swift Bump version to 3.0.0 Bump podspec to 3.0.1

    Source code(tar.gz)
    Source code(zip)
  • 3.0.0(Oct 10, 2016)

  • 3.0.0-alpha.2(Sep 28, 2016)

  • 3.0.0-alpha.1(Sep 20, 2016)

  • 2.3.1(Aug 31, 2016)

    Bump podspec to 2.3.1 Add danger Add tests again Update README with caramba info Updated podspec info Bump Realm version Fix esamples Fix a few things in the README Merge pull request #272 from carambalabs/remove-rx-carthage Remove Reactive framework and Carthage Create tests target Update pods Remove Carthage project and Reactive references in the README file Remove Carthage, Rx and ReactiveCocoa Create .pullapprove.yml Update README Add files via upload Update Cartifle.resolved Merge pull request #270 from dukemike/issues/269 only perform version checks on debug builds. refs #269 only perform version checks on debug builds. refs #269

    Source code(tar.gz)
    Source code(zip)
  • 2.2.9(Jun 28, 2016)

    • Remove Embedded Content Contains Swift Code https://github.com/pepibumur/SugarRecord/pull/260 (thanks @grangej )
    • Modify observers to allow returning data https://github.com/pepibumur/SugarRecord/pull/257 (thanks @grangej)
    • Version checker https://github.com/pepibumur/SugarRecord/pull/244
    • Rename Observable https://github.com/pepibumur/SugarRecord/pull/256
    Source code(tar.gz)
    Source code(zip)
  • 2.2.8(May 16, 2016)

    • Observable improvements. The new interface now returns the elements that have changed with the indexes.
    • Created Slack community that developers can join to. https://github.com/pepibumur/SugarRecord/commit/30ddb1dd0ee405bf82834b5fd014204120dc73c0
    • Update Realm to 0.102.1 https://github.com/pepibumur/SugarRecord/commit/60360a0c14d025e3a0755f71e0a558644a66ed23
    • Update RxSwift to 2.5.0 https://github.com/pepibumur/SugarRecord/commit/60360a0c14d025e3a0755f71e0a558644a66ed23
    • Add Observable examples to the Example project.
    • Fix a bug disposing the CoreData Observable https://github.com/pepibumur/SugarRecord/commit/b148bbe6ec293caf95adb13164aaa782c220ab66 (Thanks @grangej)
    Source code(tar.gz)
    Source code(zip)
  • 2.2.7(May 8, 2016)

  • 2.2.4(Apr 5, 2016)

  • 2.2.3(Mar 30, 2016)

    • SugarRecord supports now Xcode 7.3
    • Added removeAll method to Context to remove all the entities. It's only available for Realm. Fixes https://github.com/pepibumur/SugarRecord/issues/219
    • Moved the rootSavingContext saving operation into a performBlockAndWait() block. Fixes https://github.com/pepibumur/SugarRecord/issues/212
    • Made entityName attribute a class attribute. Fixes https://github.com/pepibumur/SugarRecord/issues/206
    • Errors are now exposed in operations. Fixes https://github.com/pepibumur/SugarRecord/issues/204
    • Improvements in the reactive interface. Fixes https://github.com/pepibumur/SugarRecord/issues/216
    Source code(tar.gz)
    Source code(zip)
  • 2.2.2(Feb 7, 2016)

  • 2.2.1(Feb 3, 2016)

    This new version includes a new CoreDataStack with iCloud support. The list of CocoaPods subspecs has been updated:

    pod "SugarRecord/CoreData"
    pod "SugarRecord/CoreData+iCloud"
    pod "SugarRecord/CoreData+RX"
    pod "SugarRecord/CoreData+RX+iCloud"
    pod "SugarRecord/CoreData+RAC"
    pod "SugarRecord/CoreData+RAC+iCloud"
    pod "SugarRecord/Ream"
    pod "SugarRecord/Realm+RX"
    pod "SugarRecord/Realm+RAC"
    
    Source code(tar.gz)
    Source code(zip)
    SugarRecordCoreData.framework.zip(22.29 MB)
    SugarRecordRealm.framework.zip(20.94 MB)
  • 2.1.8(Jan 24, 2016)

  • 2.1.7(Jan 14, 2016)

  • 2.1.6(Jan 2, 2016)

  • 2.1.4(Dec 27, 2015)

  • 2.1.3(Dec 21, 2015)

  • 2.1.2(Dec 20, 2015)

  • 2.1.1(Dec 18, 2015)

    • Added Realm 0.97 version. That version includes:
      • Support for tvOS. You can use now SugarRecord+Realm with your tvOS.
      • Better integration with Carthage. Installing SugarRecord+Realm should be faster now.
    • Improved Carthage integration. Now each platform has two schemes, SugarRecordRealm & SugarRecordCoreData. Drag only the one you need in your app plus Realm in case you are using the Realm integration.
    Source code(tar.gz)
    Source code(zip)
    SugarRecord.framework.zip(22.68 MB)
  • 2.1.0(Dec 13, 2015)

    • Removed Result dependency from context methods. Methods throw now instead of returning a Result object wrapping Error and Values.
    • Reviewed the interface of Context to make it similar to Realm's one: add, create, new, fetch, remove.
    • Removed asynchrony from from operation methods in storage. Asynchrony has to be handled externally now (Realm inspired).
    • Added LICENSE file.
    • Added fetch method to Storage using internally the main context for fetching.
    • Implemented a Reactive API in Storage:
    func rac_operation(operation: (context: Context, save: Saver) -> Void) -> SignalProducer<Void, NoError>
    func rac_backgroundOperation(operation: (context: Context, save: Saver) -> Void) -> SignalProducer<Void, NoError>
    func rac_backgroundFetch<T, U>(request: Request<T>, mapper: T -> U) -> SignalProducer<[U], Error>
    func rac_fetch<T>(request: Request<T>) -> SignalProducer<[T], Error>
    
    Source code(tar.gz)
    Source code(zip)
    SugarRecord.framework.zip(22.68 MB)
  • 2.0.1(Dec 8, 2015)

  • 1.0.7(Jan 18, 2015)

    • Some private methods made public: https://github.com/SugarRecord/SugarRecord/pull/106
    • Typo mistake: https://github.com/SugarRecord/SugarRecord/pull/107
    Source code(tar.gz)
    Source code(zip)
  • 1.0.6(Jan 3, 2015)

    • Fixed autosaving feature on DefaultCDStack
    • Use of printable instead of StringLiteralConvertible
    • Reviewed the CI script (still not working travis :( )
    Source code(tar.gz)
    Source code(zip)
  • 1.0.5(Dec 29, 2014)

  • 1.0.4(Dec 25, 2014)

    • Logging improved
    • Added a continuous integration script bash ci.sh
    • Added a Realm example to the example project
    • Added CocoaPods experimental support
    • Improved the count method to avoid unnecessary fetching. By @twobitlabs
    • Renamed entityName to modelName to avoid conflicts
    • Finder methods refactored to use StringLiteral instead of String
    • Added RestKit example to the example project
    • Added SugarRecordResults type as a Query result type (Inspired on Realm)
    Source code(tar.gz)
    Source code(zip)
Owner
Modo
We are Modo, a remote digital product studio
Modo
Unrealm is an extension on RealmCocoa, which enables Swift native types to be saved in Realm.

Unrealm enables you to easily store Swift native Classes, Structs and Enums into Realm . Stop inheriting from Object! Go for Protocol-Oriented program

Artur  Mkrtchyan 518 Dec 13, 2022
Realm is a mobile database: a replacement for Core Data & SQLite

Realm is a mobile database that runs directly inside phones, tablets or wearables. This repository holds the source code for the iOS, macOS, tvOS & wa

Realm 15.7k Jan 1, 2023
A library that provides the ability to import/export Realm files from a variety of data container formats.

Realm Converter Realm Converter is an open source software utility framework to make it easier to get data both in and out of Realm. It has been built

Realm 212 Dec 9, 2022
Sync Realm Database with CloudKit

IceCream helps you sync Realm Database with CloudKit. It works like magic! Features Realm Database Off-line First Thread Safety Reactive Programming O

Soledad 1.8k Jan 6, 2023
Realm GeoQueries made easy

RealmGeoQueries simplifies spatial queries with Realm Cocoa. In the absence of and official functions, this library provide the possibility to do prox

Marc Hervera 142 Jul 21, 2022
A simple order manager, created in order to try Realm database

Overview A simple order manager, created in order to get acquainted with the features and limitations of the local Realm database. The project is writ

Kirill Sidorov 0 Oct 14, 2021
Creating a Todo app using Realm and SwiftUI

Realmで作るTodoアプリ note記事「【SwiftUI】Realmを使ってTodoアプリを作る」のソースです。

null 1 Jul 20, 2022
Realm-powered Core Data persistent store

RealmIncrementalStore Realm-powered Core Data persistent store Wait, what? I like Realm. Realm's memory-mapped DB blows other databases out of the wat

Eureka 227 Jun 24, 2022
Realm Manager for iOS

Microservices for RealmSwift. Split realms for easier management and migration

Lê Xuân Quỳnh 2 Aug 13, 2022
A Generic CoreData Manager to accept any type of objects. Fastest way for adding a Database to your project.

QuickDB FileManager + CoreData ❗️ Save and Retrieve any thing in JUST ONE line of code ❗️ Fast usage dataBase to avoid struggling with dataBase comple

Behrad Kazemi 17 Sep 24, 2022
A stand-alone Swift wrapper around the mongo-c client library, enabling access to MongoDB servers.

This package is deprecated in favour of the official Mongo Swift Driver. We advise users to switch to that pack

PerfectlySoft Inc. 54 Jul 9, 2022
A stand-alone Swift wrapper around the MySQL client library, enabling access to MySQL servers.

Perfect - MySQL Connector This project provides a Swift wrapper around the MySQL client library, enabling access to MySQL database servers. This packa

PerfectlySoft Inc. 118 Jan 1, 2023
A stand-alone Swift wrapper around the libpq client library, enabling access to PostgreSQL servers.

Perfect - PostgreSQL Connector This project provides a Swift wrapper around the libpq client library, enabling access to PostgreSQL servers. This pack

PerfectlySoft Inc. 51 Nov 19, 2022
A stand-alone Swift wrapper around the FileMaker XML Web publishing interface, enabling access to FileMaker servers.

Perfect - FileMaker Server Connector This project provides access to FileMaker Server databases using the XML Web publishing interface. This package b

PerfectlySoft Inc. 33 Jul 13, 2022
A Swift wrapper for system shell over posix_spawn with search path and env support.

AuxiliaryExecute A Swift wrapper for system shell over posix_spawn with search path and env support. Usage import AuxiliaryExecute AuxiliaryExecute.l

Lakr Aream 11 Sep 13, 2022
A Swift wrapper for SQLite databases

Squeal, a Swift interface to SQLite Squeal provides access to SQLite databases in Swift. Its goal is to provide a simple and straight-forward base API

Christian Niles 297 Aug 6, 2022
A stand-alone Swift wrapper around the SQLite 3 client library.

Perfect - SQLite Connector This project provides a Swift wrapper around the SQLite 3 library. This package builds with Swift Package Manager and is pa

PerfectlySoft Inc. 47 Nov 19, 2022
A Cocoa / Objective-C wrapper around SQLite

FMDB v2.7 This is an Objective-C wrapper around SQLite. The FMDB Mailing List: https://groups.google.com/group/fmdb Read the SQLite FAQ: https://www.s

August 13.7k Dec 28, 2022
An Objective-C wrapper for RocksDB - A Persistent Key-Value Store for Flash and RAM Storage.

ObjectiveRocks ObjectiveRocks is an Objective-C wrapper of Facebook's RocksDB - A Persistent Key-Value Store for Flash and RAM Storage. Current RocksD

Iskandar Abudiab 56 Nov 5, 2022