-
Notifications
You must be signed in to change notification settings - Fork 45
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
Hybrid [iOS-with-ReactNative] Redefinition of module 'DatadogCore' #683
Comments
Hello @kesavarao-EB 👋 thank you for reaching out! I believe the errors are caused by two different versions of the iOS Datadog SDK being installed on the same project. React Native SDK v2.3.5 is shipped with iOS v2.7.1. I would try to update the iOS pod to exactly v2.7.1 and see if the issues are resolved, by updating your podfile: pod 'DatadogSDKObjc', '2.5.0' |
Thankyou for checking @marco-saia-datadog yes i have updated podfile
and executed the below
But still the same error i see in the simulator. Build is failing @marco-saia-datadog Why we need to added |
The dependency has to be added in order to use the iOS SDK functionalities from your iOS layer. Please:
|
@marco-saia-datadog I tried in the new setup, still the same error yes , version is Also executed these steps
Would you mind confirming if any steps are missing in this doc (Native app with RN screens) which i am following Also in the example repo, i dont see addition of this line in podfile
Any help on this ? |
@kesavarao-EB thank you for your patience 🙏 I believe our documentation might be outdated, we will verify that the instructions are still relevant to this day. In the meantime, have you tried removing the pod from your Podfile? If you can access Datadog SDK classes from your codebase, without manually adding the pod to your Podfile, the setup is correct and the SDK will function properly. |
@marco-saia-datadog Still the same. In the clean setup just added the following Step 1) iOS Repo :yarn add @datadog/mobile-react-native Clarification :
This may have possibility to get conflict with the exsiting DatadogCore and other which got installed with DataDogiOS-sdk. Step 2 - cd to ios
Still the same issue. Can you provide the working steps ? |
If I understand correctly, you have Datadog iOS SDK installed in your native project already. Have you checked that the native version of the iOS SDK matches the version defined in If it does, and you encounter the same issue, you might then have to patch the SDK, with our support. This issue could be currently blocking #682. |
Both has same version 2.7.1 |
@kesavarao-EB I am updating the example project and verifying that everything is working properly. I will get back to you soon! |
Describe the issue
We have react-native project and ios project in a seperate repo. iOS already exsists and we have newly created RN repo - All RN code resides in this repo.
iOS app is the main app in which very few screens are based on react-native. These two are integrated using bundle and other.
In iOS repo - DataDog RUM is already instrumented and working fine.
In react-native repo - Newly instrumented datadogRUM by installing below
Now in iOS repo, we run pod install and opened Xcode
Issue -
In xocde when building the App, we are getting below error and build is failed.
Redefinition of module 'DatadogCore'
Redefinition of module 'DatadogRUM'
Redefinition of module 'DatadogLogs'
Redefinition of module 'DatadogTrace'
Any help pls ?
Thanks
Reproduction steps
In iOS repo - DataDog RUM is already instrumented and working fine.
In react-native repo - Newly instrumented datadogRUM by installing below
Now in iOS repo, we run pod install and opened Xcode
SDK logs
No response
Device Information
No response
SDK version
"@datadog/mobile-react-native": "^2.3.5"
Integration Methods
NPM
React Native Version
^0.73.4
Package.json Contents
In react-native repo, part of package.json is
"dependencies": {
"@datadog/mobile-react-native": "^2.3.5",
"@datadog/mobile-react-native-navigation": "^2.3.5",
"@datadog/mobile-react-navigation": "^2.3.5",
"@types/react-native": "^0.73.0",
"react": "18.2.0",
"react-native": "^0.73.4",
"react-native-code-push": "^8.2.1",
}
iOS Setup
In pod file, included
pod 'DatadogSDKObjc', '~> 2.5.0'
Android Setup
No response
Other relevant information
No response
The text was updated successfully, but these errors were encountered: