-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Name collisions caused by the module name being Datadog
+ having a class named Datadog
+ having a class named Logger
#250
Comments
Hey @bsarrazin 👋. Thanks for using Datadog 🙂! To avoid the name collision and compiler ambiguity we provide the dd-sdk-ios/Sources/Datadog/Logger.swift Lines 79 to 89 in cbb9342
which may be used as a workaround. But the argument on Apple's |
@ncreated thanks for that, I definitely missed that alias. |
Renaming the |
Fixed in |
The issue
Apple introduced a new
Logger
class in iOS 14, and most project have some kind ofLogger
class as a layer of abstraction.This is just an annoying import dance cause solely by the fact that the module contains a class of the same name.
Datadog SDK version:
_Which version of the Datadog SDK causes this problem?
1.3.1
Last working Datadog SDK version:
_What is the last Datadog SDK version where this problem didn't occur?
n/a
Dependency Manager:
_Which dependency manager do you use?
Cocoapods
Xcode version:
Xcode 11.7 (11E801a)
Swift version:
5.2.4
The Solution
Rename the module to
DatadogSDK
or any other name than theDatadog
class.Or rename the
Datadog
class to something likeDatadogClient
.The text was updated successfully, but these errors were encountered: