From a1829708985e6058c292940adba1621a5cd159a6 Mon Sep 17 00:00:00 2001 From: Mert Buran Date: Thu, 11 Mar 2021 17:10:09 +0100 Subject: [PATCH 1/4] Merge pull request #439 from DataDog/buranmert/RUMM-1145-carthage-fix RUMM-1145 Carthage XCFrameworks support --- Datadog/Datadog.xcodeproj/project.pbxproj | 46 ++++++------ Makefile | 7 +- .../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, 68 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 eb0dea79ef..047074e7ec 100644 --- a/Datadog/Datadog.xcodeproj/project.pbxproj +++ b/Datadog/Datadog.xcodeproj/project.pbxproj @@ -182,9 +182,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 */; }; @@ -376,6 +373,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 */; }; @@ -442,9 +442,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; @@ -634,7 +634,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 = ""; }; @@ -825,6 +824,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 = ""; }; @@ -871,7 +871,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 615697E3256CFB4700C6AADA /* Kronos.framework in Frameworks */, + 9E0542D725F8EBE3007A3D0B /* Kronos.xcframework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -897,7 +897,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 61569795256CF6D400C6AADA /* Kronos.framework in Frameworks */, + 9E0542CB25F8EBBE007A3D0B /* Kronos.xcframework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1369,7 +1369,7 @@ 61133C6F2423993200786299 /* Frameworks */ = { isa = PBXGroup; children = ( - 61569794256CF6D400C6AADA /* Kronos.framework */, + 9E0542CA25F8EBBE007A3D0B /* Kronos.xcframework */, ); name = Frameworks; sourceTree = ""; @@ -3368,7 +3368,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"; @@ -3398,7 +3398,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"; @@ -3473,6 +3473,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 = ( @@ -3498,6 +3502,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 = ( @@ -3521,10 +3529,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)", @@ -3547,10 +3551,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)", @@ -3571,10 +3571,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)", @@ -3774,7 +3770,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"; @@ -3802,6 +3798,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..867849c626 100644 --- a/Makefile +++ b/Makefile @@ -22,10 +22,12 @@ export DD_SDK_TESTING_XCCONFIG_CI dependencies: @echo "⚙️ Installing dependencies..." - @carthage bootstrap --platform iOS + # NOTE: RUMM-1145 Bitrise Stacks don't have carthage v0.37 + # despite https://github.com/bitrise-io/bitrise.io/blob/master/system_reports/osx-xcode-12.4.x.log + @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 +35,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" \ From 7befb4df433045c6e984779e84018b7efa7cd824 Mon Sep 17 00:00:00 2001 From: Mert Buran Date: Thu, 11 Mar 2021 17:57:26 +0100 Subject: [PATCH 2/4] Bumped version to 1.5.1 --- DatadogSDK.podspec | 2 +- DatadogSDKObjc.podspec | 4 ++-- Sources/Datadog/Versioning.swift | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DatadogSDK.podspec b/DatadogSDK.podspec index 27c95b3e29..85525f3b0a 100644 --- a/DatadogSDK.podspec +++ b/DatadogSDK.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "DatadogSDK" s.module_name = "Datadog" - s.version = "1.5.0" + s.version = "1.5.1" s.summary = "Official Datadog Swift SDK for iOS." s.homepage = "https://www.datadoghq.com" diff --git a/DatadogSDKObjc.podspec b/DatadogSDKObjc.podspec index 9def4ccc66..d57e79bfc0 100644 --- a/DatadogSDKObjc.podspec +++ b/DatadogSDKObjc.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "DatadogSDKObjc" s.module_name = "DatadogObjc" - s.version = "1.5.0" + s.version = "1.5.1" s.summary = "Official Datadog Objective-C SDK for iOS." s.homepage = "https://www.datadoghq.com" @@ -20,5 +20,5 @@ Pod::Spec.new do |s| s.source = { :git => 'https://github.com/DataDog/dd-sdk-ios.git', :tag => s.version.to_s } s.source_files = "Sources/DatadogObjc/**/*.swift" - s.dependency 'DatadogSDK', '1.5.0' + s.dependency 'DatadogSDK', '1.5.1' end diff --git a/Sources/Datadog/Versioning.swift b/Sources/Datadog/Versioning.swift index fb7ab77c6c..4116501608 100644 --- a/Sources/Datadog/Versioning.swift +++ b/Sources/Datadog/Versioning.swift @@ -1,3 +1,3 @@ // GENERATED FILE: Do not edit directly -internal let sdkVersion = "1.5.0" +internal let sdkVersion = "1.5.1" From 89b6da108e39cd65edeb085d7d223ffe2b5529c4 Mon Sep 17 00:00:00 2001 From: Mert Buran Date: Thu, 11 Mar 2021 18:35:51 +0100 Subject: [PATCH 3/4] CHANGELOG updated --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1411f8c35..25ecbbc87b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 1.5.1 / 03-11-2021 + +### Changes + +* [BUGFIX] Carthage XCFrameworks support. See [#439][] + # 1.5.0 / 03-04-2021 ### Changes @@ -151,6 +157,7 @@ [#370]: https://github.com/DataDog/dd-sdk-ios/issues/370 [#381]: https://github.com/DataDog/dd-sdk-ios/issues/381 [#390]: https://github.com/DataDog/dd-sdk-ios/issues/390 +[#439]: https://github.com/DataDog/dd-sdk-ios/pull/439 [@00FA9A]: https://github.com/00FA9A [@Britton-Earnin]: https://github.com/Britton-Earnin [@Hengyu]: https://github.com/Hengyu From 75c66ac3f026ca6a980c4be1062c887efeaa6e9e Mon Sep 17 00:00:00 2001 From: Mert Buran Date: Thu, 11 Mar 2021 20:03:01 +0100 Subject: [PATCH 4/4] DatadogSDKAlamofireExtension.podspec updated --- DatadogSDKAlamofireExtension.podspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DatadogSDKAlamofireExtension.podspec b/DatadogSDKAlamofireExtension.podspec index cc9661cebe..161784ebb3 100644 --- a/DatadogSDKAlamofireExtension.podspec +++ b/DatadogSDKAlamofireExtension.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "DatadogSDKAlamofireExtension" s.module_name = "DatadogAlamofireExtension" - s.version = "1.0.0" + s.version = "1.5.1" s.summary = "An Official Extensions of Datadog Swift SDK for Alamofire." s.homepage = "https://www.datadoghq.com" @@ -18,9 +18,9 @@ Pod::Spec.new do |s| s.ios.deployment_target = '11.0' # :tag must follow DatadogSDK version below - s.source = { :git => "https://github.com/DataDog/dd-sdk-ios.git", :tag => '1.5.0' } + s.source = { :git => "https://github.com/DataDog/dd-sdk-ios.git", :tag => s.version.to_s } s.source_files = ["Sources/DatadogExtensions/Alamofire/**/*.swift"] - s.dependency 'DatadogSDK', '~> 1.5.0' + s.dependency 'DatadogSDK', s.version.to_s s.dependency 'Alamofire', '~> 5.0' end