Feature Description
Current Behavior:
The DataDog iOS SDK automatically determines the application version from the bundle's CFBundleShortVersionString or CFBundleVersion. There is currently no documented, supported public API for native iOS applications to override this version string.
Desired Behavior:
Provide a public, documented way for native iOS apps to set a custom application version that will be reported to DataDog, enabling use cases like:
- Identifying TestFlight builds with build numbers (e.g.,
1.0.0-1234)
- Differentiating between app variants using the same bundle version
Use Case:
We want to identify TestFlight builds in DataDog with their full build information (e.g., 1.0.0-<BUILD_NUMBER>) to better correlate logs and errors with specific TestFlight releases. Currently, only the bundle's short version string appears in DataDog, making it difficult to distinguish between multiple TestFlight builds of the same version.
Current Situation
While researching this issue, I discovered the version can technically be overridden, but only through internal, unsupported APIs:
-
additionalConfiguration[CrossPlatformAttributes.version] - This approach is explicitly internal-only (confirmed in #2281 where the team stated: "additionalConfiguration is intentionally internal and designed for cross-platform SDKs only")
-
DatadogCore.set(customVersion:) - This method exists but includes an explicit warning in the code:
/// This extension exposes internal methods that are used by other Datadog modules and cross platform
/// frameworks. It is not meant for public use.
///
/// DO NOT USE this extension or its methods if you are not working on the internals of the Datadog SDK
/// or one of the cross platform frameworks.
///
/// Methods, members, and functionality of this class are subject to change without notice, as they
/// are not considered part of the public interface of the Datadog SDK.
Result: Native iOS developers have no supported way to override the application version, even though the underlying functionality clearly exists for cross-platform SDKs.
Proposed Solution
Add a public version parameter to Datadog.Configuration:
Datadog.initialize(
with: Datadog.Configuration(
clientToken: "...",
env: "production",
version: "1.0.0-1234" // ← New parameter
),
trackingConsent: .granted
)
This would provide a clean, documented API that:
- Follows the existing configuration pattern
- Makes the capability discoverable through standard IDE autocomplete
- Maintains backward compatibility (optional parameter with fallback to bundle version)
Other Relevant Information
- This request is specifically for native iOS applications, distinct from the cross-platform SDK use cases
- The version override functionality already exists internally (as evidenced by PR #973)
- A similar capability exists for other attributes (build number was made public in PR #1465)
- Having a documented public API would prevent developers from using unsupported internal APIs that may break in future releases
Feature Description
Current Behavior:
The DataDog iOS SDK automatically determines the application version from the bundle's
CFBundleShortVersionStringorCFBundleVersion. There is currently no documented, supported public API for native iOS applications to override this version string.Desired Behavior:
Provide a public, documented way for native iOS apps to set a custom application version that will be reported to DataDog, enabling use cases like:
1.0.0-1234)Use Case:
We want to identify TestFlight builds in DataDog with their full build information (e.g.,
1.0.0-<BUILD_NUMBER>) to better correlate logs and errors with specific TestFlight releases. Currently, only the bundle's short version string appears in DataDog, making it difficult to distinguish between multiple TestFlight builds of the same version.Current Situation
While researching this issue, I discovered the version can technically be overridden, but only through internal, unsupported APIs:
additionalConfiguration[CrossPlatformAttributes.version]- This approach is explicitly internal-only (confirmed in #2281 where the team stated: "additionalConfiguration is intentionally internal and designed for cross-platform SDKs only")DatadogCore.set(customVersion:)- This method exists but includes an explicit warning in the code:Result: Native iOS developers have no supported way to override the application version, even though the underlying functionality clearly exists for cross-platform SDKs.
Proposed Solution
Add a public
versionparameter toDatadog.Configuration:This would provide a clean, documented API that:
Other Relevant Information