Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,22 @@ Pod::Spec.new do |s|
test_spec.platforms = { :ios => "13.4", :tvos => "13.4" }
end


xcconfig = {
"HEADER_SEARCH_PATHS" => "$(PODS_ROOT)/React-RCTFabric/**",
}

if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"

s.pod_target_xcconfig = {
xcconfig.merge!({
"DEFINES_MODULE" => "YES",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
}
})
end

s.pod_target_xcconfig = xcconfig

if respond_to?(:install_modules_dependencies, true)
install_modules_dependencies(s)
# else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@
#import <react/renderer/components/DdSDKReactNativeSessionReplay/Props.h>
#import <react/renderer/components/DdSDKReactNativeSessionReplay/RCTComponentViewHelpers.h>
#import <React/RCTFabricComponentsPlugins.h>
#import "DatadogSDKReactNativeSessionReplay-Swift.h"


#if __has_include("DatadogSDKReactNativeSessionReplay-Swift.h")
#import <DatadogSDKReactNativeSessionReplay-Swift.h>
#else
#import <DatadogSDKReactNativeSessionReplay/DatadogSDKReactNativeSessionReplay-Swift.h>
#endif

using namespace facebook::react;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
*/

#import <React/RCTViewManager.h>
#import "DatadogSDKReactNativeSessionReplay-Swift.h"
#if __has_include("DatadogSDKReactNativeSessionReplay-Swift.h")
#import <DatadogSDKReactNativeSessionReplay-Swift.h>
#else
#import <DatadogSDKReactNativeSessionReplay/DatadogSDKReactNativeSessionReplay-Swift.h>
#endif

@interface DdPrivacyView : UIView

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,9 @@

#if RCT_NEW_ARCH_ENABLED
#import "RCTVersion.h"

#import <React-RCTFabric/React/RCTParagraphComponentView.h>
#import <React-RCTFabric/React/RCTConversions.h>

#if __has_include(<React-FabricComponents/react/renderer/components/text/ParagraphProps.h>)
#import <React-FabricComponents/react/renderer/components/text/ParagraphProps.h>
#else
#import <React-Fabric/react/renderer/components/text/ParagraphProps.h>
#endif
#import "RCTParagraphComponentView.h"
#import "RCTConversions.h"
#import "ParagraphProps.h"

namespace rct = facebook::react;
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Pod::Spec.new do |s|

s.dependency "React-Core"

if ENV['USE_FRAMEWORKS'] == 'static'
s.dependency "react-native-webview"
end

# /!\ Remember to keep the version in sync with DatadogSDKReactNative.podspec
s.dependency 'DatadogWebViewTracking', '~> 2.27.0'
s.dependency 'DatadogInternal', '~> 2.27.0'
Expand All @@ -31,16 +35,23 @@ Pod::Spec.new do |s|
test_spec.platforms = { :ios => "13.4", :tvos => "13.4" }
end

xcconfig = {
"HEADER_SEARCH_PATHS" => "$(PODS_ROOT)/react-native-webview/**"
}

# This guard prevents installing the dependencies when we run `pod install` in the old architecture.
# The `install_modules_dependencies` function is only available from RN 0.71, the new architecture is not
# supported on earlier RN versions.
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
s.pod_target_xcconfig = {

xcconfig.merge!({
"DEFINES_MODULE" => "YES",
"OTHER_CPLUSPLUSFLAGS" => "-DRCT_NEW_ARCH_ENABLED=1"
}
"OTHER_CPLUSPLUSFLAGS" => "-DRCT_NEW_ARCH_ENABLED=1",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
})

install_modules_dependencies(s)
end

s.pod_target_xcconfig = xcconfig
end
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@

#import "RCTDatadogWebView.h"
#import "RCTDatadogWebViewManager.h"
#import <react-native-webview/RNCWebViewImpl.h>
#import "RNCWebViewImpl.h"
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Copyright 2016-Present Datadog, Inc.
*/

#import <react-native-webview/RNCWebViewImpl.h>
#import "RNCWebViewImpl.h"

@class RCTDatadogWebView;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Copyright 2016-Present Datadog, Inc.
*/

#import <react-native-webview/RNCWebViewManager.h>
#import "RNCWebViewManager.h"

@interface RCTDatadogWebViewManager : RNCWebViewManager
@end
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
#import <DatadogSDKReactNative/DatadogSDKReactNative-umbrella.h>
#import "RCTDatadogWebViewManager.h"
#import "RCTDatadogWebView.h"
#import "DatadogSDKReactNativeWebView-Swift.h"

#if __has_include("DatadogSDKReactNativeWebView-Swift.h")
#import <DatadogSDKReactNativeWebView-Swift.h>
#else
#import <DatadogSDKReactNativeWebView/DatadogSDKReactNativeWebView-Swift.h>
#endif

@interface RCTDatadogWebViewManager () <RNCWebViewDelegate, RCTDatadogWebViewDelegate>
@property (nonatomic, strong) NSMutableSet *allowedHosts;
Expand Down
Loading