Open kesavarao-EB opened 1 week ago
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
pod 'DatadogSDKObjc', '2.7.1'
and executed the below
bundle exec pod install
open AttendeeApp.xcworkspace
But still the same error i see in the simulator. Build is failing
@marco-saia-datadog Why we need to added pod 'DatadogSDKObjc', '2.7.1' in iOS repo when We already have defined "@datadog/mobile-react-native": "^2.3.5", in react-native repo ?
The dependency has to be added in order to use the iOS SDK functionalities from your iOS layer.
Please:
2.7.1
is also the version you see in node_modules/@datadog/mobile-react-native/DatadogSDKReactNative.podspec
cd ios && rm -rf Pods && rm Podfile.lock && pod install --repo-update
)@marco-saia-datadog I tried in the new setup, still the same error
yes , version is 2.7.1
in node_modules/@datadog/mobile-react-native/DatadogSDKReactNative.podspec
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 https://github.com/DataDog/dd-sdk-reactnative/blob/main/docs/hybrid_applications.md#:~:text=Native%20apps%20with%20React%20Native%20screens%3A%20Initialize%20the%20SDK%20on%20the%20native%20side
Also in the example repo, i dont see addition of this line in podfile
pod 'DatadogSDKObjc', '2.5.0'
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
yarn add @datadog/mobile-react-native
Clarification : I doubt if this will be required. Because we already have DataDog iOS sdk installed . After running @datadog/mobile-react-native and pod installing will install the below.
Installing DatadogCore 2.7.1
Installing DatadogCrashReporting (2.7.1)
Installing DatadogInternal 2.7.1
Installing DatadogLogs 2.7.1
Installing DatadogRUM 2.7.1
Installing DatadogSDKReactNative
Installing DatadogTrace 2.7.1
Installing DatadogWebViewTracking
Installing PLCrashReporter
This may have possibility to get conflict with the exsiting DatadogCore and other which got installed with DataDogiOS-sdk.
bundle exec pod install
open AttendeeApp.xcworkspace
Still the same issue. Sorry, is this working in your environment . Or am i missing any steps ?
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 node_modules/@datadog/mobile-react-native/DatadogSDKReactNative.podspec
?
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 https://github.com/DataDog/dd-sdk-reactnative/issues/682.
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'
![Uploading image.png…]()
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