Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/datadog_flutter_plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

* Fix a crash on exit on iOS. See [#390]
* Add the ability to stop a RUM session. A new session is started on the next user interaction or on the next view start. See [#147]
* Increase minimum Flutter version to 3.0, Dart 2.17. See [#386]

Expand Down Expand Up @@ -162,3 +163,4 @@
[#334]: https://github.com/DataDog/dd-sdk-flutter/issues/334
[#358]: https://github.com/DataDog/dd-sdk-flutter/issues/358
[#372]: https://github.com/DataDog/dd-sdk-flutter/issues/372
[#390]: https://github.com/DataDog/dd-sdk-flutter/issues/390
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public class SwiftDatadogSdkPlugin: NSObject, FlutterPlugin {
let channel = FlutterMethodChannel(name: "datadog_sdk_flutter", binaryMessenger: registrar.messenger())
let instance = SwiftDatadogSdkPlugin(channel: channel)
registrar.addMethodCallDelegate(instance, channel: channel)
registrar.addApplicationDelegate(instance)
registrar.publish(instance)

DatadogLogsPlugin.register(with: registrar)
Expand Down Expand Up @@ -287,6 +288,10 @@ public class SwiftDatadogSdkPlugin: NSObject, FlutterPlugin {
}
}

public func applicationWillTerminate(_ application: UIApplication) {
_onDetach()
}

public func detachFromEngine(for registrar: FlutterPluginRegistrar) {
registrar.publish(NSNull())
_onDetach()
Expand Down
2 changes: 1 addition & 1 deletion packages/datadog_flutter_plugin/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
sdk: flutter
js: ^0.6.3
plugin_platform_interface: ^2.0.2
json_annotation: ^4.4.0
json_annotation: ^4.8.0
uuid: ^3.0.5
meta: ^1.7.0

Expand Down