Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Instrument your application with Datadog.
s.author = { 'Datadog' => 'info@datadoghq.com' }
s.source = { :path => '.' }
s.source_files = 'datadog_flutter_plugin/Sources/**/*'
s.public_header_files = 'datadog_flutter_plugin/Sources/**/*.h'
s.static_framework = true
s.dependency 'Flutter'
s.dependency 'DatadogCore', '3.7.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import DatadogLogs
// Get the cached Datadog Context in a C structure. The members of `DatadogCContext` are
// owned by the caller, and must be freed to prevent a memory leak.
@_cdecl("flutterGetDatadogContext")
func flutterGetDatadogContext() -> DatadogCContext {
public func flutterGetDatadogContext() -> DatadogCContext {
let context = ContextMessageReceiver.shared.cachedContext
guard let context = context else {
return DatadogCContext(sessionId: nil, accountId: nil, userId: nil)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0. This product includes software
// developed at Datadog (https://www.datadoghq.com/). Copyright 2025-Present
// Datadog, Inc.

#ifndef datadog_flutter_plugin_h
#define datadog_flutter_plugin_h

// When Swift compiler generates it's bridging header, the existence of a public
// C exposed method causes it to look for this header. It is okay for this to be
// empty.

#endif /* datadog_flutter_plugin_h */
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ struct DatadogCContext {
char* userId;
};

#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ class DatadogContextForgeryFactory : ForgeryFactory<DatadogContext> {
locales = forge.aList { forge.aString() },
currentLocale = forge.aString(),
timeZone = forge.aString()
)
),
logicalCpuCount = forge.anInt(),
totalRam = forge.aNullable { anInt() },
isLowRam = forge.aNullable { aBool() }
),
userInfo = UserInfo(
id = forge.aNullable { anHexadecimalString() },
Expand Down