dd-sdk-reactnative: Error on IOS build - 1.8.0 sdk version
Describe what happened
When i try build ios got this error
`@datadog/mobile-react-native/ios/Sources/DdTrace.mm:7:9: fatal error: 'DatadogSDKReactNative-Swift.h' file not found
#import <DatadogSDKReactNative-Swift.h> `
Steps to reproduce the issue:
Describe what you expected:
Additional context
- Version of the SDK: 1.8.0
- Version of React Native: 0.72
package.jsonPodfileandPodfile.lockandroid/build.gradleandandroid/app/build.gradle
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 2
- Comments: 20 (7 by maintainers)
Hi all,
The fix for this issue has been released in version
1.8.1of@datadog/mobile-react-native. Thanks a lot for all your inputs in solving this issue!Feel free to reopen the issue if the problem persists.
in our case it was fixed by replacing:
#import <DatadogSDKReactNative-Swift.h>by#import <DatadogSDKReactNative/DatadogSDKReactNative-Swift.h>in the *.mm filesHi @fmedinac, thanks for reporting!
First I apologize for this version creating so much trouble, it looks like the migration to the new architecture is not going as smoothly as we hoped even after our testing.
@fmedinac your error seems a little bit different, it looks like XCode is trying to find the
Dd{Sdk,Trace,Rum,Logs}.swiftfiles that were renamed intoDd{Sdk,Trace,Rum,Logs}Implementation.swiftin version1.8.0.This looks like some XCode cache issue, I tried to reproduce it by upgrading
@datadog/mobile-react-nativewithout any success.Maybe the easiest way to try to fix it would be to:
@datadog/mobile-react-nativefrom your dependenciespod install(hoping it will remove reference to previous files)@datadog/mobile-react-nativebackpod installagainIf that does not work, can you try the following:
rm -rf ~/Library/Developer/Xcode/DerivedData)pod cache clean --allios/Podsthen runpod installagainxed ios) and build it from thereAs a last resort, can you try the solution described here?
Let me know if this fixes your issue. If not, don’t hesitate to reach out to our support team so we can more easily share ideas.
@msouzadev @adscud could you try to apply these changes and let us know if that fixes the issue for you? If so we can release a new patch version with this change.