rxswiftcommunity / rxcoredata Goto Github PK
View Code? Open in Web Editor NEWRxSwift extensions for Core Data
License: MIT License
RxSwift extensions for Core Data
License: MIT License
This is a good library!
Here is a problem about transforming from Observable
to Single
object.
The code as following below
var rx = coreDataContext.rx
.entities(InformationEntity.self, sortDescriptors: [NSSortDescriptor(key: INFO.UPDATE_DATE, ascending: false)])
.map { list -> FakeEntity in
var entity = FakeEntity()
entity.infoList = list
return entity
}
.asSingle() // โ doesn't work well.
.subscribe {
switch $0 {
case .next(let entity):
print(entity)
case .completed:
print("good")
case .error(let error):
print(error)
}
I don't know if my usage has problems or not. If I don't use asSingle()
, it works well. I just learn swift a little, sorry that I still don't understand swift well. Just let you know there's a problem about asSingle()
. Thank you!
Hi, guys I've already started some changes towards Swift 3.0 support.
If you don't mind I would like to continue working on it :)
So please add In Progress
label
I'm still getting familiar with RxSwift, especially with regards to its memory management. I'm not clear on "what" the observer is. So in FetchedResultsControllerEntityObserver, it keeps a reference to observer so it can send onNext events in the delegate methods. Is this not a retain cycle, because observer is being held by the FetchedResultsControllerEntityObserver and also (I might be wrong here) by the Observable it's created in? Or is this one of those scenarios where all the references are being held "down-stream" so you don't really have a parent<--> child retain-cycle, just two references to a child.
In the Observable.create( (observer) -> Disposable) call, who "owns" the observer?
IMHO, mapping domain
objects to NSManagedObject
and vice-versa shouldn't be part of this library, main target is rx
extensions of CoreData. (Mainly doing same as RxRealm)
Is this necessary to use iOS 9.1 as the minimum deployment target? As far as I know RxSwift and RxCocoa require a minimum dep. iOS 8.0 .
Can we lower the deployment target to iOS 8 ? I'll be happy to send a PR to do so.
I can not update UI when using RxCoreData modify model
Through your project Can you tell me how to use RxCoreData
thank you very much
I think @samscam initially created this repo, but hasn't been active lately. That's totally fin! Open source is all volunteer-based. But we should discuss future stewardship of this project.
Set create<E: Persistable> + get<P: Persistable> from private to public
(very useful)
Hi does the library make use of NSFetchResultController? Any example for demonstration?
Carthage support would be a nice to have. I am happy to add it, if you are guys are cool with it.
I am getting an unusual crash on devices > iOS 12 which seem to originate from FetchResultsControllerEntityObserver.sendNextElement().
Unfortunately, I am unable to recreate this as it happens randomly with devices from the App Store release. Seems related to #37. Here is a screenshot of where its happening, when mapping from CoreData model to a view model struct.
Currently RxSwift is at 4.0.0-alpha, but you cannot use RxCoreData against it because of the dependency to RxSwift ~>3.0.
I had a performance issue using the rx_entities
method.
The fetch request that I have to execute is heavy and it blocks the Main thread, and as expected the bottleneck is try self.frc.performFetch()
.
So I created another context with the concurrency type PrivateQueueConcurrencyType
and I called rx_entities
using the new context but nothing the try self.frc.performFetch()
was still executed on the Main Thread because I was calling rx_entities
on the Main Thread.
What do you think about wrapping the try self.frc.performFetch()
and sendNextElement()
with performBlock
? Or even better to schedule rx_entities
on the context thread.
0.4.0
RxCoreData currently cannot be used as a dependency for a Mac project, cocoapods complains that it will only work on iOS.
Hello. I have some problems with the addition of relations RxCoreData. I think it would be nice if you add some examples to show how to do it.
Swift package manager support would be a nice to have. I create PR for this.
Hi,
In NSManagedObjectContext+Rx.swift, the xcode told me that AnonymousDisposable is an unresolved identifier. I am using xcode 8.1 and Swift 3.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.