Skip to content
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

[RUM-6255] Auto-Instrumented Native WebView #732

Merged
merged 12 commits into from
Nov 19, 2024
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
2 changes: 1 addition & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
buildscript {
ext {
buildToolsVersion = "34.0.0"
minSdkVersion = 23
minSdkVersion = 21
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = "25.1.8937393"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@
ReferencedContainer = "container:Pods/Pods.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "78809F2595CEAB87DE2759AB2D8ACC1A"
BuildableName = "DatadogSDKReactNativeWebView-Unit-Tests.xctest"
BlueprintName = "DatadogSDKReactNativeWebView-Unit-Tests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand Down
1 change: 1 addition & 0 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ end
target 'ddSdkReactnativeExample' do
pod 'DatadogSDKReactNative', :path => '../../packages/core/DatadogSDKReactNative.podspec', :testspecs => ['Tests']
pod 'DatadogSDKReactNativeSessionReplay', :path => '../../packages/react-native-session-replay/DatadogSDKReactNativeSessionReplay.podspec', :testspecs => ['Tests']
pod 'DatadogSDKReactNativeWebView', :path => '../../packages/react-native-webview/DatadogSDKReactNativeWebView.podspec', :testspecs => ['Tests']

config = use_native_modules!

Expand Down
44 changes: 43 additions & 1 deletion example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ PODS:
- DatadogSessionReplay (~> 2.18.0)
- React-Core
- React-RCTText
- DatadogSDKReactNativeWebView (2.4.4):
- DatadogInternal (~> 2.18.0)
- DatadogSDKReactNative
- DatadogWebViewTracking (~> 2.18.0)
- React-Core
- DatadogSDKReactNativeWebView/Tests (2.4.4):
- DatadogInternal (~> 2.18.0)
- DatadogSDKReactNative
- DatadogWebViewTracking (~> 2.18.0)
- React-Core
- react-native-webview
- React-RCTText
- DatadogSessionReplay (2.18.0):
- DatadogInternal (= 2.18.0)
- DatadogTrace (2.18.0):
Expand Down Expand Up @@ -984,6 +996,27 @@ PODS:
- React-Core
- react-native-safe-area-context (4.10.8):
- React-Core
- react-native-webview (13.12.2):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.01.01.00)
- RCTRequired
- RCTTypeSafety
- React-Codegen
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- React-nativeconfig (0.74.3)
- React-NativeModulesApple (0.74.3):
- glog
Expand Down Expand Up @@ -1262,6 +1295,8 @@ DEPENDENCIES:
- DatadogSDKReactNative/Tests (from `../../packages/core/DatadogSDKReactNative.podspec`)
- DatadogSDKReactNativeSessionReplay (from `../../packages/react-native-session-replay/DatadogSDKReactNativeSessionReplay.podspec`)
- DatadogSDKReactNativeSessionReplay/Tests (from `../../packages/react-native-session-replay/DatadogSDKReactNativeSessionReplay.podspec`)
- DatadogSDKReactNativeWebView (from `../../packages/react-native-webview/DatadogSDKReactNativeWebView.podspec`)
- DatadogSDKReactNativeWebView/Tests (from `../../packages/react-native-webview/DatadogSDKReactNativeWebView.podspec`)
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
- fmt (from `../node_modules/react-native/third-party-podspecs/fmt.podspec`)
Expand Down Expand Up @@ -1295,6 +1330,7 @@ DEPENDENCIES:
- React-Mapbuffer (from `../node_modules/react-native/ReactCommon`)
- react-native-crash-tester (from `../node_modules/react-native-crash-tester`)
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- react-native-webview (from `../node_modules/react-native-webview`)
- React-nativeconfig (from `../node_modules/react-native/ReactCommon`)
- React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
Expand Down Expand Up @@ -1347,6 +1383,8 @@ EXTERNAL SOURCES:
:path: "../../packages/core/DatadogSDKReactNative.podspec"
DatadogSDKReactNativeSessionReplay:
:path: "../../packages/react-native-session-replay/DatadogSDKReactNativeSessionReplay.podspec"
DatadogSDKReactNativeWebView:
:path: "../../packages/react-native-webview/DatadogSDKReactNativeWebView.podspec"
DoubleConversion:
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
FBLazyVector:
Expand Down Expand Up @@ -1410,6 +1448,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-crash-tester"
react-native-safe-area-context:
:path: "../node_modules/react-native-safe-area-context"
react-native-webview:
:path: "../node_modules/react-native-webview"
React-nativeconfig:
:path: "../node_modules/react-native/ReactCommon"
React-NativeModulesApple:
Expand Down Expand Up @@ -1478,6 +1518,7 @@ SPEC CHECKSUMS:
DatadogRUM: 8461273acc87ddfe4a8bbc6e6672ae9542471f86
DatadogSDKReactNative: 1bdbebae33aa0b9dd4e9054a6a9bb09d8ca875c8
DatadogSDKReactNativeSessionReplay: b44da5bca3a58700b2add61e0ddc554c71da6fba
DatadogSDKReactNativeWebView: c63eda46a8060a126ed309d52a64c44c03b93e2e
DatadogSessionReplay: c08f0df752e916639b04251eb3bf06dcda80591a
DatadogTrace: cc8ae210c274aa40658da83c9cc15de85bde405a
DatadogWebViewTracking: eeb8ea3fa13983752d2cc4dc0994664bf8388e15
Expand Down Expand Up @@ -1515,6 +1556,7 @@ SPEC CHECKSUMS:
React-Mapbuffer: 9f68550e7c6839d01411ac8896aea5c868eff63a
react-native-crash-tester: 8b270c754febeab8a5761a8f50bc89ed26985f10
react-native-safe-area-context: b7daa1a8df36095a032dff095a1ea8963cb48371
react-native-webview: 8d746f921964c87b87b190bf6a46fa148d40cd0f
React-nativeconfig: fa5de9d8f4dbd5917358f8ad3ad1e08762f01dcb
React-NativeModulesApple: 585d1b78e0597de364d259cb56007052d0bda5e5
React-perflogger: 7bb9ba49435ff66b666e7966ee10082508a203e8
Expand Down Expand Up @@ -1546,6 +1588,6 @@ SPEC CHECKSUMS:
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
Yoga: 04f1db30bb810187397fa4c37dd1868a27af229c

PODFILE CHECKSUM: 82a277ceb4b375dcd70cc36bab9e782fc3365650
PODFILE CHECKSUM: 54f3e178906b491e7b20bd99da6e8788777ec12e

COCOAPODS: 1.15.2
3 changes: 2 additions & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"react-native-gesture-handler": "^1.10.1",
"react-native-navigation": "7.40.1",
"react-native-safe-area-context": "4.10.8",
"react-native-screens": "3.29.0"
"react-native-screens": "3.29.0",
"react-native-webview": "^13.12.2"
},
"devDependencies": {
"@babel/core": "^7.20.0",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"react-native": "0.73.9",
"react-native-builder-bob": "0.26.0",
"react-native-gradle-plugin": "^0.71.19",
"react-native-webview": "11.26.1",
"react-native-webview": "13.12.2",
"react-test-renderer": "18.1.0",
"typescript": "5.0.4"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
require "json"

package = JSON.parse(File.read(File.join(__dir__, "package.json")))

Pod::Spec.new do |s|
s.name = "DatadogSDKReactNativeWebView"
s.version = package["version"]
s.summary = package["description"]
s.homepage = package["homepage"]
s.license = package["license"]
s.authors = package["author"]

s.platforms = { :ios => "12.0", :tvos => "12.0" }
s.source = { :git => "https://github.com/DataDog/dd-sdk-reactnative.git", :tag => "#{s.version}" }


s.source_files = "ios/Sources/*.{h,m,mm,swift}"

s.dependency "React-Core"

# /!\ Remember to keep the version in sync with DatadogSDKReactNative.podspec
s.dependency 'DatadogWebViewTracking', '~> 2.18.0'
s.dependency 'DatadogInternal', '~> 2.18.0'
s.dependency 'DatadogSDKReactNative'

s.test_spec 'Tests' do |test_spec|
test_spec.dependency "react-native-webview"
test_spec.dependency "React-RCTText"

test_spec.source_files = 'ios/Tests/*.swift'
test_spec.platforms = { :ios => "13.4", :tvos => "13.4" }
end


# 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 = {
"DEFINES_MODULE" => "YES",
"OTHER_CPLUSPLUSFLAGS" => "-DRCT_NEW_ARCH_ENABLED=1"
}

install_modules_dependencies(s)
end
end
Loading
Loading