Notify Cordova on Successful Tag Write #408
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi!
Thank you for this library, it works really well so far.
When using the
nfc.write
method on an iOS device, I expected the [onSuccess] function to be called after a successful write. This does not seem to be the case in the newest version of this library and I assume that it was not intended to be this way. In an error case however, the Plugin is provided with an error message. Looking into the code I noticed that the session is closed and the callbackId is removed before writing any success message, so the Plugin part is never notified about a successful write.In this pull request I send an empty
CDVPluginResult
on a successful write. Let me know if there if there is anything else you want me to or provide, or if maybe I just misunderstood the usage ofnfc.write
.