Skip to content
This repository has been archived by the owner on Jun 23, 2024. It is now read-only.

Commit

Permalink
Fix "Session invalidated unexpectedly" error
Browse files Browse the repository at this point in the history
Fix by @martyfuhry #29 (comment)

Fixes #29
Fixes #33

Co-authored-by: martyfuhry <[email protected]>
  • Loading branch information
semlette and martyfuhry committed Mar 9, 2020
1 parent da0a57b commit 084fd2b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ios/Classes/NfcInFlutterPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ - (FlutterError * _Nullable)onListenWithArguments:(id _Nullable)arguments eventS
// the reader session if activate
- (FlutterError * _Nullable)onCancelWithArguments:(id _Nullable)arguments {
if (session != nil) {
[session invalidateSession];
if ([session isReady]) {
[session invalidateSession];
}
session = nil;
}
events = nil;
Expand Down

0 comments on commit 084fd2b

Please sign in to comment.