Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine Pipeline Example #1

Open
RobertMillman opened this issue Mar 12, 2021 · 0 comments
Open

Combine Pipeline Example #1

RobertMillman opened this issue Mar 12, 2021 · 0 comments

Comments

@RobertMillman
Copy link

Hi

In the documentation section you show an example of how to create an instance of a CoreDataPublisher:

let events: AnyPublisher<[MyEntity], Never> = managedObjectContext.publisher(for: MyEntity.self)

However, the publisher returns a type <[Entity], Error> while your documentation (above) is expecting a return type of <[Entity], Never>. To overcome this I append an eraseToAnyPublisher() to your example. Am I misunderstanding something here?

Also, Can you provide a Combine pipeline ViewModel example illustrating how CoreDataPublisher works with map, flatMap, and collect?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant