diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 11429e559..cd9aebeab 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -102,4 +102,13 @@ test:native-ios-sr: script: - yarn - (cd example/ios && RCT_NEW_ARCH_ENABLED=0 pod install --repo-update) - - set -o pipefail && xcodebuild -workspace example/ios/DdSdkReactNativeExample.xcworkspace -scheme DatadogSDKReactNativeSessionReplay test -destination "platform=iOS Simulator,OS=17.4,name=iPhone 15 Pro Max" | xcbeautify \ No newline at end of file + - set -o pipefail && xcodebuild -workspace example/ios/DdSdkReactNativeExample.xcworkspace -scheme DatadogSDKReactNativeSessionReplay test -destination "platform=iOS Simulator,OS=17.4,name=iPhone 15 Pro Max" | xcbeautify + +test:native-ios-newarch: + tags: [ "macos:sonoma", "specific:true" ] + stage: test + timeout: 1h + script: + - yarn + - (cd example-new-architecture/ios && RCT_NEW_ARCH_ENABLED=1 pod install --repo-update) + - set -o pipefail && xcodebuild -workspace example-new-architecture/ios/DdSdkReactNativeExample.xcworkspace -scheme DatadogSDKReactNative test -destination "platform=iOS Simulator,OS=17.4,name=iPhone 15 Pro Max" | xcbeautify \ No newline at end of file diff --git a/example-new-architecture/ios/DdSdkReactNativeExample.xcodeproj/project.pbxproj b/example-new-architecture/ios/DdSdkReactNativeExample.xcodeproj/project.pbxproj index 3bb499dee..2147632d7 100644 --- a/example-new-architecture/ios/DdSdkReactNativeExample.xcodeproj/project.pbxproj +++ b/example-new-architecture/ios/DdSdkReactNativeExample.xcodeproj/project.pbxproj @@ -7,28 +7,15 @@ objects = { /* Begin PBXBuildFile section */ - 00E356F31AD99517003FC87E /* DdSdkReactNativeExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* DdSdkReactNativeExampleTests.m */; }; 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 38FDA727C2ADFB612BC59CAF /* libPods-DdSdkReactNativeExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 392B93CDAA416A9B63770F89 /* libPods-DdSdkReactNativeExample.a */; }; - 43609140DA01D72B0EC361A9 /* libPods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DA13F6EB04383E0F02E999D /* libPods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests.a */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; E05973ABEC106467505BAF84 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 91A6167299744A7A5E90FD00 /* PrivacyInfo.xcprivacy */; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 13B07F861A680F5B00A75B9A; - remoteInfo = DdSdkReactNativeExample; - }; -/* End PBXContainerItemProxy section */ - /* Begin PBXFileReference section */ - 00E356EE1AD99517003FC87E /* DdSdkReactNativeExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DdSdkReactNativeExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 00E356F21AD99517003FC87E /* DdSdkReactNativeExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DdSdkReactNativeExampleTests.m; sourceTree = ""; }; 13B07F961A680F5B00A75B9A /* DdSdkReactNativeExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DdSdkReactNativeExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -37,26 +24,15 @@ 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = DdSdkReactNativeExample/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = DdSdkReactNativeExample/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = DdSdkReactNativeExample/main.m; sourceTree = ""; }; - 29DBB4C2B328032C15BC6F6D /* Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests.release.xcconfig"; path = "Target Support Files/Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests/Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests.release.xcconfig"; sourceTree = ""; }; 392B93CDAA416A9B63770F89 /* libPods-DdSdkReactNativeExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-DdSdkReactNativeExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 6F4909953279AC89EEC11F97 /* Pods-DdSdkReactNativeExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DdSdkReactNativeExample.debug.xcconfig"; path = "Target Support Files/Pods-DdSdkReactNativeExample/Pods-DdSdkReactNativeExample.debug.xcconfig"; sourceTree = ""; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = DdSdkReactNativeExample/LaunchScreen.storyboard; sourceTree = ""; }; 82767EEEA8B17AE9E7964826 /* Pods-DdSdkReactNativeExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DdSdkReactNativeExample.release.xcconfig"; path = "Target Support Files/Pods-DdSdkReactNativeExample/Pods-DdSdkReactNativeExample.release.xcconfig"; sourceTree = ""; }; - 8DA13F6EB04383E0F02E999D /* libPods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 91A6167299744A7A5E90FD00 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = DdSdkReactNativeExample/PrivacyInfo.xcprivacy; sourceTree = ""; }; - BFF31B86FD0DF57194AA0AF8 /* Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests/Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests.debug.xcconfig"; sourceTree = ""; }; + 91A6167299744A7A5E90FD00 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = DdSdkReactNativeExample/PrivacyInfo.xcprivacy; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 00E356EB1AD99517003FC87E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 43609140DA01D72B0EC361A9 /* libPods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -104,7 +80,6 @@ children = ( ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 392B93CDAA416A9B63770F89 /* libPods-DdSdkReactNativeExample.a */, - 8DA13F6EB04383E0F02E999D /* libPods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests.a */, ); name = Frameworks; sourceTree = ""; @@ -135,7 +110,6 @@ isa = PBXGroup; children = ( 13B07F961A680F5B00A75B9A /* DdSdkReactNativeExample.app */, - 00E356EE1AD99517003FC87E /* DdSdkReactNativeExampleTests.xctest */, ); name = Products; sourceTree = ""; @@ -145,8 +119,6 @@ children = ( 6F4909953279AC89EEC11F97 /* Pods-DdSdkReactNativeExample.debug.xcconfig */, 82767EEEA8B17AE9E7964826 /* Pods-DdSdkReactNativeExample.release.xcconfig */, - BFF31B86FD0DF57194AA0AF8 /* Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests.debug.xcconfig */, - 29DBB4C2B328032C15BC6F6D /* Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -154,27 +126,6 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 00E356ED1AD99517003FC87E /* DdSdkReactNativeExampleTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "DdSdkReactNativeExampleTests" */; - buildPhases = ( - D1A3CC694B1E963BF31887BB /* [CP] Check Pods Manifest.lock */, - 00E356EA1AD99517003FC87E /* Sources */, - 00E356EB1AD99517003FC87E /* Frameworks */, - 00E356EC1AD99517003FC87E /* Resources */, - BC3C0DB0431D1E5422DAA913 /* [CP] Embed Pods Frameworks */, - E0783DBC9D1C73BD4A2C2E27 /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - 00E356F51AD99517003FC87E /* PBXTargetDependency */, - ); - name = DdSdkReactNativeExampleTests; - productName = DdSdkReactNativeExampleTests; - productReference = 00E356EE1AD99517003FC87E /* DdSdkReactNativeExampleTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; 13B07F861A680F5B00A75B9A /* DdSdkReactNativeExample */ = { isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "DdSdkReactNativeExample" */; @@ -205,10 +156,6 @@ attributes = { LastUpgradeCheck = 1210; TargetAttributes = { - 00E356ED1AD99517003FC87E = { - CreatedOnToolsVersion = 6.2; - TestTargetID = 13B07F861A680F5B00A75B9A; - }; 13B07F861A680F5B00A75B9A = { LastSwiftMigration = 1120; }; @@ -228,19 +175,11 @@ projectRoot = ""; targets = ( 13B07F861A680F5B00A75B9A /* DdSdkReactNativeExample */, - 00E356ED1AD99517003FC87E /* DdSdkReactNativeExampleTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 00E356EC1AD99517003FC87E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; 13B07F8E1A680F5B00A75B9A /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -304,62 +243,6 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DdSdkReactNativeExample/Pods-DdSdkReactNativeExample-resources.sh\"\n"; showEnvVarsInLog = 0; }; - BC3C0DB0431D1E5422DAA913 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests/Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests/Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests/Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - D1A3CC694B1E963BF31887BB /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - E0783DBC9D1C73BD4A2C2E27 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests/Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests/Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests/Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; E7FEDEC891CFB376C01E3757 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -404,14 +287,6 @@ /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 00E356EA1AD99517003FC87E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 00E356F31AD99517003FC87E /* DdSdkReactNativeExampleTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 13B07F871A680F5B00A75B9A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -423,66 +298,7 @@ }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXTargetDependency section */ - 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 13B07F861A680F5B00A75B9A /* DdSdkReactNativeExample */; - targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - /* Begin XCBuildConfiguration section */ - 00E356F61AD99517003FC87E /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BFF31B86FD0DF57194AA0AF8 /* Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests.debug.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = DdSdkReactNativeExampleTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - "$(inherited)", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DdSdkReactNativeExample.app/DdSdkReactNativeExample"; - }; - name = Debug; - }; - 00E356F71AD99517003FC87E /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 29DBB4C2B328032C15BC6F6D /* Pods-DdSdkReactNativeExample-DdSdkReactNativeExampleTests.release.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - COPY_PHASE_STRIP = NO; - INFOPLIST_FILE = DdSdkReactNativeExampleTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - "$(inherited)", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DdSdkReactNativeExample.app/DdSdkReactNativeExample"; - }; - name = Release; - }; 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 6F4909953279AC89EEC11F97 /* Pods-DdSdkReactNativeExample.debug.xcconfig */; @@ -704,15 +520,6 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "DdSdkReactNativeExampleTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00E356F61AD99517003FC87E /* Debug */, - 00E356F71AD99517003FC87E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "DdSdkReactNativeExample" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/example-new-architecture/ios/DdSdkReactNativeExample.xcodeproj/xcshareddata/xcschemes/DdSdkReactNativeExample.xcscheme b/example-new-architecture/ios/DdSdkReactNativeExample.xcodeproj/xcshareddata/xcschemes/DdSdkReactNativeExample.xcscheme index efd16c499..acdf4e17d 100644 --- a/example-new-architecture/ios/DdSdkReactNativeExample.xcodeproj/xcshareddata/xcschemes/DdSdkReactNativeExample.xcscheme +++ b/example-new-architecture/ios/DdSdkReactNativeExample.xcodeproj/xcshareddata/xcschemes/DdSdkReactNativeExample.xcscheme @@ -32,10 +32,20 @@ skipped = "NO"> + BlueprintIdentifier = "2A33BB144CDB0164109965D17F0CF8F0" + BuildableName = "DatadogSDKReactNative-Unit-Tests.xctest" + BlueprintName = "DatadogSDKReactNative-Unit-Tests" + ReferencedContainer = "container:Pods/Pods.xcodeproj"> + + + + diff --git a/example-new-architecture/ios/Podfile b/example-new-architecture/ios/Podfile index a1988e256..15be59d3a 100644 --- a/example-new-architecture/ios/Podfile +++ b/example-new-architecture/ios/Podfile @@ -15,6 +15,8 @@ if linkage != nil end target 'DdSdkReactNativeExample' do + pod 'DatadogSDKReactNative', :path => '../../packages/core/DatadogSDKReactNative.podspec', :testspecs => ['Tests'] + config = use_native_modules! use_react_native!( @@ -22,33 +24,26 @@ target 'DdSdkReactNativeExample' do # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.." ) - - target 'DdSdkReactNativeExampleTests' do - inherit! :complete - # Pods for testing - end - - ios11Targets = [ - 'DatadogSDK', - 'DatadogSDKCrashReporting', - 'DatadogSDKReactNative' - ] - post_install do |installer| - installer.pods_project.targets.each do |target| - # Bump minimum deployment version - if ios11Targets.include?(target.name) - target.build_configurations.each do |config| - config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.4' - end - end - end - - # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 + post_install do |installer| + # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 react_native_post_install( installer, config[:reactNativePath], :mac_catalyst_enabled => false ) + + # Enable `DD_SDK_COMPILED_FOR_TESTING` condition when compiling `DatadogSDK` dependency: + datadog_sdk_target = installer.pods_project.targets.detect {|t| ["DatadogCore", "DatadogRUM", "DatadogLogs", "DatadogInternal", "DatadogTrace", "DatadogCrashReporting"].include?(t.name) } + datadog_sdk_target.build_configurations.each do |config| + config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = '$(inherited) DD_SDK_COMPILED_FOR_TESTING' + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = min_ios_version_supported + end + + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = min_ios_version_supported + end + end end end diff --git a/example-new-architecture/ios/Podfile.lock b/example-new-architecture/ios/Podfile.lock index 323aeff1e..3ced69f57 100644 --- a/example-new-architecture/ios/Podfile.lock +++ b/example-new-architecture/ios/Podfile.lock @@ -37,6 +37,33 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga + - DatadogSDKReactNative/Tests (2.8.0): + - DatadogCore (~> 2.27.0) + - DatadogCrashReporting (~> 2.27.0) + - DatadogLogs (~> 2.27.0) + - DatadogRUM (~> 2.27.0) + - DatadogTrace (~> 2.27.0) + - DatadogWebViewTracking (~> 2.27.0) + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2024.10.14.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga - DatadogTrace (2.27.0): - DatadogInternal (= 2.27.0) - OpenTelemetrySwiftApi (= 1.13.1) @@ -1607,7 +1634,8 @@ PODS: DEPENDENCIES: - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) - - "DatadogSDKReactNative (from `../node_modules/@datadog/mobile-react-native`)" + - DatadogSDKReactNative (from `../../packages/core/DatadogSDKReactNative.podspec`) + - DatadogSDKReactNative/Tests (from `../../packages/core/DatadogSDKReactNative.podspec`) - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - fast_float (from `../node_modules/react-native/third-party-podspecs/fast_float.podspec`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) @@ -1691,7 +1719,7 @@ EXTERNAL SOURCES: boost: :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec" DatadogSDKReactNative: - :path: "../node_modules/@datadog/mobile-react-native" + :path: "../../packages/core/DatadogSDKReactNative.podspec" DoubleConversion: :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" fast_float: @@ -1897,6 +1925,6 @@ SPEC CHECKSUMS: SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 Yoga: feb4910aba9742cfedc059e2b2902e22ffe9954a -PODFILE CHECKSUM: 177d543ee3f68b9c6bac1ab35280134bf5d24a20 +PODFILE CHECKSUM: f7035bf6c731beaedc18e482a664b7d0a2056b09 COCOAPODS: 1.16.2