Bcr.Datadog.iOS.Sdk
2.16.0
See the version list below for details.
dotnet add package Bcr.Datadog.iOS.Sdk --version 2.16.0
NuGet\Install-Package Bcr.Datadog.iOS.Sdk -Version 2.16.0
<PackageReference Include="Bcr.Datadog.iOS.Sdk" Version="2.16.0" />
paket add Bcr.Datadog.iOS.Sdk --version 2.16.0
#r "nuget: Bcr.Datadog.iOS.Sdk, 2.16.0"
// Install Bcr.Datadog.iOS.Sdk as a Cake Addin #addin nuget:?package=Bcr.Datadog.iOS.Sdk&version=2.16.0 // Install Bcr.Datadog.iOS.Sdk as a Cake Tool #tool nuget:?package=Bcr.Datadog.iOS.Sdk&version=2.16.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()
:
Import the
Datadog.iOS
namespace:using Datadog.iOS;
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:
- First, upvote the Visual Studio Dev Community issue. This problem has been known for years, and yet still no action has been taken.
- Enable the Windows registry setting for long path support.
- Perform all your NuGet restoration and builds on the command line.
- Shorten your source code path to be VERY short, as in one or two characters (if possible)
- Shorten your Git repository path of your clone to also be as short as possible.
- 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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-ios17.5 is compatible. |
-
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.