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

Handle error cases on iOS correctly, and simplify code #221

Merged
merged 3 commits into from Nov 15, 2021

Conversation

ben-xD
Copy link
Contributor

@ben-xD ben-xD commented Nov 12, 2021

This PR fixes the success and error handling for push. Its handling push activation (didActivateAblyPush, deactivation didDeactivateAblyPush and update didAblyPushRegistrationFail success/error given by Ably Cocoa.

In some cases, an error would be caused because we try to send a FlutterError through a MethodChannel. This is not a type that can be serialized through a MethodChannel. Instead, this fix uses the ARTErrorInfo, which has been used elsewhere to send back errors to platform side. It also avoids extraneous logic: mostly passing the errorInfo given by Ably Cocoa to the dart side.

TLDR: Removing complexity and just passing errors (or nil) directly.

@ben-xD ben-xD added the bug Something isn't working. It's clear that this does need to be fixed. label Nov 12, 2021
@ben-xD ben-xD self-assigned this Nov 12, 2021
@github-actions github-actions bot temporarily deployed to staging/pull/221/dartdoc November 12, 2021 12:37 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/221/dartdoc November 15, 2021 09:08 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. It's clear that this does need to be fixed.
3 participants