Bcr.Datadog.iOS.Sdk 2.18.0

dotnet add package Bcr.Datadog.iOS.Sdk --version 2.18.0                
NuGet\Install-Package Bcr.Datadog.iOS.Sdk -Version 2.18.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Bcr.Datadog.iOS.Sdk" Version="2.18.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Bcr.Datadog.iOS.Sdk --version 2.18.0                
#r "nuget: Bcr.Datadog.iOS.Sdk, 2.18.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Bcr.Datadog.iOS.Sdk as a Cake Addin
#addin nuget:?package=Bcr.Datadog.iOS.Sdk&version=2.18.0

// Install Bcr.Datadog.iOS.Sdk as a Cake Tool
#tool nuget:?package=Bcr.Datadog.iOS.Sdk&version=2.18.0                

.NET Bindings for the Datadog Mobile iOS SDK

These bindings are only for iOS; tvOS is not included.

NOTE: These bindings are only against the Objective-C interop layer for the iOS SDK. As such, only code that is part of that layer is currently available.

Using the Objective-C layer requires you to import the entire SDK. In contrast, the Swift layer allows you to import only the specific packages you need.

Prerequisites

Before using the iOS SDK bindings, make sure you have the following prerequisites:

  • iOS 13

Usage

See the Datadog iOS SDK repository for more information about initialization for any given piece of functionality.

All functionality requires you to initialize the SDK before use. The Datadog documentation has more information; the basics are to initialize in FinishedLaunching():

  1. Import the Datadog.iOS namespace:

    using Datadog.iOS;
    
  2. Initialize the Datadog SDK with your client token and environment:

    public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
    {
        // Initialize the Datadog configuration
        DDConfiguration config = new DDConfiguration("<client token>", "<environment>");
        config.Service = "<service name>";
        config.Site = "<Datadog Site>";
    
        // Initialize the Datadog SDK with the configuration and tracking consent
        DDDatadog.Initialize(config, trackingConsent);
    
        // Enable Datadog logs
        DDLogs.Enable(new DDLogsConfiguration(null));
    
        // ...
    }
    

For more information on using the Datadog .NET Mobile SDK, refer to the official documentation.

FAQ

Why am I getting errors like Could not find a part of the path... when I add this NuGet package to my app and try to build it using Visual Studio on Windows?

This is the notorius "max path" bug in Visual Studio that limits paths to 260 characters. It particularly affects .NET for iOS apps, as .xcframework files are folders with very deep structures.

The .xcframework paths have been shortened as much as is practical. You have the following options:

  1. First, upvote the Visual Studio Dev Community issue. This problem has been known for years, and yet still no action has been taken.
  2. Enable the Windows registry setting for long path support.
  3. Perform all your NuGet restoration and builds on the command line.
  4. Shorten your source code path to be VERY short, as in one or two characters (if possible)
  5. Shorten your Git repository path of your clone to also be as short as possible.
  6. You may also need configure a nuget.config file to shorten the location of your NuGet packages. For example:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <config>
    <add key="globalPackagesFolder" value="C:\n" />
  </config>
</configuration>

License

This project is licensed under the MIT License.

This product includes software developed at Datadog (https://www.datadoghq.com/), used under the Apache License, v2.0

Those portions are Copyright 2019 Datadog, Inc.

Product Compatible and additional computed target framework versions.
.NET net8.0-ios17.5 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0-ios17.5

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.18.0 520 9/28/2024
2.17.0.1 195 9/13/2024
2.17.0 144 9/13/2024
2.16.0.4 166 9/10/2024
2.16.0.3 286 9/10/2024
2.16.0.2 255 9/7/2024
2.16.0.1 289 9/6/2024 2.16.0.1 is deprecated because it has critical bugs.
2.16.0 281 9/4/2024