From 9d84210c50dd98a09de39bb3d4ac7c39572588f7 Mon Sep 17 00:00:00 2001 From: Mert Buran Date: Wed, 10 Mar 2021 17:31:37 +0100 Subject: [PATCH] RUMM-1145 Carthage XCFrameworks supported 1. .frameworks replaced with .xcframeworks 2. FRAMEWORK_SEARCH_PATH is set for both Datadog and DatadogObjc Otherwise `carthage build` fails with no module found errors --- Datadog/Datadog.xcodeproj/project.pbxproj | 46 ++++++------ Makefile | 5 +- .../CTProject.xcodeproj/project.pbxproj | 70 +++++++++---------- .../carthage/CTProject/ViewController.swift | 1 + dependency-manager-tests/carthage/Makefile | 15 ++-- .../carthage/tmp.xcconfig | 4 -- tools/license/check-license.sh | 2 +- 7 files changed, 66 insertions(+), 77 deletions(-) delete mode 100644 dependency-manager-tests/carthage/tmp.xcconfig diff --git a/Datadog/Datadog.xcodeproj/project.pbxproj b/Datadog/Datadog.xcodeproj/project.pbxproj index 02d1477c0a..faa5634d28 100644 --- a/Datadog/Datadog.xcodeproj/project.pbxproj +++ b/Datadog/Datadog.xcodeproj/project.pbxproj @@ -183,9 +183,6 @@ 614E9EB3244719FA007EE3E1 /* BundleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 614E9EB2244719FA007EE3E1 /* BundleType.swift */; }; 6152C83E24BE1C91006A1679 /* HTTPServerMock in Frameworks */ = {isa = PBXBuildFile; productRef = 6152C83D24BE1C91006A1679 /* HTTPServerMock */; }; 6152C84024BE1CC8006A1679 /* DataUploaderBenchmarkTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6152C83F24BE1CC8006A1679 /* DataUploaderBenchmarkTests.swift */; }; - 61569795256CF6D400C6AADA /* Kronos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61569794256CF6D400C6AADA /* Kronos.framework */; }; - 615697E3256CFB4700C6AADA /* Kronos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61569794256CF6D400C6AADA /* Kronos.framework */; }; - 615697E4256CFB4700C6AADA /* Kronos.framework in ⚙️ Embed Framework Dependencies */ = {isa = PBXBuildFile; fileRef = 61569794256CF6D400C6AADA /* Kronos.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 6156CB8E24DDA1B5008CB2B2 /* RUMContextProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6156CB8D24DDA1B5008CB2B2 /* RUMContextProvider.swift */; }; 6156CB9024DDA8BE008CB2B2 /* RUMCurrentContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6156CB8F24DDA8BE008CB2B2 /* RUMCurrentContext.swift */; }; 6156CB9324DDAA34008CB2B2 /* RUMCurrentContextTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6156CB9224DDAA34008CB2B2 /* RUMCurrentContextTests.swift */; }; @@ -377,6 +374,9 @@ 61FF282924B8A31E000B3D9B /* RUMEventMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61FF282724B8A31E000B3D9B /* RUMEventMatcher.swift */; }; 61FF283024BC5E2D000B3D9B /* RUMEventFileOutputTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61FF282F24BC5E2D000B3D9B /* RUMEventFileOutputTests.swift */; }; 61FF9A4525AC5DEA001058CC /* RUMViewIdentity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61FF9A4425AC5DEA001058CC /* RUMViewIdentity.swift */; }; + 9E0542CB25F8EBBE007A3D0B /* Kronos.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E0542CA25F8EBBE007A3D0B /* Kronos.xcframework */; }; + 9E0542D725F8EBE3007A3D0B /* Kronos.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E0542CA25F8EBBE007A3D0B /* Kronos.xcframework */; }; + 9E0542D825F8EBE3007A3D0B /* Kronos.xcframework in ⚙️ Embed Framework Dependencies */ = {isa = PBXBuildFile; fileRef = 9E0542CA25F8EBBE007A3D0B /* Kronos.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 9E26E6B924C87693000B3270 /* RUMDataModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E26E6B824C87693000B3270 /* RUMDataModels.swift */; }; 9E307C3224C8846D0039607E /* RUMDataModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E26E6B824C87693000B3270 /* RUMDataModels.swift */; }; 9E36D92224373EA700BFBDB7 /* SwiftExtensionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E36D92124373EA700BFBDB7 /* SwiftExtensionsTests.swift */; }; @@ -443,9 +443,9 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( + 9E0542D825F8EBE3007A3D0B /* Kronos.xcframework in ⚙️ Embed Framework Dependencies */, 61441C4E24619498003D8BB8 /* Datadog.framework in ⚙️ Embed Framework Dependencies */, 61570006246AAE5E00E96950 /* DatadogObjc.framework in ⚙️ Embed Framework Dependencies */, - 615697E4256CFB4700C6AADA /* Kronos.framework in ⚙️ Embed Framework Dependencies */, ); name = "⚙️ Embed Framework Dependencies"; runOnlyForDeploymentPostprocessing = 0; @@ -636,7 +636,6 @@ 6152C84224BE2165006A1679 /* MockServerAddress.local.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = MockServerAddress.local.xcconfig; sourceTree = ""; }; 615519252461BCE7002A85CF /* Datadog.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Datadog.xcconfig; sourceTree = ""; }; 615519262461BCE7002A85CF /* Datadog.local.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Datadog.local.xcconfig; sourceTree = ""; }; - 61569794256CF6D400C6AADA /* Kronos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kronos.framework; path = ../Carthage/Build/iOS/Kronos.framework; sourceTree = ""; }; 61569894256D0E9A00C6AADA /* Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = ""; }; 6156CB8D24DDA1B5008CB2B2 /* RUMContextProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RUMContextProvider.swift; sourceTree = ""; }; 6156CB8F24DDA8BE008CB2B2 /* RUMCurrentContext.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RUMCurrentContext.swift; sourceTree = ""; }; @@ -828,6 +827,7 @@ 61FF282724B8A31E000B3D9B /* RUMEventMatcher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RUMEventMatcher.swift; sourceTree = ""; }; 61FF282F24BC5E2D000B3D9B /* RUMEventFileOutputTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RUMEventFileOutputTests.swift; sourceTree = ""; }; 61FF9A4425AC5DEA001058CC /* RUMViewIdentity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RUMViewIdentity.swift; sourceTree = ""; }; + 9E0542CA25F8EBBE007A3D0B /* Kronos.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Kronos.xcframework; path = ../Carthage/Build/Kronos.xcframework; sourceTree = ""; }; 9E26E6B824C87693000B3270 /* RUMDataModels.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RUMDataModels.swift; sourceTree = ""; }; 9E36D92124373EA700BFBDB7 /* SwiftExtensionsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftExtensionsTests.swift; sourceTree = ""; }; 9E544A4E24753C6E00E83072 /* MethodSwizzler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MethodSwizzler.swift; sourceTree = ""; }; @@ -874,7 +874,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 615697E3256CFB4700C6AADA /* Kronos.framework in Frameworks */, + 9E0542D725F8EBE3007A3D0B /* Kronos.xcframework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -900,7 +900,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 61569795256CF6D400C6AADA /* Kronos.framework in Frameworks */, + 9E0542CB25F8EBBE007A3D0B /* Kronos.xcframework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1375,7 +1375,7 @@ 61133C6F2423993200786299 /* Frameworks */ = { isa = PBXGroup; children = ( - 61569794256CF6D400C6AADA /* Kronos.framework */, + 9E0542CA25F8EBBE007A3D0B /* Kronos.xcframework */, ); name = Frameworks; sourceTree = ""; @@ -3366,7 +3366,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(SRCROOT)/../Carthage/Build/iOS", + "$(SRCROOT)/../Carthage/Build/", ); INFOPLIST_FILE = TargetSupport/Datadog/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -3396,7 +3396,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(SRCROOT)/../Carthage/Build/iOS", + "$(SRCROOT)/../Carthage/Build/", ); INFOPLIST_FILE = TargetSupport/Datadog/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -3471,6 +3471,10 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../Carthage/Build/", + ); INFOPLIST_FILE = TargetSupport/DatadogObjc/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -3496,6 +3500,10 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../Carthage/Build/", + ); INFOPLIST_FILE = TargetSupport/DatadogObjc/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -3519,10 +3527,6 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/../Carthage/Build/iOS", - ); INFOPLIST_FILE = TargetSupport/Example/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -3545,10 +3549,6 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/../Carthage/Build/iOS", - ); INFOPLIST_FILE = TargetSupport/Example/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -3569,10 +3569,6 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/../Carthage/Build/iOS", - ); INFOPLIST_FILE = TargetSupport/Example/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -3772,7 +3768,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(SRCROOT)/../Carthage/Build/iOS", + "$(SRCROOT)/../Carthage/Build/", ); INFOPLIST_FILE = TargetSupport/Datadog/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -3800,6 +3796,10 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../Carthage/Build/", + ); INFOPLIST_FILE = TargetSupport/DatadogObjc/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( diff --git a/Makefile b/Makefile index 044b1766c0..9315b8ae5c 100644 --- a/Makefile +++ b/Makefile @@ -22,10 +22,10 @@ export DD_SDK_TESTING_XCCONFIG_CI dependencies: @echo "⚙️ Installing dependencies..." - @carthage bootstrap --platform iOS + @brew upgrade carthage + @carthage bootstrap --platform iOS --use-xcframeworks ifeq (${ci}, true) @echo $$DD_SDK_TESTING_XCCONFIG_CI > xcconfigs/DatadogSDKTesting.local.xcconfig; -endif @brew list gh &>/dev/null || brew install gh @rm -rf instrumented-tests/DatadogSDKTesting.xcframework @rm -rf instrumented-tests/DatadogSDKTesting.zip @@ -33,6 +33,7 @@ endif @gh release download ${DD_SDK_SWIFT_TESTING_VERSION} -D instrumented-tests -R https://github.com/DataDog/dd-sdk-swift-testing -p "DatadogSDKTesting.zip" @unzip instrumented-tests/DatadogSDKTesting.zip -d instrumented-tests @[ -e "instrumented-tests/DatadogSDKTesting.xcframework" ] && echo "DatadogSDKTesting.xcframework - OK" || { echo "DatadogSDKTesting.xcframework - missing"; exit 1; } +endif xcodeproj-httpservermock: @echo "⚙️ Generating 'HTTPServerMock.xcodeproj'..." diff --git a/dependency-manager-tests/carthage/CTProject.xcodeproj/project.pbxproj b/dependency-manager-tests/carthage/CTProject.xcodeproj/project.pbxproj index bf2e0c4334..061e07e832 100644 --- a/dependency-manager-tests/carthage/CTProject.xcodeproj/project.pbxproj +++ b/dependency-manager-tests/carthage/CTProject.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ @@ -14,7 +14,12 @@ 61C36425243752A600C4D4E6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 61C36423243752A600C4D4E6 /* LaunchScreen.storyboard */; }; 61C36430243752A600C4D4E6 /* CTProjectTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61C3642F243752A600C4D4E6 /* CTProjectTests.swift */; }; 61C3643B243752A600C4D4E6 /* CTProjectUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61C3643A243752A600C4D4E6 /* CTProjectUITests.swift */; }; - 61C3644B2437547A00C4D4E6 /* Datadog.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61C3644A2437547A00C4D4E6 /* Datadog.framework */; }; + 9E9D5E8825F90FC6002F12A0 /* Kronos.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E9D5E8525F90FC6002F12A0 /* Kronos.xcframework */; }; + 9E9D5E8925F90FC6002F12A0 /* Kronos.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9E9D5E8525F90FC6002F12A0 /* Kronos.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 9E9D5E8A25F90FC6002F12A0 /* DatadogObjc.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E9D5E8625F90FC6002F12A0 /* DatadogObjc.xcframework */; }; + 9E9D5E8B25F90FC6002F12A0 /* DatadogObjc.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9E9D5E8625F90FC6002F12A0 /* DatadogObjc.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 9E9D5E8C25F90FC6002F12A0 /* Datadog.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E9D5E8725F90FC6002F12A0 /* Datadog.xcframework */; }; + 9E9D5E8D25F90FC6002F12A0 /* Datadog.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9E9D5E8725F90FC6002F12A0 /* Datadog.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -34,10 +39,25 @@ }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + 9E9D5E8E25F90FC6002F12A0 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 9E9D5E8D25F90FC6002F12A0 /* Datadog.xcframework in Embed Frameworks */, + 9E9D5E8B25F90FC6002F12A0 /* DatadogObjc.xcframework in Embed Frameworks */, + 9E9D5E8925F90FC6002F12A0 /* Kronos.xcframework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 615519322461CDB4002A85CF /* Datadog.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Datadog.xcconfig; sourceTree = ""; }; 615519332461CDB4002A85CF /* Datadog.local.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Datadog.local.xcconfig; sourceTree = ""; }; - 615519342461D121002A85CF /* OpenTracing.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenTracing.framework; path = Carthage/Build/iOS/OpenTracing.framework; sourceTree = ""; }; 61C36415243752A500C4D4E6 /* CTProject.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CTProject.app; sourceTree = BUILT_PRODUCTS_DIR; }; 61C36418243752A500C4D4E6 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 61C3641A243752A500C4D4E6 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; @@ -51,7 +71,9 @@ 61C36436243752A600C4D4E6 /* CTProjectUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CTProjectUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 61C3643A243752A600C4D4E6 /* CTProjectUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CTProjectUITests.swift; sourceTree = ""; }; 61C3643C243752A600C4D4E6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 61C3644A2437547A00C4D4E6 /* Datadog.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Datadog.framework; path = Carthage/Build/iOS/Datadog.framework; sourceTree = ""; }; + 9E9D5E8525F90FC6002F12A0 /* Kronos.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Kronos.xcframework; path = Carthage/Build/Kronos.xcframework; sourceTree = ""; }; + 9E9D5E8625F90FC6002F12A0 /* DatadogObjc.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = DatadogObjc.xcframework; path = Carthage/Build/DatadogObjc.xcframework; sourceTree = ""; }; + 9E9D5E8725F90FC6002F12A0 /* Datadog.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Datadog.xcframework; path = Carthage/Build/Datadog.xcframework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -59,7 +81,9 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 61C3644B2437547A00C4D4E6 /* Datadog.framework in Frameworks */, + 9E9D5E8C25F90FC6002F12A0 /* Datadog.xcframework in Frameworks */, + 9E9D5E8A25F90FC6002F12A0 /* DatadogObjc.xcframework in Frameworks */, + 9E9D5E8825F90FC6002F12A0 /* Kronos.xcframework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -146,8 +170,9 @@ 61C364492437547A00C4D4E6 /* Frameworks */ = { isa = PBXGroup; children = ( - 615519342461D121002A85CF /* OpenTracing.framework */, - 61C3644A2437547A00C4D4E6 /* Datadog.framework */, + 9E9D5E8725F90FC6002F12A0 /* Datadog.xcframework */, + 9E9D5E8625F90FC6002F12A0 /* DatadogObjc.xcframework */, + 9E9D5E8525F90FC6002F12A0 /* Kronos.xcframework */, ); name = Frameworks; sourceTree = ""; @@ -162,8 +187,8 @@ 61C36411243752A500C4D4E6 /* Sources */, 61C36412243752A500C4D4E6 /* Frameworks */, 61C36413243752A500C4D4E6 /* Resources */, - 61C364482437544F00C4D4E6 /* ⚙️ Carthage */, 61C3645C243768FC00C4D4E6 /* ⚙️ Run linter */, + 9E9D5E8E25F90FC6002F12A0 /* Embed Frameworks */, ); buildRules = ( ); @@ -280,27 +305,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 61C364482437544F00C4D4E6 /* ⚙️ Carthage */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "$(SRCROOT)/Carthage/Build/iOS/Datadog.framework", - "$(SRCROOT)/Carthage/Build/iOS/Kronos.framework", - ); - name = "⚙️ Carthage"; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/usr/local/bin/carthage copy-frameworks\n"; - showEnvVarsInLog = 0; - }; 61C3645C243768FC00C4D4E6 /* ⚙️ Run linter */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -505,10 +509,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = CTProject/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -526,10 +526,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = CTProject/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", diff --git a/dependency-manager-tests/carthage/CTProject/ViewController.swift b/dependency-manager-tests/carthage/CTProject/ViewController.swift index fa398ad026..f8147ae423 100644 --- a/dependency-manager-tests/carthage/CTProject/ViewController.swift +++ b/dependency-manager-tests/carthage/CTProject/ViewController.swift @@ -6,6 +6,7 @@ import UIKit import Datadog +import DatadogObjc internal class ViewController: UIViewController { private var logger: Logger! // swiftlint:disable:this implicitly_unwrapped_optional diff --git a/dependency-manager-tests/carthage/Makefile b/dependency-manager-tests/carthage/Makefile index d139fa1d61..b07afa3f15 100644 --- a/dependency-manager-tests/carthage/Makefile +++ b/dependency-manager-tests/carthage/Makefile @@ -4,19 +4,14 @@ else GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD) endif -PWD := $(shell pwd) -# TODO: RUMM-760 Remove this workaround once Carthage fixes their Xcode 12 issue -# https://github.com/Carthage/Carthage/issues/3019 -export XCODE_XCCONFIG_FILE := $(PWD)/tmp.xcconfig - test: @echo "⚙️ Configuring CTProject with remote branch: '${GIT_BRANCH}'..." @sed "s|REMOTE_GIT_BRANCH|${GIT_BRANCH}|g" Cartfile.src > Cartfile @rm -rf Carthage/ @echo "🧪 Run 'carthage update'" - @carthage update --platform iOS - @echo "🧪 Check if expected frameworks exist in $(PWD)/Carthage/Build/iOS" - @[ -e "Carthage/Build/iOS/Datadog.framework" ] && echo "Datadog.framework - OK" || { echo "Datadog.framework - missing"; false; } - @[ -e "Carthage/Build/iOS/DatadogObjc.framework" ] && echo "DatadogObjc.framework - OK" || { echo "DatadogObjc.framework - missing"; false; } - @[ -e "Carthage/Build/iOS/Kronos.framework" ] && echo "Kronos.framework - OK" || { echo "Kronos.framework - missing"; false; } + @carthage update --platform iOS --use-xcframeworks + @echo "🧪 Check if expected frameworks exist in $(PWD)/Carthage/Build/" + @[ -e "Carthage/Build/Datadog.xcframework" ] && echo "Datadog.xcframework - OK" || { echo "Datadog.xcframework - missing"; false; } + @[ -e "Carthage/Build/DatadogObjc.xcframework" ] && echo "DatadogObjc.xcframework - OK" || { echo "DatadogObjc.xcframework - missing"; false; } + @[ -e "Carthage/Build/Kronos.xcframework" ] && echo "Kronos.xcframework - OK" || { echo "Kronos.xcframework - missing"; false; } @echo "🧪 SUCCEEDED" diff --git a/dependency-manager-tests/carthage/tmp.xcconfig b/dependency-manager-tests/carthage/tmp.xcconfig deleted file mode 100644 index 9ba51b828d..0000000000 --- a/dependency-manager-tests/carthage/tmp.xcconfig +++ /dev/null @@ -1,4 +0,0 @@ -// TODO: RUMM-760 Remove this workaround once Carthage fixes their Xcode 12 issue -// https://github.com/Carthage/Carthage/issues/3019 -EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64=arm64 arm64e armv7 armv7s armv6 armv8 -EXCLUDED_ARCHS=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)) diff --git a/tools/license/check-license.sh b/tools/license/check-license.sh index d1619213f2..70064535fb 100755 --- a/tools/license/check-license.sh +++ b/tools/license/check-license.sh @@ -16,7 +16,7 @@ function files { -not -path "*Pods*" \ -not -path "*Carthage/Build/*" \ -not -path "*Carthage/Checkouts/*" \ - -not -path "./tools/generate-models/rum-events-format/*" \ + -not -path "./tools/rum-models-generator/rum-events-format/*" \ -not -path "./instrumented-tests/DatadogSDKTesting.xcframework/*" \ -not -name "OTSpan.swift" \ -not -name "OTFormat.swift" \