Skip to content

Commit

Permalink
Merge pull request flutter-moum#35 from flutter-moum/dev
Browse files Browse the repository at this point in the history
Remove iOS Observer when deinit
  • Loading branch information
beygee authored Jan 29, 2021
2 parents f687af0 + c217cb0 commit 4223422
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 1.1.5
- Remove callback observer when deinit in iOS [#16](https://github.com/flutter-moum/flutter_screenshot_callback/issues/16).

## 1.1.4
- Fix iOS Build Error [#31](https://github.com/flutter-moum/flutter_screenshot_callback/issues/31).

Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.1.4"
version: "1.1.5"
sky_engine:
dependency: transitive
description: flutter
Expand Down
12 changes: 6 additions & 6 deletions ios/Classes/SwiftScreenshotCallbackPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ public class SwiftScreenshotCallbackPlugin: NSObject, FlutterPlugin {
}
}

deinit {
if(SwiftScreenshotCallbackPlugin.observer != nil) {
NotificationCenter.default.removeObserver(SwiftScreenshotCallbackPlugin.observer!);
SwiftScreenshotCallbackPlugin.observer = nil;
}
}
deinit {
if(SwiftScreenshotCallbackPlugin.observer != nil) {
NotificationCenter.default.removeObserver(SwiftScreenshotCallbackPlugin.observer!);
SwiftScreenshotCallbackPlugin.observer = nil;
}
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: screenshot_callback
description: Flutter plugin that allows you to detect mobile screenshot and execute callback functions on iOS and Android.
version: 1.1.4
version: 1.1.5
homepage: https://github.com/flutter-moum/flutter_screenshot_callback

environment:
Expand Down

0 comments on commit 4223422

Please sign in to comment.