{"id":1804,"url":"https://github.com/apparentsoft/ReactiveCoreData","last_synced_at":"2025-08-02T04:32:32.523Z","repository":{"id":8232729,"uuid":"9674142","full_name":"apparentsoft/ReactiveCoreData","owner":"apparentsoft","description":"Core Data with ReactiveCocoa","archived":false,"fork":false,"pushed_at":"2016-03-30T15:07:50.000Z","size":375,"stargazers_count":253,"open_issues_count":4,"forks_count":15,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-07-06T14:38:22.414Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"sindresorhus/ava","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apparentsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-25T14:51:06.000Z","updated_at":"2024-12-18T11:57:16.000Z","dependencies_parsed_at":"2022-09-19T22:31:25.358Z","dependency_job_id":null,"html_url":"https://github.com/apparentsoft/ReactiveCoreData","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/apparentsoft/ReactiveCoreData","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apparentsoft%2FReactiveCoreData","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apparentsoft%2FReactiveCoreData/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apparentsoft%2FReactiveCoreData/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apparentsoft%2FReactiveCoreData/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apparentsoft","download_url":"https://codeload.github.com/apparentsoft/ReactiveCoreData/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apparentsoft%2FReactiveCoreData/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268334618,"owners_count":24233793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:15:56.197Z","updated_at":"2025-08-02T04:32:32.139Z","avatar_url":"https://github.com/apparentsoft.png","language":"Objective-C","readme":"# ReactiveCoreData\n\nReactiveCoreData (RCD) is an attempt to bring Core Data into the [ReactiveCocoa](https://github.com/ReactiveCocoa/ReactiveCocoa) (RAC) world.\n\nCurrently has several files with the source code, [Specta](https://github.com/petejkim/specta) specs and a [demo application][Demo] for the Mac.\n\nTo use, copy the source files from [ReactiveCoreData](ReactiveCoreData) folder to your project. You should also have ReactiveCocoa in your project, of course.\n\nCode from the Mac example:\n\n```objc\n// This part refetches data for the table and puts it into filteredParents\n// It either fetches all Parents or filters by name, if there's something in the search field\n// It will also refetch, if objectsChanged send a next\nRAC(self.filteredParents) = [[[[Parent findAll]\n    where:@\"name\" contains:filterText options:@\"cd\"]\n    sortBy:@\"name\"]\n    fetchWithTrigger:objectsChanged];\n```\n\nAnother example of background processing:\n```objc\n[[[[triggerSignal \n    performInBackgroundContext:^(NSManagedObjectContext *context) {\n        [Parent insert];\n    }]\n    saveContext]\n    deliverOn:RACScheduler.mainThreadScheduler]\n    subscribeNext:^(id _) {\n        // Update UI\n    }];\n    \n// We can also react to main context's merge notifications to update the UI\n[mainContext.rcd_merged \n    subscribeNext:^(NSNotification *note){\n        // Update UI\n    }];\n```\n\nSee the test [Specs][Specs] for some crude usage examples.\n\nAlso checkout the demo application in the project. It shows a simple table-view with Core Data backed storage using ReactiveCoreData and ReactiveCocoa for connecting things.\n\nThe headers also provide documentation for the various methods.\n\nIt's not feature-complete and more could be done but will be added based on actual usage and your contributions.\n\nThat being said, it should work both with shoebox and document-based applications, where there are many object contexts.\n\n\n### Done:\n\n- Start signals that represent and modify NSFetchRequests (findAll, findOne) from NSManagedObject.\n- `-[RACSignal where:args:]` method that sets a predicate with given format that can have signals as its arguments. This brings execution of NSFetchRequests into the Reactive domain. As any signal to predicate changes, the query is modified and sent next — to be fetched, for example.\n- A couple of signal-aware convenience methods for common predicate cases, like for CONTAINS predicate and for equal \n- `[RACSignal limit:]` that accepts either a value or a signal.\n- `[RACSignal sortBy:]` that accepts either a \"key\" string, or a \"-key\" (for descending sort), or a sort descriptor, or an array of sort descriptors, or a signal with any of these\n- `fetch` and `count` methods on RACSignal to execute the NSFetchRequest that's passed to them in the current NSManagedObjectContext and send the resulting array (or count) as \"next\".\n- `fetchWithTrigger:` which will rerun the fetch if the trigger fires any value.\n- fetching objectID and converting objectIDs to objects in current context\n- Running in background contexts\n- Saving of non-main contexts merges them into the main context.\n- Signal that's fired when a context is saved (wraps NSManagedObjectContextDidSaveNotification).\n- Signal that's fired after a merge.\n- Support not only for shoebox applications (with one main managed object context) but also document-based applications where you have a separate context for each document.\n\n[Demo]: ReactiveCoreDataApp/ASWAppDelegate.m\n[Specs]: ReactiveCoreDataTests/RACManagedObjectFetchSpecs.m\n","funding_links":[],"categories":["**Index**","Reactive Programming","Objective-C","etc"],"sub_categories":["ReactiveCocoa should transform EVERYTHING when it comes to writing iOS code so here's a bunch of projects that should make your RAC transtion a little bit smoother","Other free courses","Prototyping","Other Parsing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapparentsoft%2FReactiveCoreData","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapparentsoft%2FReactiveCoreData","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapparentsoft%2FReactiveCoreData/lists"}