From 90184c0988c2cac93cd51e7865a474270c708520 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Thu, 8 Feb 2024 15:00:00 +0100 Subject: [PATCH 01/62] Update project.pbxproj --- Sentry.xcodeproj/project.pbxproj | 354 +------------------------------ 1 file changed, 10 insertions(+), 344 deletions(-) diff --git a/Sentry.xcodeproj/project.pbxproj b/Sentry.xcodeproj/project.pbxproj index 4fa5d95953f..69254898bb3 100644 --- a/Sentry.xcodeproj/project.pbxproj +++ b/Sentry.xcodeproj/project.pbxproj @@ -541,7 +541,6 @@ 7BD86ECD264A78A6005439DB /* SentryAppStartTrackerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BD86ECC264A78A6005439DB /* SentryAppStartTrackerTests.swift */; }; 7BD86ECF264A7C77005439DB /* SentryAppStartMeasurement.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BD86ECE264A7C77005439DB /* SentryAppStartMeasurement.h */; settings = {ATTRIBUTES = (Private, ); }; }; 7BD86ED1264A7CF6005439DB /* SentryAppStartMeasurement.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BD86ED0264A7CF6005439DB /* SentryAppStartMeasurement.m */; }; - 7BD9509F2924E3E1009EA8EB /* SentryMXManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BD9509E2924E3E1009EA8EB /* SentryMXManager.swift */; }; 7BDB03B7251364F800BAE198 /* SentryDispatchQueueWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BDB03B6251364F800BAE198 /* SentryDispatchQueueWrapper.h */; }; 7BDB03BB2513652900BAE198 /* SentryDispatchQueueWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BDB03BA2513652900BAE198 /* SentryDispatchQueueWrapper.m */; }; 7BDDE3CC2966BD4700EB9177 /* SentryMXManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BDDE3CB2966BD4700EB9177 /* SentryMXManagerTests.swift */; }; @@ -571,7 +570,6 @@ 7BF536D124BDF3E7004FA6A2 /* SentryEnvelopeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BF536D024BDF3E7004FA6A2 /* SentryEnvelopeTests.swift */; }; 7BF536D424BEF255004FA6A2 /* SentryAssertions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BF536D324BEF255004FA6A2 /* SentryAssertions.swift */; }; 7BF6505F292B77EC00BBA5A8 /* SentryMetricKitIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BF6505E292B77EC00BBA5A8 /* SentryMetricKitIntegrationTests.swift */; }; - 7BF65062292B8F1C00BBA5A8 /* SentryMXCallStackTree.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BF65061292B8F1C00BBA5A8 /* SentryMXCallStackTree.swift */; }; 7BF65064292B905A00BBA5A8 /* SentryMXCallStackTreeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BF65063292B905A00BBA5A8 /* SentryMXCallStackTreeTests.swift */; }; 7BF69E072987D1FE002EBCA4 /* SentryCrashDoctorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BF69E062987D1FE002EBCA4 /* SentryCrashDoctorTests.swift */; }; 7BF9EF722722A84800B5BBEF /* SentryClassRegistrator.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BF9EF712722A84800B5BBEF /* SentryClassRegistrator.h */; }; @@ -663,7 +661,6 @@ 84AF45A629A7FFA500FBB177 /* SentryProfiledTracerConcurrency.h in Headers */ = {isa = PBXBuildFile; fileRef = 84AF45A429A7FFA500FBB177 /* SentryProfiledTracerConcurrency.h */; }; 84AF45A729A7FFA500FBB177 /* SentryProfiledTracerConcurrency.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84AF45A529A7FFA500FBB177 /* SentryProfiledTracerConcurrency.mm */; }; 84B7FA3529B285FC00AD93B1 /* Sentry.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63AA759B1EB8AEF500D153DE /* Sentry.framework */; }; - 84B7FA3629B285FF00AD93B1 /* SentryPrivate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D81A3488291D0AC0005A27A9 /* SentryPrivate.framework */; }; 84B7FA3C29B2876F00AD93B1 /* TestConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BAF3DD6243DD4A1008A5414 /* TestConstants.swift */; }; 84B7FA3D29B2879C00AD93B1 /* libSentryTestUtils.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8431F00A29B284F200D8DC56 /* libSentryTestUtils.a */; }; 84B7FA3E29B28ADD00AD93B1 /* TestClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B944FAF2469B46000A10721 /* TestClient.swift */; }; @@ -746,6 +743,11 @@ D808FB88281AB33C009A2A33 /* SentryUIEventTrackerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D808FB86281AB31D009A2A33 /* SentryUIEventTrackerTests.swift */; }; D808FB8B281BCE96009A2A33 /* TestSentrySwizzleWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = D808FB89281BCE46009A2A33 /* TestSentrySwizzleWrapper.swift */; }; D808FB92281BF6EC009A2A33 /* SentryUIEventTrackingIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D808FB90281BF6E9009A2A33 /* SentryUIEventTrackingIntegrationTests.swift */; }; + D80CD8D02B75143F002F710B /* UrlSanitized.swift in Sources */ = {isa = PBXBuildFile; fileRef = D856272B2A374A8600FB8062 /* UrlSanitized.swift */; }; + D80CD8D12B751442002F710B /* HTTPHeaderSanitizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8292D7A2A38AF04009872F7 /* HTTPHeaderSanitizer.swift */; }; + D80CD8D22B751447002F710B /* SentryMXManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BD9509E2924E3E1009EA8EB /* SentryMXManager.swift */; }; + D80CD8D32B751447002F710B /* SentryMXCallStackTree.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BF65061292B8F1C00BBA5A8 /* SentryMXCallStackTree.swift */; }; + D80CD8D42B75144B002F710B /* SwiftDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = D800942628F82F3A005D3943 /* SwiftDescriptor.swift */; }; D8137D54272B53070082656C /* TestSentrySpan.m in Sources */ = {isa = PBXBuildFile; fileRef = D8137D53272B53070082656C /* TestSentrySpan.m */; }; D8199DBE29376EDE0074249E /* SentryInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = D8199DB829376ECC0074249E /* SentryInternal.h */; }; D8199DBF29376EE20074249E /* SentryInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = D8199DB929376ECC0074249E /* SentryInternal.m */; }; @@ -753,10 +755,7 @@ D8199DC129376EEC0074249E /* SentryTracedView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8199DB629376ECC0074249E /* SentryTracedView.swift */; }; D8199DC229376FC10074249E /* Sentry.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63AA759B1EB8AEF500D153DE /* Sentry.framework */; }; D81A346C291AECC7005A27A9 /* PrivateSentrySDKOnly.h in Headers */ = {isa = PBXBuildFile; fileRef = D81A346B291AECC7005A27A9 /* PrivateSentrySDKOnly.h */; settings = {ATTRIBUTES = (Private, ); }; }; - D81A3491291D0AC8005A27A9 /* SwiftDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = D800942628F82F3A005D3943 /* SwiftDescriptor.swift */; }; - D81A3492291D0AD5005A27A9 /* SentryPrivate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D81A3488291D0AC0005A27A9 /* SentryPrivate.framework */; }; D81FDF12280EA1060045E0E4 /* SentryScreenShotTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D81FDF10280EA0080045E0E4 /* SentryScreenShotTests.swift */; }; - D8292D7B2A38AF04009872F7 /* HTTPHeaderSanitizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8292D7A2A38AF04009872F7 /* HTTPHeaderSanitizer.swift */; }; D8292D7D2A39A027009872F7 /* UrlSanitizedTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8292D7C2A39A027009872F7 /* UrlSanitizedTests.swift */; }; D8370B6A273DF1E900F66E2D /* SentryNSURLSessionTaskSearch.m in Sources */ = {isa = PBXBuildFile; fileRef = D8370B68273DF1E900F66E2D /* SentryNSURLSessionTaskSearch.m */; }; D8370B6C273DF20F00F66E2D /* SentryNSURLSessionTaskSearch.h in Headers */ = {isa = PBXBuildFile; fileRef = D8370B6B273DF20F00F66E2D /* SentryNSURLSessionTaskSearch.h */; }; @@ -773,7 +772,6 @@ D855AD62286ED6A4002573E1 /* SentryCrashTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D855AD61286ED6A4002573E1 /* SentryCrashTests.m */; }; D855B3E827D652AF00BCED76 /* SentryCoreDataTrackingIntegrationTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D855B3E727D652AF00BCED76 /* SentryCoreDataTrackingIntegrationTest.swift */; }; D855B3EA27D652C700BCED76 /* TestCoreDataStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = D855B3E927D652C700BCED76 /* TestCoreDataStack.swift */; }; - D856272D2A3763B600FB8062 /* UrlSanitized.swift in Sources */ = {isa = PBXBuildFile; fileRef = D856272B2A374A8600FB8062 /* UrlSanitized.swift */; }; D85790292976A69F00C6AC1F /* TestDebugImageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = D85790282976A69F00C6AC1F /* TestDebugImageProvider.swift */; }; D85852B627ECEEDA00C6D8AE /* SentryScreenshot.m in Sources */ = {isa = PBXBuildFile; fileRef = D85852B427ECEEDA00C6D8AE /* SentryScreenshot.m */; }; D85852BA27EDDC5900C6D8AE /* SentryUIApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = D85852B827EDDC5900C6D8AE /* SentryUIApplication.m */; }; @@ -803,7 +801,6 @@ D88817DD26D72BA500BF2251 /* SentryTraceStateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D88817DB26D72B7B00BF2251 /* SentryTraceStateTests.swift */; }; D8918B222849FA6D00701F9A /* SentrySDKIntegrationTestsBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8918B212849FA6D00701F9A /* SentrySDKIntegrationTestsBase.swift */; }; D8AB40DB2806EC1900E5E9F7 /* SentryScreenshotIntegration.h in Headers */ = {isa = PBXBuildFile; fileRef = D8AB40DA2806EC1900E5E9F7 /* SentryScreenshotIntegration.h */; }; - D8ABB0BC29264275005D1E24 /* Sentry.swift in Sources */ = {isa = PBXBuildFile; fileRef = D81A349B291D0C0B005A27A9 /* Sentry.swift */; }; D8ACE3C72762187200F5A213 /* SentryNSDataSwizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = D8ACE3C42762187200F5A213 /* SentryNSDataSwizzling.m */; }; D8ACE3C82762187200F5A213 /* SentryNSDataTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = D8ACE3C52762187200F5A213 /* SentryNSDataTracker.m */; }; D8ACE3C92762187200F5A213 /* SentryFileIOTrackingIntegration.m in Sources */ = {isa = PBXBuildFile; fileRef = D8ACE3C62762187200F5A213 /* SentryFileIOTrackingIntegration.m */; }; @@ -846,13 +843,6 @@ remoteGlobalIDString = 63AA759A1EB8AEF500D153DE; remoteInfo = "Sentry-iOS"; }; - 8431EED129B27B1100D8DC56 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6327C5CA1EB8A783004E799B /* Project object */; - proxyType = 1; - remoteGlobalIDString = D81A3487291D0AC0005A27A9; - remoteInfo = SentryPrivate; - }; 8431EED329B27B1100D8DC56 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 6327C5CA1EB8A783004E799B /* Project object */; @@ -867,20 +857,6 @@ remoteGlobalIDString = 63AA759A1EB8AEF500D153DE; remoteInfo = Sentry; }; - 84B7FA3929B2860700AD93B1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6327C5CA1EB8A783004E799B /* Project object */; - proxyType = 1; - remoteGlobalIDString = D81A3487291D0AC0005A27A9; - remoteInfo = SentryPrivate; - }; - D80C4A4E291E5068000A472C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6327C5CA1EB8A783004E799B /* Project object */; - proxyType = 1; - remoteGlobalIDString = D81A3487291D0AC0005A27A9; - remoteInfo = SentryPrivate; - }; D8199DC429376FC10074249E /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 6327C5CA1EB8A783004E799B /* Project object */; @@ -888,13 +864,6 @@ remoteGlobalIDString = 63AA759A1EB8AEF500D153DE; remoteInfo = Sentry; }; - D81A3494291D0AD5005A27A9 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6327C5CA1EB8A783004E799B /* Project object */; - proxyType = 1; - remoteGlobalIDString = D81A3487291D0AC0005A27A9; - remoteInfo = SentryPrivate; - }; D84DAD5B2B1742C1003CF120 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 6327C5CA1EB8A783004E799B /* Project object */; @@ -1739,7 +1708,6 @@ D8199DCF29376FF40074249E /* SentrySwiftUI.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = SentrySwiftUI.xcconfig; sourceTree = ""; }; D8199DD029377C130074249E /* SentrySwiftUI.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; path = SentrySwiftUI.podspec; sourceTree = ""; }; D81A346B291AECC7005A27A9 /* PrivateSentrySDKOnly.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PrivateSentrySDKOnly.h; path = include/HybridPublic/PrivateSentrySDKOnly.h; sourceTree = ""; }; - D81A3488291D0AC0005A27A9 /* SentryPrivate.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SentryPrivate.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D81A349B291D0C0B005A27A9 /* Sentry.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Sentry.swift; sourceTree = ""; }; D81A349F291D5568005A27A9 /* SentryPrivate.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; path = SentryPrivate.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; D81A34A0291D5715005A27A9 /* SentryPrivate.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = SentryPrivate.xcconfig; sourceTree = ""; }; @@ -1839,7 +1807,6 @@ 84F994E82A6894BD00EC0190 /* SystemConfiguration.framework in Frameworks */, 84F994E62A6894B500EC0190 /* CoreData.framework in Frameworks */, 63AF656C1ED87B8C00EBCFF7 /* libz.tbd in Frameworks */, - D81A3492291D0AD5005A27A9 /* SentryPrivate.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1867,7 +1834,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 84B7FA3629B285FF00AD93B1 /* SentryPrivate.framework in Frameworks */, 84B7FA3529B285FC00AD93B1 /* Sentry.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1880,13 +1846,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - D81A3485291D0AC0005A27A9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; D84DAD4A2B17428D003CF120 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -2108,7 +2067,6 @@ children = ( 63AA759B1EB8AEF500D153DE /* Sentry.framework */, 63AA76651EB8CB2F00D153DE /* SentryTests.xctest */, - D81A3488291D0AC0005A27A9 /* SentryPrivate.framework */, D8199DAA29376E9B0074249E /* SentrySwiftUI.framework */, 8431EFD929B27B1100D8DC56 /* SentryProfilerTests.xctest */, 8431F00A29B284F200D8DC56 /* libSentryTestUtils.a */, @@ -3830,13 +3788,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - D81A3483291D0AC0005A27A9 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; D84DAD482B17428D003CF120 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -3860,7 +3811,6 @@ buildRules = ( ); dependencies = ( - D81A3495291D0AD5005A27A9 /* PBXTargetDependency */, ); name = Sentry; productName = "Sentry-iOS"; @@ -3879,7 +3829,6 @@ buildRules = ( ); dependencies = ( - D80C4A4F291E5068000A472C /* PBXTargetDependency */, 63AA766C1EB8CB2F00D153DE /* PBXTargetDependency */, D84DAD5C2B1742C1003CF120 /* PBXTargetDependency */, ); @@ -3902,7 +3851,6 @@ buildRules = ( ); dependencies = ( - 8431EED029B27B1100D8DC56 /* PBXTargetDependency */, 8431EED229B27B1100D8DC56 /* PBXTargetDependency */, ); name = SentryProfilerTests; @@ -3921,7 +3869,6 @@ buildRules = ( ); dependencies = ( - 84B7FA3A29B2860700AD93B1 /* PBXTargetDependency */, 84B7FA3829B2860500AD93B1 /* PBXTargetDependency */, ); name = SentryTestUtils; @@ -3948,24 +3895,6 @@ productReference = D8199DAA29376E9B0074249E /* SentrySwiftUI.framework */; productType = "com.apple.product-type.framework"; }; - D81A3487291D0AC0005A27A9 /* SentryPrivate */ = { - isa = PBXNativeTarget; - buildConfigurationList = D81A348C291D0AC0005A27A9 /* Build configuration list for PBXNativeTarget "SentryPrivate" */; - buildPhases = ( - D81A3483291D0AC0005A27A9 /* Headers */, - D81A3484291D0AC0005A27A9 /* Sources */, - D81A3485291D0AC0005A27A9 /* Frameworks */, - D81A3486291D0AC0005A27A9 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SentryPrivate; - productName = SentryPrivate; - productReference = D81A3488291D0AC0005A27A9 /* SentryPrivate.framework */; - productType = "com.apple.product-type.framework"; - }; D84DAD4C2B17428D003CF120 /* SentryTestUtilsDynamic */ = { isa = PBXNativeTarget; buildConfigurationList = D84DAD512B17428D003CF120 /* Build configuration list for PBXNativeTarget "SentryTestUtilsDynamic" */; @@ -4017,10 +3946,6 @@ DevelopmentTeam = 97JCY7859U; ProvisioningStyle = Automatic; }; - D81A3487291D0AC0005A27A9 = { - CreatedOnToolsVersion = 14.1; - ProvisioningStyle = Manual; - }; D84DAD4C2B17428D003CF120 = { CreatedOnToolsVersion = 15.0.1; }; @@ -4044,7 +3969,6 @@ targets = ( 63AA759A1EB8AEF500D153DE /* Sentry */, 63AA76641EB8CB2F00D153DE /* SentryTests */, - D81A3487291D0AC0005A27A9 /* SentryPrivate */, D8199DA929376E9B0074249E /* SentrySwiftUI */, 8431EECF29B27B1100D8DC56 /* SentryProfilerTests */, 8431F00929B284F200D8DC56 /* SentryTestUtils */, @@ -4085,13 +4009,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - D81A3486291D0AC0005A27A9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; D84DAD4B2B17428D003CF120 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -4158,6 +4075,7 @@ 15360CD62432832400112302 /* SentryAutoSessionTrackingIntegration.m in Sources */, 7B63459F280EBA7200CFA05A /* SentryUIEventTracker.m in Sources */, 7BF9EF782722B35D00B5BBEF /* SentrySubClassFinder.m in Sources */, + D80CD8D32B751447002F710B /* SentryMXCallStackTree.swift in Sources */, 7BCFA71627D0BB50008C662C /* SentryANRTracker.m in Sources */, 63EED6C02237923600E02400 /* SentryOptions.m in Sources */, D8CB741B2947286500A5F964 /* SentryEnvelopeItemHeader.m in Sources */, @@ -4185,6 +4103,7 @@ 630435FF1EBCA9D900C4D3FA /* SentryNSURLRequest.m in Sources */, 7B5CAF7727F5A68C00ED0DB6 /* SentryNSURLRequestBuilder.m in Sources */, 639FCFA11EBC804600778193 /* SentryException.m in Sources */, + D80CD8D42B75144B002F710B /* SwiftDescriptor.swift in Sources */, 33042A0D29DAF79A00C60085 /* SentryExtraContextProvider.m in Sources */, 7BA61CAD247BAA0B00C130A8 /* SentryDebugImageProvider.m in Sources */, 63FE70E720DA4C1000CDBAE8 /* SentryCrashMonitor.c in Sources */, @@ -4224,6 +4143,7 @@ 63FE715F20DA4C1100CDBAE8 /* SentryCrashID.c in Sources */, 7DB3A687238EA75E00A2D442 /* SentryHttpTransport.m in Sources */, 63FE70D520DA4C1000CDBAE8 /* SentryCrashMonitor_NSException.m in Sources */, + D80CD8D12B751442002F710B /* HTTPHeaderSanitizer.swift in Sources */, 0AAE201E28ED9B9400D0CD80 /* SentryReachability.m in Sources */, 7B0A54282521C22C00A71716 /* SentryFrameRemover.m in Sources */, 7BC63F0A28081288009D9E37 /* SentrySwizzleWrapper.m in Sources */, @@ -4286,6 +4206,7 @@ 63FE713120DA4C1100CDBAE8 /* SentryCrashDynamicLinker.c in Sources */, 8E25C95325F836D000DC215B /* SentryRandom.m in Sources */, 7BC85231245812EC005A70F0 /* SentryFileContents.m in Sources */, + D80CD8D22B751447002F710B /* SentryMXManager.swift in Sources */, 03F84D3527DD4191008FE43F /* SentryThreadHandle.cpp in Sources */, 0A2D8DA9289BC905008720F6 /* SentryViewHierarchy.m in Sources */, 8EA1ED0B2668F8C400E62B98 /* SentryUIViewControllerSwizzling.m in Sources */, @@ -4309,6 +4230,7 @@ 8EAE9806261E87120073B6B3 /* SentryUIViewControllerPerformanceTracker.m in Sources */, D88817D826D7149100BF2251 /* SentryTraceContext.m in Sources */, 8EBF870926140D37001A6853 /* SentryPerformanceTracker.m in Sources */, + D80CD8D02B75143F002F710B /* UrlSanitized.swift in Sources */, D865893029D6ECA7000BE151 /* SentryCrashBinaryImageCache.c in Sources */, 7BC9A20428F4166D001E7C4C /* SentryMeasurementValue.m in Sources */, D859696B27BECD8F0036A46E /* SentryCoreDataTrackingIntegration.m in Sources */, @@ -4316,7 +4238,6 @@ 84281C432A578E5600EE88F2 /* SentryProfilerState.mm in Sources */, D859697327BECDD20036A46E /* SentryCoreDataSwizzling.m in Sources */, 639889BD1EDED18400EA7442 /* SentrySwizzle.m in Sources */, - D8ABB0BC29264275005D1E24 /* Sentry.swift in Sources */, 8453421228BE855D00C22EEC /* SentrySampleDecision.m in Sources */, 7B7D872E2486482600D2ECFF /* SentryStacktraceBuilder.m in Sources */, 861265FA2404EC1500C4AFDE /* NSArray+SentrySanitize.m in Sources */, @@ -4647,18 +4568,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - D81A3484291D0AC0005A27A9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D8292D7B2A38AF04009872F7 /* HTTPHeaderSanitizer.swift in Sources */, - 7BD9509F2924E3E1009EA8EB /* SentryMXManager.swift in Sources */, - D856272D2A3763B600FB8062 /* UrlSanitized.swift in Sources */, - 7BF65062292B8F1C00BBA5A8 /* SentryMXCallStackTree.swift in Sources */, - D81A3491291D0AC8005A27A9 /* SwiftDescriptor.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; D84DAD492B17428D003CF120 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -4675,11 +4584,6 @@ target = 63AA759A1EB8AEF500D153DE /* Sentry */; targetProxy = 63AA766B1EB8CB2F00D153DE /* PBXContainerItemProxy */; }; - 8431EED029B27B1100D8DC56 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = D81A3487291D0AC0005A27A9 /* SentryPrivate */; - targetProxy = 8431EED129B27B1100D8DC56 /* PBXContainerItemProxy */; - }; 8431EED229B27B1100D8DC56 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 63AA759A1EB8AEF500D153DE /* Sentry */; @@ -4690,26 +4594,11 @@ target = 63AA759A1EB8AEF500D153DE /* Sentry */; targetProxy = 84B7FA3729B2860500AD93B1 /* PBXContainerItemProxy */; }; - 84B7FA3A29B2860700AD93B1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = D81A3487291D0AC0005A27A9 /* SentryPrivate */; - targetProxy = 84B7FA3929B2860700AD93B1 /* PBXContainerItemProxy */; - }; - D80C4A4F291E5068000A472C /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = D81A3487291D0AC0005A27A9 /* SentryPrivate */; - targetProxy = D80C4A4E291E5068000A472C /* PBXContainerItemProxy */; - }; D8199DC529376FC10074249E /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 63AA759A1EB8AEF500D153DE /* Sentry */; targetProxy = D8199DC429376FC10074249E /* PBXContainerItemProxy */; }; - D81A3495291D0AD5005A27A9 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = D81A3487291D0AC0005A27A9 /* SentryPrivate */; - targetProxy = D81A3494291D0AD5005A27A9 /* PBXContainerItemProxy */; - }; D84DAD5C2B1742C1003CF120 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = D84DAD4C2B17428D003CF120 /* SentryTestUtilsDynamic */; @@ -5253,43 +5142,6 @@ }; name = Debug_without_UIKit; }; - 841C60C62A69DE6B00E1C00F /* Debug_without_UIKit */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D81A34A0291D5715005A27A9 /* SentryPrivate.xcconfig */; - buildSettings = { - ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_STYLE = Manual; - DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = ""; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_C_LANGUAGE_STANDARD = "compiler-default"; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryPrivate; - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug_without_UIKit; - }; 841C60C72A69DE6B00E1C00F /* Debug_without_UIKit */ = { isa = XCBuildConfiguration; baseConfigurationReference = D8199DCF29376FF40074249E /* SentrySwiftUI.xcconfig */; @@ -5767,40 +5619,6 @@ }; name = Release_without_UIKit; }; - 8483D06D2AC7627800143615 /* Release_without_UIKit */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D81A34A0291D5715005A27A9 /* SentryPrivate.xcconfig */; - buildSettings = { - ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_STYLE = Manual; - DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = ""; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_C_LANGUAGE_STANDARD = "compiler-default"; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryPrivate; - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - }; - name = Release_without_UIKit; - }; 8483D06E2AC7627800143615 /* Release_without_UIKit */ = { isa = XCBuildConfiguration; baseConfigurationReference = D8199DCF29376FF40074249E /* SentrySwiftUI.xcconfig */; @@ -6202,145 +6020,6 @@ }; name = Release; }; - D81A348D291D0AC0005A27A9 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D81A34A0291D5715005A27A9 /* SentryPrivate.xcconfig */; - buildSettings = { - ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_STYLE = Manual; - DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = ""; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_C_LANGUAGE_STANDARD = "compiler-default"; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryPrivate; - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - D81A348E291D0AC0005A27A9 /* Test */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D81A34A0291D5715005A27A9 /* SentryPrivate.xcconfig */; - buildSettings = { - ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_STYLE = Manual; - DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = ""; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_C_LANGUAGE_STANDARD = "compiler-default"; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryPrivate; - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - }; - name = Test; - }; - D81A348F291D0AC0005A27A9 /* TestCI */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D81A34A0291D5715005A27A9 /* SentryPrivate.xcconfig */; - buildSettings = { - ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_STYLE = Manual; - DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = ""; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_C_LANGUAGE_STANDARD = "compiler-default"; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryPrivate; - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - }; - name = TestCI; - }; - D81A3490291D0AC0005A27A9 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D81A34A0291D5715005A27A9 /* SentryPrivate.xcconfig */; - buildSettings = { - ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_STYLE = Manual; - DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = ""; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_C_LANGUAGE_STANDARD = "compiler-default"; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 Sentry. All rights reserved."; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentryPrivate; - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; D84DAD522B17428D003CF120 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -6752,19 +6431,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - D81A348C291D0AC0005A27A9 /* Build configuration list for PBXNativeTarget "SentryPrivate" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D81A348D291D0AC0005A27A9 /* Debug */, - 841C60C62A69DE6B00E1C00F /* Debug_without_UIKit */, - D81A348E291D0AC0005A27A9 /* Test */, - D81A348F291D0AC0005A27A9 /* TestCI */, - D81A3490291D0AC0005A27A9 /* Release */, - 8483D06D2AC7627800143615 /* Release_without_UIKit */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; D84DAD512B17428D003CF120 /* Build configuration list for PBXNativeTarget "SentryTestUtilsDynamic" */ = { isa = XCConfigurationList; buildConfigurations = ( From 64510cdd7bf51a09d0009cd2196bc30f0d66220d Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Thu, 8 Feb 2024 15:15:53 +0100 Subject: [PATCH 02/62] Fix header --- CHANGELOG.md | 1 + Sources/Sentry/SentryCoreDataTracker.m | 2 +- Sources/Sentry/SentryNetworkTracker.m | 2 +- Sources/Sentry/SentryTracer.m | 2 +- Sources/Sentry/SentryUIApplication.m | 2 +- Sources/Sentry/SentryViewHierarchy.m | 3 +-- Sources/Sentry/include/SentrySwift.h | 4 ++++ 7 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79e164c9634..ee1f66ff0ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Improvements - Cache installationID async to avoid file IO on the main thread when starting the SDK (#3601) +- Remove SentryPrivate from Carthage and self build (#3623) ### Fixes diff --git a/Sources/Sentry/SentryCoreDataTracker.m b/Sources/Sentry/SentryCoreDataTracker.m index 99039d9f66e..69a0ebbdc05 100644 --- a/Sources/Sentry/SentryCoreDataTracker.m +++ b/Sources/Sentry/SentryCoreDataTracker.m @@ -9,7 +9,7 @@ #import "SentrySDK+Private.h" #import "SentryScope+Private.h" #import "SentrySpanProtocol.h" -@import SentryPrivate; +#import "SentrySwift.h" #import "SentrySpan.h" #import "SentryStacktrace.h" #import "SentryThreadInspector.h" diff --git a/Sources/Sentry/SentryNetworkTracker.m b/Sources/Sentry/SentryNetworkTracker.m index a33691d364d..39567bebfdb 100644 --- a/Sources/Sentry/SentryNetworkTracker.m +++ b/Sources/Sentry/SentryNetworkTracker.m @@ -25,7 +25,7 @@ #import "SentryTracer.h" #import "SentryUser.h" #import -@import SentryPrivate; +#import "SentrySwift.h" /** * WARNING: We had issues in the past with this code on older iOS versions. We don't run unit tests diff --git a/Sources/Sentry/SentryTracer.m b/Sources/Sentry/SentryTracer.m index 06294436ee0..854ac42c19c 100644 --- a/Sources/Sentry/SentryTracer.m +++ b/Sources/Sentry/SentryTracer.m @@ -28,7 +28,7 @@ #import #import #import -@import SentryPrivate; +#import "SentrySwift.h" #if SENTRY_TARGET_PROFILING_SUPPORTED # import "SentryProfiledTracerConcurrency.h" diff --git a/Sources/Sentry/SentryUIApplication.m b/Sources/Sentry/SentryUIApplication.m index 7c330efc23d..1bb96470473 100644 --- a/Sources/Sentry/SentryUIApplication.m +++ b/Sources/Sentry/SentryUIApplication.m @@ -1,7 +1,7 @@ #import "SentryUIApplication.h" #import "SentryDependencyContainer.h" #import "SentryDispatchQueueWrapper.h" -@import SentryPrivate; +#import "SentrySwift.h" #import "SentryNSNotificationCenterWrapper.h" #if SENTRY_HAS_UIKIT diff --git a/Sources/Sentry/SentryViewHierarchy.m b/Sources/Sentry/SentryViewHierarchy.m index 6e8a15f8077..3e15a0bae1c 100644 --- a/Sources/Sentry/SentryViewHierarchy.m +++ b/Sources/Sentry/SentryViewHierarchy.m @@ -9,8 +9,7 @@ # import "SentryLog.h" # import "SentryUIApplication.h" # import - -@import SentryPrivate; +# import "SentrySwift.h" static int writeJSONDataToFile(const char *const data, const int length, void *const userData) diff --git a/Sources/Sentry/include/SentrySwift.h b/Sources/Sentry/include/SentrySwift.h index 7be28faad74..ed6a8bccc5f 100644 --- a/Sources/Sentry/include/SentrySwift.h +++ b/Sources/Sentry/include/SentrySwift.h @@ -1,6 +1,10 @@ #ifndef SentrySwift_h #define SentrySwift_h +#if __has_include("Sentry/Sentry-Swift.h") +#import "Sentry/Sentry-Swift.h" +#else @import SentryPrivate; +#endif #endif From d2cf616a4d9902670b790b2f8bdec81dfd99bc3c Mon Sep 17 00:00:00 2001 From: Sentry Github Bot Date: Thu, 8 Feb 2024 14:17:36 +0000 Subject: [PATCH 03/62] Format code --- Sources/Sentry/SentryCoreDataTracker.m | 4 ++-- Sources/Sentry/SentryNetworkTracker.m | 2 +- Sources/Sentry/SentryTracer.m | 2 +- Sources/Sentry/SentryUIApplication.m | 2 +- Sources/Sentry/SentryViewHierarchy.m | 2 +- Sources/Sentry/include/SentrySwift.h | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Sources/Sentry/SentryCoreDataTracker.m b/Sources/Sentry/SentryCoreDataTracker.m index 69a0ebbdc05..703ed436e26 100644 --- a/Sources/Sentry/SentryCoreDataTracker.m +++ b/Sources/Sentry/SentryCoreDataTracker.m @@ -8,10 +8,10 @@ #import "SentryPredicateDescriptor.h" #import "SentrySDK+Private.h" #import "SentryScope+Private.h" -#import "SentrySpanProtocol.h" -#import "SentrySwift.h" #import "SentrySpan.h" +#import "SentrySpanProtocol.h" #import "SentryStacktrace.h" +#import "SentrySwift.h" #import "SentryThreadInspector.h" #import "SentryTraceOrigins.h" diff --git a/Sources/Sentry/SentryNetworkTracker.m b/Sources/Sentry/SentryNetworkTracker.m index 39567bebfdb..0c982433f91 100644 --- a/Sources/Sentry/SentryNetworkTracker.m +++ b/Sources/Sentry/SentryNetworkTracker.m @@ -17,6 +17,7 @@ #import "SentryScope+Private.h" #import "SentrySerialization.h" #import "SentryStacktrace.h" +#import "SentrySwift.h" #import "SentryThread.h" #import "SentryThreadInspector.h" #import "SentryTraceContext.h" @@ -25,7 +26,6 @@ #import "SentryTracer.h" #import "SentryUser.h" #import -#import "SentrySwift.h" /** * WARNING: We had issues in the past with this code on older iOS versions. We don't run unit tests diff --git a/Sources/Sentry/SentryTracer.m b/Sources/Sentry/SentryTracer.m index 854ac42c19c..1b1fec23cb4 100644 --- a/Sources/Sentry/SentryTracer.m +++ b/Sources/Sentry/SentryTracer.m @@ -16,6 +16,7 @@ #import "SentrySpanContext+Private.h" #import "SentrySpanContext.h" #import "SentrySpanId.h" +#import "SentrySwift.h" #import "SentryThreadWrapper.h" #import "SentryTime.h" #import "SentryTraceContext.h" @@ -28,7 +29,6 @@ #import #import #import -#import "SentrySwift.h" #if SENTRY_TARGET_PROFILING_SUPPORTED # import "SentryProfiledTracerConcurrency.h" diff --git a/Sources/Sentry/SentryUIApplication.m b/Sources/Sentry/SentryUIApplication.m index 1bb96470473..c9e68adb298 100644 --- a/Sources/Sentry/SentryUIApplication.m +++ b/Sources/Sentry/SentryUIApplication.m @@ -1,8 +1,8 @@ #import "SentryUIApplication.h" #import "SentryDependencyContainer.h" #import "SentryDispatchQueueWrapper.h" -#import "SentrySwift.h" #import "SentryNSNotificationCenterWrapper.h" +#import "SentrySwift.h" #if SENTRY_HAS_UIKIT diff --git a/Sources/Sentry/SentryViewHierarchy.m b/Sources/Sentry/SentryViewHierarchy.m index 3e15a0bae1c..b984140267a 100644 --- a/Sources/Sentry/SentryViewHierarchy.m +++ b/Sources/Sentry/SentryViewHierarchy.m @@ -7,9 +7,9 @@ # import "SentryDependencyContainer.h" # import "SentryDispatchQueueWrapper.h" # import "SentryLog.h" +# import "SentrySwift.h" # import "SentryUIApplication.h" # import -# import "SentrySwift.h" static int writeJSONDataToFile(const char *const data, const int length, void *const userData) diff --git a/Sources/Sentry/include/SentrySwift.h b/Sources/Sentry/include/SentrySwift.h index ed6a8bccc5f..4f08600514d 100644 --- a/Sources/Sentry/include/SentrySwift.h +++ b/Sources/Sentry/include/SentrySwift.h @@ -2,7 +2,7 @@ #define SentrySwift_h #if __has_include("Sentry/Sentry-Swift.h") -#import "Sentry/Sentry-Swift.h" +# import "Sentry/Sentry-Swift.h" #else @import SentryPrivate; #endif From e1662f7575a4f7b3ce3f284db97f8f9927c2dae5 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Thu, 8 Feb 2024 15:26:43 +0100 Subject: [PATCH 04/62] Update SentrySwift.h --- Sources/Sentry/include/SentrySwift.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/Sentry/include/SentrySwift.h b/Sources/Sentry/include/SentrySwift.h index 4f08600514d..68cf5785a4b 100644 --- a/Sources/Sentry/include/SentrySwift.h +++ b/Sources/Sentry/include/SentrySwift.h @@ -1,10 +1,10 @@ #ifndef SentrySwift_h #define SentrySwift_h -#if __has_include("Sentry/Sentry-Swift.h") -# import "Sentry/Sentry-Swift.h" -#else +#if SWIFT_PACKAGE || COCOAPODS @import SentryPrivate; +#else +#import "Sentry/Sentry-Swift.h" #endif #endif From 24afb925d1c91635cc6d8f96d4292e2922f0c856 Mon Sep 17 00:00:00 2001 From: Sentry Github Bot Date: Thu, 8 Feb 2024 14:27:50 +0000 Subject: [PATCH 05/62] Format code --- Sources/Sentry/include/SentrySwift.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Sentry/include/SentrySwift.h b/Sources/Sentry/include/SentrySwift.h index 68cf5785a4b..9641b394bce 100644 --- a/Sources/Sentry/include/SentrySwift.h +++ b/Sources/Sentry/include/SentrySwift.h @@ -4,7 +4,7 @@ #if SWIFT_PACKAGE || COCOAPODS @import SentryPrivate; #else -#import "Sentry/Sentry-Swift.h" +# import "Sentry/Sentry-Swift.h" #endif #endif From f5735effe636bed09fd17e059a7b8c2c37c5e076 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Thu, 8 Feb 2024 15:37:07 +0100 Subject: [PATCH 06/62] Fixing tests --- .../MetricKit/SentryMXCallStackTreeTests.swift | 1 - .../MetricKit/SentryMXManagerTests.swift | 16 ++++++++-------- .../SentryMetricKitIntegrationTests.swift | 1 - Tests/SentryTests/SentryTests-Bridging-Header.h | 2 +- Tests/SentryTests/UrlSanitizedTests.swift | 1 - 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Tests/SentryTests/Integrations/MetricKit/SentryMXCallStackTreeTests.swift b/Tests/SentryTests/Integrations/MetricKit/SentryMXCallStackTreeTests.swift index ef64c496804..8467fe9c36e 100644 --- a/Tests/SentryTests/Integrations/MetricKit/SentryMXCallStackTreeTests.swift +++ b/Tests/SentryTests/Integrations/MetricKit/SentryMXCallStackTreeTests.swift @@ -1,5 +1,4 @@ #if os(iOS) || os(macOS) -import SentryPrivate import XCTest /** diff --git a/Tests/SentryTests/Integrations/MetricKit/SentryMXManagerTests.swift b/Tests/SentryTests/Integrations/MetricKit/SentryMXManagerTests.swift index 1d27c3c42b5..1c53ca15cd6 100644 --- a/Tests/SentryTests/Integrations/MetricKit/SentryMXManagerTests.swift +++ b/Tests/SentryTests/Integrations/MetricKit/SentryMXManagerTests.swift @@ -165,23 +165,23 @@ class TestMXDiagnosticPayload: MXDiagnosticPayload { @available(watchOS, unavailable) class SentryMXManagerTestDelegate: SentryMXManagerDelegate { - var crashInvocations = Invocations<(diagnostic: MXCrashDiagnostic, callStackTree: SentryPrivate.SentryMXCallStackTree, timeStampBegin: Date, timeStampEnd: Date)>() - func didReceiveCrashDiagnostic(_ diagnostic: MXCrashDiagnostic, callStackTree: SentryPrivate.SentryMXCallStackTree, timeStampBegin: Date, timeStampEnd: Date) { + var crashInvocations = Invocations<(diagnostic: MXCrashDiagnostic, callStackTree: Sentry.SentryMXCallStackTree, timeStampBegin: Date, timeStampEnd: Date)>() + func didReceiveCrashDiagnostic(_ diagnostic: MXCrashDiagnostic, callStackTree: Sentry.SentryMXCallStackTree, timeStampBegin: Date, timeStampEnd: Date) { crashInvocations.record((diagnostic, callStackTree, timeStampBegin, timeStampEnd)) } - var diskWriteExceptionInvocations = Invocations<(diagnostic: MXDiskWriteExceptionDiagnostic, callStackTree: SentryPrivate.SentryMXCallStackTree, timeStampBegin: Date, timeStampEnd: Date)>() - func didReceiveDiskWriteExceptionDiagnostic(_ diagnostic: MXDiskWriteExceptionDiagnostic, callStackTree: SentryPrivate.SentryMXCallStackTree, timeStampBegin: Date, timeStampEnd: Date) { + var diskWriteExceptionInvocations = Invocations<(diagnostic: MXDiskWriteExceptionDiagnostic, callStackTree: Sentry.SentryMXCallStackTree, timeStampBegin: Date, timeStampEnd: Date)>() + func didReceiveDiskWriteExceptionDiagnostic(_ diagnostic: MXDiskWriteExceptionDiagnostic, callStackTree: Sentry.SentryMXCallStackTree, timeStampBegin: Date, timeStampEnd: Date) { diskWriteExceptionInvocations.record((diagnostic, callStackTree, timeStampBegin, timeStampEnd)) } - var cpuExceptionInvocations = Invocations<(diagnostic: MXCPUExceptionDiagnostic, callStackTree: SentryPrivate.SentryMXCallStackTree, timeStampBegin: Date, timeStampEnd: Date)>() - func didReceiveCpuExceptionDiagnostic(_ diagnostic: MXCPUExceptionDiagnostic, callStackTree: SentryPrivate.SentryMXCallStackTree, timeStampBegin: Date, timeStampEnd: Date) { + var cpuExceptionInvocations = Invocations<(diagnostic: MXCPUExceptionDiagnostic, callStackTree: Sentry.SentryMXCallStackTree, timeStampBegin: Date, timeStampEnd: Date)>() + func didReceiveCpuExceptionDiagnostic(_ diagnostic: MXCPUExceptionDiagnostic, callStackTree: Sentry.SentryMXCallStackTree, timeStampBegin: Date, timeStampEnd: Date) { cpuExceptionInvocations.record((diagnostic, callStackTree, timeStampBegin, timeStampEnd)) } - var hangDiagnosticInvocations = Invocations<(diagnostic: MXHangDiagnostic, callStackTree: SentryPrivate.SentryMXCallStackTree, timeStampBegin: Date, timeStampEnd: Date)>() - func didReceiveHangDiagnostic(_ diagnostic: MXHangDiagnostic, callStackTree: SentryPrivate.SentryMXCallStackTree, timeStampBegin: Date, timeStampEnd: Date) { + var hangDiagnosticInvocations = Invocations<(diagnostic: MXHangDiagnostic, callStackTree: Sentry.SentryMXCallStackTree, timeStampBegin: Date, timeStampEnd: Date)>() + func didReceiveHangDiagnostic(_ diagnostic: MXHangDiagnostic, callStackTree: Sentry.SentryMXCallStackTree, timeStampBegin: Date, timeStampEnd: Date) { hangDiagnosticInvocations.record((diagnostic, callStackTree, timeStampBegin, timeStampEnd)) } } diff --git a/Tests/SentryTests/Integrations/MetricKit/SentryMetricKitIntegrationTests.swift b/Tests/SentryTests/Integrations/MetricKit/SentryMetricKitIntegrationTests.swift index c1c871a00ca..a9375325026 100644 --- a/Tests/SentryTests/Integrations/MetricKit/SentryMetricKitIntegrationTests.swift +++ b/Tests/SentryTests/Integrations/MetricKit/SentryMetricKitIntegrationTests.swift @@ -1,5 +1,4 @@ import Sentry -import SentryPrivate import SentryTestUtils import XCTest diff --git a/Tests/SentryTests/SentryTests-Bridging-Header.h b/Tests/SentryTests/SentryTests-Bridging-Header.h index acbe3676eaa..6687c0187b9 100644 --- a/Tests/SentryTests/SentryTests-Bridging-Header.h +++ b/Tests/SentryTests/SentryTests-Bridging-Header.h @@ -205,7 +205,7 @@ #import "TestSentryCrashWrapper.h" #import "TestSentrySpan.h" #import "URLSessionTaskMock.h" -@import SentryPrivate; +#import "Sentry/Sentry-Swift.h" #import "SentryBinaryImageCache+Private.h" #import "SentryCrashBinaryImageCache.h" #import "SentryDispatchFactory.h" diff --git a/Tests/SentryTests/UrlSanitizedTests.swift b/Tests/SentryTests/UrlSanitizedTests.swift index 8a069df1049..b027b5bf00a 100644 --- a/Tests/SentryTests/UrlSanitizedTests.swift +++ b/Tests/SentryTests/UrlSanitizedTests.swift @@ -1,5 +1,4 @@ import Foundation -import SentryPrivate import XCTest class UrlSanitizedTests: XCTestCase { From ac7fdfed54fd21152366f5cc4226b7786e906296 Mon Sep 17 00:00:00 2001 From: Sentry Github Bot Date: Thu, 8 Feb 2024 14:38:52 +0000 Subject: [PATCH 07/62] Format code --- .../SentryTests/SentryTests-Bridging-Header.h | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/Tests/SentryTests/SentryTests-Bridging-Header.h b/Tests/SentryTests/SentryTests-Bridging-Header.h index 6687c0187b9..b3acda5eabb 100644 --- a/Tests/SentryTests/SentryTests-Bridging-Header.h +++ b/Tests/SentryTests/SentryTests-Bridging-Header.h @@ -167,6 +167,18 @@ #import "SentrySdkInfo.h" #import "SentrySwiftAsyncIntegration.h" +#import "Sentry/Sentry-Swift.h" +#import "SentryBinaryImageCache+Private.h" +#import "SentryCrashBinaryImageCache.h" +#import "SentryDispatchFactory.h" +#import "SentryDispatchSourceWrapper.h" +#import "SentryEnvelopeAttachmentHeader.h" +#import "SentryExtraContextProvider.h" +#import "SentryMeasurementValue.h" +#import "SentryNSProcessInfoWrapper.h" +#import "SentryPerformanceTracker+Testing.h" +#import "SentryPropagationContext.h" +#import "SentrySampleDecision+Private.h" #import "SentrySerialization.h" #import "SentrySession+Private.h" #import "SentrySessionTracker.h" @@ -186,9 +198,11 @@ #import "SentryThreadInspector.h" #import "SentryThreadWrapper.h" #import "SentryTime.h" +#import "SentryTimeToDisplayTracker.h" #import "SentryTraceContext.h" #import "SentryTracer+Private.h" #import "SentryTracer+Test.h" +#import "SentryTracerConfiguration.h" #import "SentryTransaction.h" #import "SentryTransactionContext+Private.h" #import "SentryTransport.h" @@ -204,20 +218,5 @@ #import "TestNSURLRequestBuilder.h" #import "TestSentryCrashWrapper.h" #import "TestSentrySpan.h" -#import "URLSessionTaskMock.h" -#import "Sentry/Sentry-Swift.h" -#import "SentryBinaryImageCache+Private.h" -#import "SentryCrashBinaryImageCache.h" -#import "SentryDispatchFactory.h" -#import "SentryDispatchSourceWrapper.h" -#import "SentryEnvelopeAttachmentHeader.h" -#import "SentryExtraContextProvider.h" -#import "SentryMeasurementValue.h" -#import "SentryNSProcessInfoWrapper.h" -#import "SentryPerformanceTracker+Testing.h" -#import "SentryPropagationContext.h" -#import "SentrySampleDecision+Private.h" -#import "SentrySpanOperations.h" -#import "SentryTimeToDisplayTracker.h" -#import "SentryTracerConfiguration.h" #import "TestSentryViewHierarchy.h" +#import "URLSessionTaskMock.h" From a9faa570029e98fe3ef65627e4bb61c025743f18 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 9 Feb 2024 10:24:55 +0100 Subject: [PATCH 08/62] Remove SentryPrivate from cocoapod --- .github/workflows/lint.yml | 2 +- Sentry.podspec | 5 ++--- SentryPrivate.podspec | 1 + Sources/Sentry/include/SentrySwift.h | 2 +- scripts/pod-lib-lint.sh | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index bdff62bdb38..79a3e992efe 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -71,4 +71,4 @@ jobs: - run: ./scripts/ci-select-xcode.sh - run: pod repo update - name: Validate HybridPod Podspec - run: pod lib lint ./Tests/HybridSDKTest/HybridPod.podspec --allow-warnings --verbose --platforms=ios "--include-podspecs={SentryPrivate.podspec,Sentry.podspec}" + run: pod lib lint ./Tests/HybridSDKTest/HybridPod.podspec --allow-warnings --verbose --platforms=ios "--include-podspecs={Sentry.podspec}" diff --git a/Sentry.podspec b/Sentry.podspec index 32d8ea835ad..bc0aadd780b 100644 --- a/Sentry.podspec +++ b/Sentry.podspec @@ -27,11 +27,10 @@ Pod::Spec.new do |s| } s.default_subspecs = ['Core'] - s.dependency "SentryPrivate", "8.20.0" s.subspec 'Core' do |sp| sp.source_files = "Sources/Sentry/**/*.{h,hpp,m,mm,c,cpp}", - "Sources/SentryCrash/**/*.{h,hpp,m,mm,c,cpp}", "Sources/Swift/Sentry.swift" + "Sources/SentryCrash/**/*.{h,hpp,m,mm,c,cpp}", "Sources/Swift/**/*.{swift,h,hpp,m,mm,c,cpp}" sp.public_header_files = "Sources/Sentry/Public/*.h" sp.resource = "Sources/Resources/PrivacyInfo.xcprivacy" @@ -39,7 +38,7 @@ Pod::Spec.new do |s| s.subspec 'HybridSDK' do |sp| sp.source_files = "Sources/Sentry/**/*.{h,hpp,m,mm,c,cpp}", - "Sources/SentryCrash/**/*.{h,hpp,m,mm,c,cpp}", "Sources/Swift/Sentry.swift" + "Sources/SentryCrash/**/*.{h,hpp,m,mm,c,cpp}", "Sources/Swift/**/*.{swift,h,hpp,m,mm,c,cpp}" sp.public_header_files = "Sources/Sentry/Public/*.h", "Sources/Sentry/include/HybridPublic/*.h" diff --git a/SentryPrivate.podspec b/SentryPrivate.podspec index 73d82f6dda4..f4c1ba9f3f0 100644 --- a/SentryPrivate.podspec +++ b/SentryPrivate.podspec @@ -8,6 +8,7 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/getsentry/sentry-cocoa.git", :tag => s.version.to_s } s.social_media_url = 'https://getsentry.com/' + s.deprecated = true s.description = <<-DESC Not for public use. diff --git a/Sources/Sentry/include/SentrySwift.h b/Sources/Sentry/include/SentrySwift.h index 9641b394bce..d76dc87c5df 100644 --- a/Sources/Sentry/include/SentrySwift.h +++ b/Sources/Sentry/include/SentrySwift.h @@ -1,7 +1,7 @@ #ifndef SentrySwift_h #define SentrySwift_h -#if SWIFT_PACKAGE || COCOAPODS +#if SWIFT_PACKAGE @import SentryPrivate; #else # import "Sentry/Sentry-Swift.h" diff --git a/scripts/pod-lib-lint.sh b/scripts/pod-lib-lint.sh index 9523ec6fddd..be3f7f1687f 100755 --- a/scripts/pod-lib-lint.sh +++ b/scripts/pod-lib-lint.sh @@ -10,11 +10,11 @@ EXTRA_ARGS="" case $POD_SPEC in "Sentry") - INCLUDE_POD_SPECS="--include-podspecs=SentryPrivate.podspec" + INCLUDE_POD_SPECS="" ;; "SentrySwiftUI") - INCLUDE_POD_SPECS="--include-podspecs={Sentry.podspec,SentryPrivate.podspec}" + INCLUDE_POD_SPECS="--include-podspecs=Sentry.podspec" ;; *) From a4b5db367692933ec488e4dbc8279040bb57e429 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 9 Feb 2024 10:45:38 +0100 Subject: [PATCH 09/62] Update pod-lib-lint.sh --- scripts/pod-lib-lint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pod-lib-lint.sh b/scripts/pod-lib-lint.sh index be3f7f1687f..728b8f0fb1d 100755 --- a/scripts/pod-lib-lint.sh +++ b/scripts/pod-lib-lint.sh @@ -33,4 +33,4 @@ case $LIBRARY_TYPE in ;; esac -pod lib lint --verbose --platforms="$PLATFORM" "$POD_SPEC".podspec "$INCLUDE_POD_SPECS" $EXTRA_ARGS +pod lib lint --verbose --platforms="$PLATFORM" "$POD_SPEC".podspec $INCLUDE_POD_SPECS $EXTRA_ARGS From 01b0ce9cb9310921e857620ccce01a2124c29e11 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 9 Feb 2024 11:10:32 +0100 Subject: [PATCH 10/62] Update SentrySwift.h --- Sources/Sentry/include/SentrySwift.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/Sentry/include/SentrySwift.h b/Sources/Sentry/include/SentrySwift.h index d76dc87c5df..09d3e1a9449 100644 --- a/Sources/Sentry/include/SentrySwift.h +++ b/Sources/Sentry/include/SentrySwift.h @@ -3,8 +3,10 @@ #if SWIFT_PACKAGE @import SentryPrivate; +#elif __has_include("Sentry-Swift.h") +#import "Sentry-Swift.h" #else -# import "Sentry/Sentry-Swift.h" +#import "Sentry/Sentry-Swift.h" #endif #endif From cf0cead87d12c9619d6c53ad26bd3ce9d834ac65 Mon Sep 17 00:00:00 2001 From: Sentry Github Bot Date: Fri, 9 Feb 2024 10:11:41 +0000 Subject: [PATCH 11/62] Format code --- Sources/Sentry/include/SentrySwift.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Sentry/include/SentrySwift.h b/Sources/Sentry/include/SentrySwift.h index 09d3e1a9449..bc2b4a1fbe4 100644 --- a/Sources/Sentry/include/SentrySwift.h +++ b/Sources/Sentry/include/SentrySwift.h @@ -4,9 +4,9 @@ #if SWIFT_PACKAGE @import SentryPrivate; #elif __has_include("Sentry-Swift.h") -#import "Sentry-Swift.h" +# import "Sentry-Swift.h" #else -#import "Sentry/Sentry-Swift.h" +# import "Sentry/Sentry-Swift.h" #endif #endif From 704b1ec6e9b4bc4a45c0c455682e1dad501762a9 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 9 Feb 2024 11:58:44 +0100 Subject: [PATCH 12/62] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee1f66ff0ac..de552874689 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ ### Improvements - Cache installationID async to avoid file IO on the main thread when starting the SDK (#3601) -- Remove SentryPrivate from Carthage and self build (#3623) +- Remove SentryPrivate from Carthage and self build and Cocoapod (#3623) ### Fixes From 818ff213d63d1c27739bb2ee50293f33aedc7cea Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 12 Feb 2024 11:43:26 +0100 Subject: [PATCH 13/62] Update CHANGELOG.md Co-authored-by: Philipp Hofmann --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de552874689..059cfca0f40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ ### Improvements - Cache installationID async to avoid file IO on the main thread when starting the SDK (#3601) -- Remove SentryPrivate from Carthage and self build and Cocoapod (#3623) +- Remove SentryPrivate from Carthage, self built, and CocoaPods (#3623) ### Fixes From b4897d8961f870f1ec16cc0eaec28c15043e4ba7 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 23 Feb 2024 09:04:05 +0100 Subject: [PATCH 14/62] Pre compile framework for SPM --- .craft.yml | 3 - .github/workflows/build.yml | 3 +- Makefile | 3 +- Package.swift | 38 ++--------- .../xcschemes/SentryPrivate.xcscheme | 67 ------------------- Utils/VersionBump/main.swift | 1 + scripts/update-package-sha.sh | 14 ++++ 7 files changed, 24 insertions(+), 105 deletions(-) delete mode 100644 Sentry.xcodeproj/xcshareddata/xcschemes/SentryPrivate.xcscheme create mode 100755 scripts/update-package-sha.sh diff --git a/.craft.yml b/.craft.yml index 67788e5eab9..a942e05ee27 100644 --- a/.craft.yml +++ b/.craft.yml @@ -3,9 +3,6 @@ changelogPolicy: auto preReleaseCommand: bash ./scripts/bump.sh targets: - name: github - - name: cocoapods - id: sentryprivate-cocoapod - specPath: SentryPrivate.podspec - name: cocoapods id: sentry-cocoapod specPath: Sentry.podspec diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ca10b157fa8..83c81bdb70e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -98,6 +98,7 @@ jobs: - uses: actions/checkout@v4 - run: ./scripts/ci-select-xcode.sh 15.2 - run: make build-xcframework + - run: ./scripts/update-package-sha.sh ${{ github.ref }} ${{ github.workspace }}/Carthage/Sentry.xcframework.zip shell: sh - name: Archiving XCFramework.zip @@ -106,7 +107,7 @@ jobs: name: ${{ github.sha }} if-no-files-found: error path: | - ${{ github.workspace }}/*.zip + ${{ github.workspace }}/Carthage/*.zip - name: Archive build log if failed uses: actions/upload-artifact@v4 diff --git a/Makefile b/Makefile index fa81df596b3..d51a385091b 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,8 @@ build-xcframework: @echo "--> Carthage: creating Sentry xcframework" carthage build --use-xcframeworks --no-skip-current --verbose > build-xcframework.log # use ditto here to avoid clobbering symlinks which exist in macOS frameworks - ditto -c -k -X --rsrc --keepParent Carthage Sentry.xcframework.zip + ditto -c -k -X --rsrc --keepParent Carthage/Build/Sentry.xcframework Carthage/Sentry.xcframework.zip + ditto -c -k -X --rsrc --keepParent Carthage/Build/SentrySwiftUI.xcframework Carthage/SentrySwiftUI.xcframework.zip build-xcframework-sample: ./scripts/create-carthage-json.sh diff --git a/Package.swift b/Package.swift index d5c1b51dce4..1d531928b80 100644 --- a/Package.swift +++ b/Package.swift @@ -6,42 +6,14 @@ let package = Package( platforms: [.iOS(.v11), .macOS(.v10_13), .tvOS(.v11), .watchOS(.v4)], products: [ .library(name: "Sentry", targets: ["Sentry"]), - .library(name: "Sentry-Dynamic", type: .dynamic, targets: ["Sentry"]), .library(name: "SentrySwiftUI", targets: ["SentrySwiftUI"]) ], targets: [ - .target( - name: "Sentry", - dependencies: ["SentryPrivate"], - path: "Sources", - sources: [ - "Sentry/", - "SentryCrash/" - ], - publicHeadersPath: "Sentry/Public/", - cxxSettings: [ - .define("GCC_ENABLE_CPP_EXCEPTIONS", to: "YES"), - .headerSearchPath("Sentry/include"), - .headerSearchPath("Sentry/include/HybridPublic"), - .headerSearchPath("Sentry/Public"), - .headerSearchPath("SentryCrash/Installations"), - .headerSearchPath("SentryCrash/Recording"), - .headerSearchPath("SentryCrash/Recording/Monitors"), - .headerSearchPath("SentryCrash/Recording/Tools"), - .headerSearchPath("SentryCrash/Reporting/Filters"), - .headerSearchPath("SentryCrash/Reporting/Filters/Tools"), - .headerSearchPath("SentryCrash/Reporting/Tools") - ] - ), - .target( name: "SentryPrivate", - path: "Sources", - sources: [ - "Swift" - ], - resources: [ - .copy("Resources/PrivacyInfo.xcprivacy") - ] - ), + .binaryTarget( + name: "Sentry", + url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.20.0/Sentry.xcframework.zip", + checksum: "30be1fb3c113187792f943ebb3acda6dc1552ae2" + ), .target ( name: "SentrySwiftUI", dependencies: ["Sentry", "SentryInternal"], path: "Sources", diff --git a/Sentry.xcodeproj/xcshareddata/xcschemes/SentryPrivate.xcscheme b/Sentry.xcodeproj/xcshareddata/xcschemes/SentryPrivate.xcscheme deleted file mode 100644 index c1a798f9d35..00000000000 --- a/Sentry.xcodeproj/xcshareddata/xcschemes/SentryPrivate.xcscheme +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Utils/VersionBump/main.swift b/Utils/VersionBump/main.swift index a9429cf0f4d..d05d2e15fbb 100644 --- a/Utils/VersionBump/main.swift +++ b/Utils/VersionBump/main.swift @@ -6,6 +6,7 @@ let fromVersionFile = "./Sentry.podspec" let files = [ "./Sentry.podspec", + "./Package.swift", "./SentryPrivate.podspec", "./SentrySwiftUI.podspec", "./Sources/Sentry/SentryMeta.m", diff --git a/scripts/update-package-sha.sh b/scripts/update-package-sha.sh new file mode 100755 index 00000000000..85496a15556 --- /dev/null +++ b/scripts/update-package-sha.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -euo pipefail + +GITHUB_BRANCH="${1}" +NEW_CHECKSUM=$(shasum ${2} | awk '{print $1}') + +sed -i '' "s/checksum: \".*\"/checksum: \"$NEW_CHECKSUM\"/" "Package.swift" + +echo "Updating Package.swift framework SHA" +git config --global user.email "bot+github-bot@sentry.io" +git config --global user.name "Sentry Github Bot" +git add . +git commit -m "Update Package.swift framework SHA" +git push origin $GITHUB_BRANCH From 87cb6491c3a027b4f385e8dc55fc61a857cab9d1 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 23 Feb 2024 09:06:54 +0100 Subject: [PATCH 15/62] Update CHANGELOG.md --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7532737d366..5872c789bf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Improvements + +- Remove SentryPrivate from Carthage, self built, and CocoaPods (#3623) + ## 8.21.0-beta.0 ### Features @@ -14,7 +20,6 @@ for development. Read our [blog post](https://blog.sentry.io/sentry-for-developm ### Improvements - Cache installationID async to avoid file IO on the main thread when starting the SDK (#3601) -- Remove SentryPrivate from Carthage, self built, and CocoaPods (#3623) - Add reason for NSPrivacyAccessedAPICategoryFileTimestamp (#3626) ### Fixes From afeeedcabb1b429e4b2fb7631aa98147ed8851a9 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 23 Feb 2024 09:48:16 +0100 Subject: [PATCH 16/62] fix carthage --- Package.swift | 4 ++-- scripts/update-package-sha.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Package.swift b/Package.swift index 1d531928b80..31d3f291c18 100644 --- a/Package.swift +++ b/Package.swift @@ -11,8 +11,8 @@ let package = Package( targets: [ .binaryTarget( name: "Sentry", - url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.20.0/Sentry.xcframework.zip", - checksum: "30be1fb3c113187792f943ebb3acda6dc1552ae2" + url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.21.0-beta.0/Sentry.xcframework.zip", + checksum: "d41d6589e0490fd927b270cc0f87bfcf2b60f3e2a526280a655b43ae2dbe2766" ), .target ( name: "SentrySwiftUI", dependencies: ["Sentry", "SentryInternal"], diff --git a/scripts/update-package-sha.sh b/scripts/update-package-sha.sh index 85496a15556..c255626bbe4 100755 --- a/scripts/update-package-sha.sh +++ b/scripts/update-package-sha.sh @@ -2,7 +2,7 @@ set -euo pipefail GITHUB_BRANCH="${1}" -NEW_CHECKSUM=$(shasum ${2} | awk '{print $1}') +NEW_CHECKSUM=$(shasum -a 256 ${2} | awk '{print $1}') sed -i '' "s/checksum: \".*\"/checksum: \"$NEW_CHECKSUM\"/" "Package.swift" From 681437a515b886cfd52d974038c5c69663f2e2f1 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 23 Feb 2024 10:50:45 +0100 Subject: [PATCH 17/62] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 83c81bdb70e..fde25f72b2d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -98,7 +98,7 @@ jobs: - uses: actions/checkout@v4 - run: ./scripts/ci-select-xcode.sh 15.2 - run: make build-xcframework - - run: ./scripts/update-package-sha.sh ${{ github.ref }} ${{ github.workspace }}/Carthage/Sentry.xcframework.zip + - run: ./scripts/update-package-sha.sh "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" ${{ github.workspace }}/Carthage/Sentry.xcframework.zip shell: sh - name: Archiving XCFramework.zip From ab970ca5fb362ea2933f94bed451f03cbda53878 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 23 Feb 2024 11:49:12 +0100 Subject: [PATCH 18/62] Update build.yml --- .github/workflows/build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fde25f72b2d..d70e46b8c75 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -98,7 +98,11 @@ jobs: - uses: actions/checkout@v4 - run: ./scripts/ci-select-xcode.sh 15.2 - run: make build-xcframework - - run: ./scripts/update-package-sha.sh "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" ${{ github.workspace }}/Carthage/Sentry.xcframework.zip + shell: sh + + - name: Update Package.swift + if: github.event_name != 'pull_request' + run: ./scripts/update-package-sha.sh "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" ${{ github.workspace }}/Carthage/Sentry.xcframework.zip ${{ github.event_name }} shell: sh - name: Archiving XCFramework.zip From 33ea8e9daceb85f47d1904c16489fd397baa7ed6 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 23 Feb 2024 12:57:24 +0100 Subject: [PATCH 19/62] Update build.yml --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d70e46b8c75..36fe2875823 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -123,6 +123,7 @@ jobs: validate-xcframework: name: Validate XCFramework + if: false runs-on: macos-13-xlarge needs: build-xcframework steps: @@ -139,6 +140,7 @@ jobs: # See https://github.community/t/github-sha-isnt-the-value-expected/17903/17906. validate-spm: name: Validate Swift Package Manager + if: false runs-on: macos-13 steps: - uses: actions/checkout@v4 @@ -156,6 +158,7 @@ jobs: validate-spm-dynamic: name: Validate Swift Package Manager Dynamic + if: false runs-on: macos-13 steps: - uses: actions/checkout@v4 From c081906a8e7d67efa7758ed094e3a9f412c69194 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 23 Feb 2024 12:58:48 +0100 Subject: [PATCH 20/62] Update build.yml --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 36fe2875823..aff358c8f18 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -176,6 +176,7 @@ jobs: swift-build: name: Build with Swift + if: false runs-on: macos-13 steps: - uses: actions/checkout@v4 From a6c8e13ee42a8ce05c08af8f356ed8fd8569a569 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 23 Feb 2024 14:22:11 +0100 Subject: [PATCH 21/62] remove perf --- Tests/Perf/metrics-test.yml | 14 - .../test-app-plain.xcodeproj/project.pbxproj | 257 ---------------- .../contents.xcworkspacedata | 7 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../AccentColor.colorset/Contents.json | 11 - .../AppIcon.appiconset/Contents.json | 93 ------ .../Assets.xcassets/Contents.json | 6 - .../test-app-plain/ContentView.swift | 14 - .../Preview Assets.xcassets/Contents.json | 6 - .../test-app-plain/test_app_plainApp.swift | 10 - .../test-app-sentry.xcodeproj/project.pbxproj | 286 ------------------ .../contents.xcworkspacedata | 7 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../AccentColor.colorset/Contents.json | 11 - .../AppIcon.appiconset/Contents.json | 93 ------ .../Assets.xcassets/Contents.json | 6 - .../test-app-sentry/ContentView.swift | 14 - .../Preview Assets.xcassets/Contents.json | 6 - .../test-app-sentry/test_app_sentryApp.swift | 18 -- 19 files changed, 875 deletions(-) delete mode 100644 Tests/Perf/metrics-test.yml delete mode 100644 Tests/Perf/test-app-plain/test-app-plain.xcodeproj/project.pbxproj delete mode 100644 Tests/Perf/test-app-plain/test-app-plain.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 Tests/Perf/test-app-plain/test-app-plain.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/AccentColor.colorset/Contents.json delete mode 100644 Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/Contents.json delete mode 100644 Tests/Perf/test-app-plain/test-app-plain/ContentView.swift delete mode 100644 Tests/Perf/test-app-plain/test-app-plain/Preview Content/Preview Assets.xcassets/Contents.json delete mode 100644 Tests/Perf/test-app-plain/test-app-plain/test_app_plainApp.swift delete mode 100644 Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.pbxproj delete mode 100644 Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/AccentColor.colorset/Contents.json delete mode 100644 Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/Contents.json delete mode 100644 Tests/Perf/test-app-sentry/test-app-sentry/ContentView.swift delete mode 100644 Tests/Perf/test-app-sentry/test-app-sentry/Preview Content/Preview Assets.xcassets/Contents.json delete mode 100644 Tests/Perf/test-app-sentry/test-app-sentry/test_app_sentryApp.swift diff --git a/Tests/Perf/metrics-test.yml b/Tests/Perf/metrics-test.yml deleted file mode 100644 index f4d057b76e6..00000000000 --- a/Tests/Perf/metrics-test.yml +++ /dev/null @@ -1,14 +0,0 @@ -apps: - - name: io.sentry.cocoa.perf-test-app-plain - path: test-app-plain.ipa - - name: io.sentry.cocoa.perf-test-app-sentry - path: test-app-sentry.ipa - -startupTimeTest: - runs: 50 - diffMin: 0 - diffMax: 150 - -binarySizeTest: - diffMin: 200 KiB - diffMax: 420 KiB diff --git a/Tests/Perf/test-app-plain/test-app-plain.xcodeproj/project.pbxproj b/Tests/Perf/test-app-plain/test-app-plain.xcodeproj/project.pbxproj deleted file mode 100644 index 1540fd347da..00000000000 --- a/Tests/Perf/test-app-plain/test-app-plain.xcodeproj/project.pbxproj +++ /dev/null @@ -1,257 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 55; - objects = { - -/* Begin PBXBuildFile section */ - 2C101B5428A2953600D320BC /* test_app_plainApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C101B5328A2953600D320BC /* test_app_plainApp.swift */; }; - 2C101B5628A2953600D320BC /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C101B5528A2953600D320BC /* ContentView.swift */; }; - 2C101B5828A2953700D320BC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2C101B5728A2953700D320BC /* Assets.xcassets */; }; - 2C101B5B28A2953700D320BC /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2C101B5A28A2953700D320BC /* Preview Assets.xcassets */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 2C101B5028A2953600D320BC /* test-app-plain.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "test-app-plain.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 2C101B5328A2953600D320BC /* test_app_plainApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = test_app_plainApp.swift; sourceTree = ""; }; - 2C101B5528A2953600D320BC /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; - 2C101B5728A2953700D320BC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 2C101B5A28A2953700D320BC /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 2C101B4D28A2953600D320BC /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 2C101B4728A2953600D320BC = { - isa = PBXGroup; - children = ( - 2C101B5228A2953600D320BC /* test-app-plain */, - 2C101B5128A2953600D320BC /* Products */, - ); - sourceTree = ""; - }; - 2C101B5128A2953600D320BC /* Products */ = { - isa = PBXGroup; - children = ( - 2C101B5028A2953600D320BC /* test-app-plain.app */, - ); - name = Products; - sourceTree = ""; - }; - 2C101B5228A2953600D320BC /* test-app-plain */ = { - isa = PBXGroup; - children = ( - 2C101B5328A2953600D320BC /* test_app_plainApp.swift */, - 2C101B5528A2953600D320BC /* ContentView.swift */, - 2C101B5728A2953700D320BC /* Assets.xcassets */, - 2C101B5928A2953700D320BC /* Preview Content */, - ); - path = "test-app-plain"; - sourceTree = ""; - }; - 2C101B5928A2953700D320BC /* Preview Content */ = { - isa = PBXGroup; - children = ( - 2C101B5A28A2953700D320BC /* Preview Assets.xcassets */, - ); - path = "Preview Content"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 2C101B4F28A2953600D320BC /* test-app-plain */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2C101B5E28A2953700D320BC /* Build configuration list for PBXNativeTarget "test-app-plain" */; - buildPhases = ( - 2C101B4C28A2953600D320BC /* Sources */, - 2C101B4D28A2953600D320BC /* Frameworks */, - 2C101B4E28A2953600D320BC /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "test-app-plain"; - productName = "test-app-plain"; - productReference = 2C101B5028A2953600D320BC /* test-app-plain.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 2C101B4828A2953600D320BC /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 1340; - LastUpgradeCheck = 1340; - TargetAttributes = { - 2C101B4F28A2953600D320BC = { - CreatedOnToolsVersion = 13.4; - }; - }; - }; - buildConfigurationList = 2C101B4B28A2953600D320BC /* Build configuration list for PBXProject "test-app-plain" */; - compatibilityVersion = "Xcode 13.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 2C101B4728A2953600D320BC; - productRefGroup = 2C101B5128A2953600D320BC /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 2C101B4F28A2953600D320BC /* test-app-plain */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 2C101B4E28A2953600D320BC /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2C101B5B28A2953700D320BC /* Preview Assets.xcassets in Resources */, - 2C101B5828A2953700D320BC /* Assets.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 2C101B4C28A2953600D320BC /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2C101B5628A2953600D320BC /* ContentView.swift in Sources */, - 2C101B5428A2953600D320BC /* test_app_plainApp.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 2C101B5D28A2953700D320BC /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "Apple Development"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = 97JCY7859U; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 2C101B6028A2953700D320BC /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"test-app-plain/Preview Content\""; - DEVELOPMENT_TEAM = 97JCY7859U; - ENABLE_PREVIEWS = YES; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchScreen_Generation = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.cocoa.perf-test-app-plain"; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = "match Development io.sentry.cocoa.perf-test-app-plain"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 2C101B4B28A2953600D320BC /* Build configuration list for PBXProject "test-app-plain" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2C101B5D28A2953700D320BC /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 2C101B5E28A2953700D320BC /* Build configuration list for PBXNativeTarget "test-app-plain" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2C101B6028A2953700D320BC /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 2C101B4828A2953600D320BC /* Project object */; -} diff --git a/Tests/Perf/test-app-plain/test-app-plain.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Tests/Perf/test-app-plain/test-app-plain.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6254..00000000000 --- a/Tests/Perf/test-app-plain/test-app-plain.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Tests/Perf/test-app-plain/test-app-plain.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Tests/Perf/test-app-plain/test-app-plain.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d6..00000000000 --- a/Tests/Perf/test-app-plain/test-app-plain.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/AccentColor.colorset/Contents.json b/Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/AccentColor.colorset/Contents.json deleted file mode 100644 index eb878970081..00000000000 --- a/Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/AccentColor.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/AppIcon.appiconset/Contents.json b/Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 5a3257a7d00..00000000000 --- a/Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "20x20" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "29x29" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "76x76" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "83.5x83.5" - }, - { - "idiom" : "ios-marketing", - "scale" : "1x", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/Contents.json b/Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/Contents.json deleted file mode 100644 index 73c00596a7f..00000000000 --- a/Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Tests/Perf/test-app-plain/test-app-plain/ContentView.swift b/Tests/Perf/test-app-plain/test-app-plain/ContentView.swift deleted file mode 100644 index 0ec9f8a0cf9..00000000000 --- a/Tests/Perf/test-app-plain/test-app-plain/ContentView.swift +++ /dev/null @@ -1,14 +0,0 @@ -import SwiftUI - -struct ContentView: View { - var body: some View { - Text("Hello, world!") - .padding() - } -} - -struct ContentView_Previews: PreviewProvider { - static var previews: some View { - ContentView() - } -} diff --git a/Tests/Perf/test-app-plain/test-app-plain/Preview Content/Preview Assets.xcassets/Contents.json b/Tests/Perf/test-app-plain/test-app-plain/Preview Content/Preview Assets.xcassets/Contents.json deleted file mode 100644 index 73c00596a7f..00000000000 --- a/Tests/Perf/test-app-plain/test-app-plain/Preview Content/Preview Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Tests/Perf/test-app-plain/test-app-plain/test_app_plainApp.swift b/Tests/Perf/test-app-plain/test-app-plain/test_app_plainApp.swift deleted file mode 100644 index 20a926a7c8b..00000000000 --- a/Tests/Perf/test-app-plain/test-app-plain/test_app_plainApp.swift +++ /dev/null @@ -1,10 +0,0 @@ -import SwiftUI - -@main -struct test_app_plainApp: App { - var body: some Scene { - WindowGroup { - ContentView() - } - } -} diff --git a/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.pbxproj b/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.pbxproj deleted file mode 100644 index 9b095f2899d..00000000000 --- a/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.pbxproj +++ /dev/null @@ -1,286 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 55; - objects = { - -/* Begin PBXBuildFile section */ - 2C101B6E28A2956900D320BC /* test_app_sentryApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C101B6D28A2956900D320BC /* test_app_sentryApp.swift */; }; - 2C101B7028A2956900D320BC /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C101B6F28A2956900D320BC /* ContentView.swift */; }; - 2C101B7228A2956A00D320BC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2C101B7128A2956A00D320BC /* Assets.xcassets */; }; - 2C101B7528A2956A00D320BC /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2C101B7428A2956A00D320BC /* Preview Assets.xcassets */; }; - 2C101B8128A2EF1B00D320BC /* Sentry in Frameworks */ = {isa = PBXBuildFile; productRef = 2C101B8028A2EF1B00D320BC /* Sentry */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 2C101B6A28A2956900D320BC /* test-app-sentry.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "test-app-sentry.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 2C101B6D28A2956900D320BC /* test_app_sentryApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = test_app_sentryApp.swift; sourceTree = ""; }; - 2C101B6F28A2956900D320BC /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; - 2C101B7128A2956A00D320BC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 2C101B7428A2956A00D320BC /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; - 2CB1E68428AB8413001DE8EE /* sentry-cocoa */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "sentry-cocoa"; path = ../../..; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 2C101B6728A2956900D320BC /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 2C101B8128A2EF1B00D320BC /* Sentry in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 2C101B6128A2956900D320BC = { - isa = PBXGroup; - children = ( - 2C101B7B28A2ED8500D320BC /* Packages */, - 2C101B6C28A2956900D320BC /* test-app-sentry */, - 2C101B6B28A2956900D320BC /* Products */, - 2C101B7F28A2EF1B00D320BC /* Frameworks */, - ); - sourceTree = ""; - }; - 2C101B6B28A2956900D320BC /* Products */ = { - isa = PBXGroup; - children = ( - 2C101B6A28A2956900D320BC /* test-app-sentry.app */, - ); - name = Products; - sourceTree = ""; - }; - 2C101B6C28A2956900D320BC /* test-app-sentry */ = { - isa = PBXGroup; - children = ( - 2C101B6D28A2956900D320BC /* test_app_sentryApp.swift */, - 2C101B6F28A2956900D320BC /* ContentView.swift */, - 2C101B7128A2956A00D320BC /* Assets.xcassets */, - 2C101B7328A2956A00D320BC /* Preview Content */, - ); - path = "test-app-sentry"; - sourceTree = ""; - }; - 2C101B7328A2956A00D320BC /* Preview Content */ = { - isa = PBXGroup; - children = ( - 2C101B7428A2956A00D320BC /* Preview Assets.xcassets */, - ); - path = "Preview Content"; - sourceTree = ""; - }; - 2C101B7B28A2ED8500D320BC /* Packages */ = { - isa = PBXGroup; - children = ( - 2CB1E68428AB8413001DE8EE /* sentry-cocoa */, - ); - name = Packages; - sourceTree = ""; - }; - 2C101B7F28A2EF1B00D320BC /* Frameworks */ = { - isa = PBXGroup; - children = ( - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 2C101B6928A2956900D320BC /* test-app-sentry */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2C101B7828A2956A00D320BC /* Build configuration list for PBXNativeTarget "test-app-sentry" */; - buildPhases = ( - 2C101B6628A2956900D320BC /* Sources */, - 2C101B6728A2956900D320BC /* Frameworks */, - 2C101B6828A2956900D320BC /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "test-app-sentry"; - packageProductDependencies = ( - 2C101B8028A2EF1B00D320BC /* Sentry */, - ); - productName = "test-app-sentry"; - productReference = 2C101B6A28A2956900D320BC /* test-app-sentry.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 2C101B6228A2956900D320BC /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 1340; - LastUpgradeCheck = 1340; - TargetAttributes = { - 2C101B6928A2956900D320BC = { - CreatedOnToolsVersion = 13.4; - }; - }; - }; - buildConfigurationList = 2C101B6528A2956900D320BC /* Build configuration list for PBXProject "test-app-sentry" */; - compatibilityVersion = "Xcode 13.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 2C101B6128A2956900D320BC; - productRefGroup = 2C101B6B28A2956900D320BC /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 2C101B6928A2956900D320BC /* test-app-sentry */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 2C101B6828A2956900D320BC /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2C101B7528A2956A00D320BC /* Preview Assets.xcassets in Resources */, - 2C101B7228A2956A00D320BC /* Assets.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 2C101B6628A2956900D320BC /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2C101B7028A2956900D320BC /* ContentView.swift in Sources */, - 2C101B6E28A2956900D320BC /* test_app_sentryApp.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 2C101B7728A2956A00D320BC /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = 97JCY7859U; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 2C101B7A28A2956A00D320BC /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"test-app-sentry/Preview Content\""; - DEVELOPMENT_TEAM = 97JCY7859U; - ENABLE_PREVIEWS = YES; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchScreen_Generation = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.cocoa.perf-test-app-sentry"; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = "match Development io.sentry.cocoa.perf-test-app-sentry"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 2C101B6528A2956900D320BC /* Build configuration list for PBXProject "test-app-sentry" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2C101B7728A2956A00D320BC /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 2C101B7828A2956A00D320BC /* Build configuration list for PBXNativeTarget "test-app-sentry" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2C101B7A28A2956A00D320BC /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - -/* Begin XCSwiftPackageProductDependency section */ - 2C101B8028A2EF1B00D320BC /* Sentry */ = { - isa = XCSwiftPackageProductDependency; - productName = Sentry; - }; -/* End XCSwiftPackageProductDependency section */ - }; - rootObject = 2C101B6228A2956900D320BC /* Project object */; -} diff --git a/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6254..00000000000 --- a/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d6..00000000000 --- a/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/AccentColor.colorset/Contents.json b/Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/AccentColor.colorset/Contents.json deleted file mode 100644 index eb878970081..00000000000 --- a/Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/AccentColor.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/AppIcon.appiconset/Contents.json b/Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 5a3257a7d00..00000000000 --- a/Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "20x20" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "29x29" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "76x76" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "83.5x83.5" - }, - { - "idiom" : "ios-marketing", - "scale" : "1x", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/Contents.json b/Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/Contents.json deleted file mode 100644 index 73c00596a7f..00000000000 --- a/Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Tests/Perf/test-app-sentry/test-app-sentry/ContentView.swift b/Tests/Perf/test-app-sentry/test-app-sentry/ContentView.swift deleted file mode 100644 index 0ec9f8a0cf9..00000000000 --- a/Tests/Perf/test-app-sentry/test-app-sentry/ContentView.swift +++ /dev/null @@ -1,14 +0,0 @@ -import SwiftUI - -struct ContentView: View { - var body: some View { - Text("Hello, world!") - .padding() - } -} - -struct ContentView_Previews: PreviewProvider { - static var previews: some View { - ContentView() - } -} diff --git a/Tests/Perf/test-app-sentry/test-app-sentry/Preview Content/Preview Assets.xcassets/Contents.json b/Tests/Perf/test-app-sentry/test-app-sentry/Preview Content/Preview Assets.xcassets/Contents.json deleted file mode 100644 index 73c00596a7f..00000000000 --- a/Tests/Perf/test-app-sentry/test-app-sentry/Preview Content/Preview Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Tests/Perf/test-app-sentry/test-app-sentry/test_app_sentryApp.swift b/Tests/Perf/test-app-sentry/test-app-sentry/test_app_sentryApp.swift deleted file mode 100644 index c36427544ac..00000000000 --- a/Tests/Perf/test-app-sentry/test-app-sentry/test_app_sentryApp.swift +++ /dev/null @@ -1,18 +0,0 @@ -import Sentry -import Sentry -import SwiftUI - -@main -struct test_app_sentryApp: App { - init() { - SentrySDK.start { options in - options.dsn = "https://a92d50327ac74b8b9aa4ea80eccfb267@o447951.ingest.sentry.io/5428557" - } - } - - var body: some Scene { - WindowGroup { - ContentView() - } - } -} From 69504fef81109ace8971b69e74cb0004712b705d Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 23 Feb 2024 15:23:25 +0100 Subject: [PATCH 22/62] Update release.yml --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 305f51656b9..1d52abc42b1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,3 +30,4 @@ jobs: with: version: ${{ github.event.inputs.version }} force: ${{ github.event.inputs.force }} + merge_target: ${{ github.event.inputs.merge_target }} From 0acb870d4563df682b59daac7aff73ce03fef5c7 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 26 Feb 2024 09:47:43 +0100 Subject: [PATCH 23/62] Cache xcframework --- .github/workflows/build.yml | 26 +++++++++++++++++++++----- .github/workflows/release.yml | 25 +++++++++++++++++++++++++ scripts/currentversion.sh | 10 ++++++++++ 3 files changed, 56 insertions(+), 5 deletions(-) create mode 100755 scripts/currentversion.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aff358c8f18..d3915cdf63b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -96,13 +96,29 @@ jobs: runs-on: macos-13-xlarge steps: - uses: actions/checkout@v4 + - run: sentryversion=$(./scripts/currentversion.sh) + + - name: Cache xcframework + if: startsWith(github.ref, 'refs/heads/release/') + id: framework-cache + uses: actions/cache@v4 + with: + path: | + Carthage/Sentry.xcframework.zip + Carthage/SentrySwiftUI.xcframework.zip + key: sentry-xcframeworks-key-${{ sentryversion }} + + - name: Check Cache Hit + if: startsWith(github.ref, 'refs/heads/release/') && steps.framework-cache.outputs.cache-hit != 'true' + run: | + echo "Cache miss detected. Cancelling workflow." + exit 1 # Exit with non-zero status code to indicate failure + - run: ./scripts/ci-select-xcode.sh 15.2 - - run: make build-xcframework - shell: sh - - name: Update Package.swift - if: github.event_name != 'pull_request' - run: ./scripts/update-package-sha.sh "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" ${{ github.workspace }}/Carthage/Sentry.xcframework.zip ${{ github.event_name }} + - name: Build xcframework + if: !startsWith(github.ref, 'refs/heads/release/') + run: make build-xcframework shell: sh - name: Archiving XCFramework.zip diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 305f51656b9..6f375422a17 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,9 +13,33 @@ on: required: false jobs: + prepare_framework: + runs-on: macos-13-xlarge + name: 'Create XCFramework' + steps: + - uses: actions/checkout@v4 + + - name: Cache xcframework + id: framework-cache + uses: actions/cache@v4 + with: + path: | + Carthage/Sentry.xcframework.zip + Carthage/SentrySwiftUI.xcframework.zip + key: sentry-xcframeworks-key-${{ github.event.inputs.version }} + + - name: 'Generate XCFramework' + run: | + ./scripts/ci-select-xcode.sh 15.2 + make build-xcframework + + - name: 'Update Package.swift' + run: ./scripts/update-package-sha.sh "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" ${{ github.workspace }}/Carthage/Sentry.xcframework.zip + job_release: runs-on: ubuntu-latest name: 'Release a new version' + needs: prepare_framework steps: - name: Check out current commit (${{ github.sha }}) uses: actions/checkout@v4 @@ -30,3 +54,4 @@ jobs: with: version: ${{ github.event.inputs.version }} force: ${{ github.event.inputs.force }} + merge_target: ${{ github.event.inputs.merge_target }} diff --git a/scripts/currentversion.sh b/scripts/currentversion.sh new file mode 100755 index 00000000000..1b3098e73bf --- /dev/null +++ b/scripts/currentversion.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Read the line containing the version from the file +version_line=$(grep 's.version' Sentry.podspec) + +# Extract the version using awk +version=$(echo "$version_line" | awk -F'"' '{print $2}') + +# Print the version +echo "$version" From 55e11436b2906ef46c9b512be4fcc05f63ba1f7b Mon Sep 17 00:00:00 2001 From: Sentry Github Bot Date: Mon, 26 Feb 2024 08:54:43 +0000 Subject: [PATCH 24/62] Update Package.swift framework SHA --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 31d3f291c18..05ab383bcb0 100644 --- a/Package.swift +++ b/Package.swift @@ -12,7 +12,7 @@ let package = Package( .binaryTarget( name: "Sentry", url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.21.0-beta.0/Sentry.xcframework.zip", - checksum: "d41d6589e0490fd927b270cc0f87bfcf2b60f3e2a526280a655b43ae2dbe2766" + checksum: "b8e72ed81ffd962777930f0fec26877a40a543db7bd07fe3a56085f50017f885" ), .target ( name: "SentrySwiftUI", dependencies: ["Sentry", "SentryInternal"], From 70c0eccb439b3d5d5f6c7f8bc9d97bdf2039cbea Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 26 Feb 2024 10:25:45 +0100 Subject: [PATCH 25/62] Update build.yml --- .github/workflows/build.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d3915cdf63b..129bd5da8b5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -96,7 +96,8 @@ jobs: runs-on: macos-13-xlarge steps: - uses: actions/checkout@v4 - - run: sentryversion=$(./scripts/currentversion.sh) + - run: ./scripts/ci-select-xcode.sh 15.2 + - run: echo "SENTRYVERSION=$(./scripts/currentversion.sh)" >> $GITHUB_ENV - name: Cache xcframework if: startsWith(github.ref, 'refs/heads/release/') @@ -106,18 +107,11 @@ jobs: path: | Carthage/Sentry.xcframework.zip Carthage/SentrySwiftUI.xcframework.zip - key: sentry-xcframeworks-key-${{ sentryversion }} - - - name: Check Cache Hit - if: startsWith(github.ref, 'refs/heads/release/') && steps.framework-cache.outputs.cache-hit != 'true' - run: | - echo "Cache miss detected. Cancelling workflow." - exit 1 # Exit with non-zero status code to indicate failure - - - run: ./scripts/ci-select-xcode.sh 15.2 + key: sentry-xcframeworks-key-${{ env.SENTRYVERSION }} + fail-on-cache-miss: true - name: Build xcframework - if: !startsWith(github.ref, 'refs/heads/release/') + if: startsWith(github.ref, 'refs/heads/release/') == false run: make build-xcframework shell: sh From ae9890e6399458806fff962486285c3d92c6152c Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 26 Feb 2024 10:26:49 +0100 Subject: [PATCH 26/62] Update release.yml --- .github/workflows/release.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6f375422a17..ac99ee272f3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,9 +23,7 @@ jobs: id: framework-cache uses: actions/cache@v4 with: - path: | - Carthage/Sentry.xcframework.zip - Carthage/SentrySwiftUI.xcframework.zip + path: Carthage/Sentry.xcframework.zip key: sentry-xcframeworks-key-${{ github.event.inputs.version }} - name: 'Generate XCFramework' From 5065071f6b0170f03a22b016caebdb6ec61dd1bc Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 26 Feb 2024 10:29:59 +0100 Subject: [PATCH 27/62] Update build.yml --- .github/workflows/build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 129bd5da8b5..a353dabde0e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -104,9 +104,7 @@ jobs: id: framework-cache uses: actions/cache@v4 with: - path: | - Carthage/Sentry.xcframework.zip - Carthage/SentrySwiftUI.xcframework.zip + path: Carthage/Sentry.xcframework.zip key: sentry-xcframeworks-key-${{ env.SENTRYVERSION }} fail-on-cache-miss: true From 058ccb3575561c304d3ab02137d8110203dea899 Mon Sep 17 00:00:00 2001 From: Sentry Github Bot Date: Mon, 26 Feb 2024 09:36:48 +0000 Subject: [PATCH 28/62] Update Package.swift framework SHA --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 05ab383bcb0..c8f19134b9e 100644 --- a/Package.swift +++ b/Package.swift @@ -12,7 +12,7 @@ let package = Package( .binaryTarget( name: "Sentry", url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.21.0-beta.0/Sentry.xcframework.zip", - checksum: "b8e72ed81ffd962777930f0fec26877a40a543db7bd07fe3a56085f50017f885" + checksum: "7af812e2f4292321d7cc7dc0d672b5fb435e82baca4e3cd7c72fb97b35bfd8e4" ), .target ( name: "SentrySwiftUI", dependencies: ["Sentry", "SentryInternal"], From a3b844d71e9bce72bd7bc68e75bce8021031ddcc Mon Sep 17 00:00:00 2001 From: Sentry Github Bot Date: Mon, 26 Feb 2024 09:50:06 +0000 Subject: [PATCH 29/62] Update Package.swift framework SHA --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index c8f19134b9e..0989cf9c28c 100644 --- a/Package.swift +++ b/Package.swift @@ -12,7 +12,7 @@ let package = Package( .binaryTarget( name: "Sentry", url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.21.0-beta.0/Sentry.xcframework.zip", - checksum: "7af812e2f4292321d7cc7dc0d672b5fb435e82baca4e3cd7c72fb97b35bfd8e4" + checksum: "6e3028e50185d2cafd93765f6c2c078a21a30d85d252643ad990c2a442443462" ), .target ( name: "SentrySwiftUI", dependencies: ["Sentry", "SentryInternal"], From 4b1653eeda01ed195b100a2068ecd97e08a1be72 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 26 Feb 2024 11:58:26 +0100 Subject: [PATCH 30/62] using artefact --- .github/workflows/build.yml | 17 ++++++++++------- .github/workflows/release.yml | 15 +++++++-------- Package.swift | 2 +- scripts/update-package-sha.sh | 2 +- ...tversion.sh => xcframework-generated-run.sh} | 0 5 files changed, 19 insertions(+), 17 deletions(-) rename scripts/{currentversion.sh => xcframework-generated-run.sh} (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a353dabde0e..624b2b7d3ee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -97,16 +97,19 @@ jobs: steps: - uses: actions/checkout@v4 - run: ./scripts/ci-select-xcode.sh 15.2 - - run: echo "SENTRYVERSION=$(./scripts/currentversion.sh)" >> $GITHUB_ENV + - run: echo "FRAMEWORKRUNID=$(./scripts/xcframework-generated-run.sh)" >> $GITHUB_ENV - - name: Cache xcframework + - uses: actions/download-artifact@v4 if: startsWith(github.ref, 'refs/heads/release/') - id: framework-cache - uses: actions/cache@v4 with: - path: Carthage/Sentry.xcframework.zip - key: sentry-xcframeworks-key-${{ env.SENTRYVERSION }} - fail-on-cache-miss: true + name: Sentry.xcframework.zip + path: Carthage/ + github-token: ${{ secrets.GITHUB_TOKEN }} + run-id: ${{ env.FRAMEWORKRUNID }} + + - name: Check XCFramework + if: startsWith(github.ref, 'refs/heads/release/') + ls -R Carthage - name: Build xcframework if: startsWith(github.ref, 'refs/heads/release/') == false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ac99ee272f3..a309e101e8e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,21 +18,20 @@ jobs: name: 'Create XCFramework' steps: - uses: actions/checkout@v4 - - - name: Cache xcframework - id: framework-cache - uses: actions/cache@v4 - with: - path: Carthage/Sentry.xcframework.zip - key: sentry-xcframeworks-key-${{ github.event.inputs.version }} - name: 'Generate XCFramework' run: | ./scripts/ci-select-xcode.sh 15.2 make build-xcframework + + - uses: actions/upload-artifact@v4 + with: + name: Sentry.xcframework.zip + path: Carthage/Sentry.xcframework.zip + overwrite: true - name: 'Update Package.swift' - run: ./scripts/update-package-sha.sh "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" ${{ github.workspace }}/Carthage/Sentry.xcframework.zip + run: ./scripts/update-package-sha.sh "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" ${{ github.workspace }}/Carthage/Sentry.xcframework.zip ${{ github.run_id }} job_release: runs-on: ubuntu-latest diff --git a/Package.swift b/Package.swift index c8f19134b9e..3fab1ed1a76 100644 --- a/Package.swift +++ b/Package.swift @@ -12,7 +12,7 @@ let package = Package( .binaryTarget( name: "Sentry", url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.21.0-beta.0/Sentry.xcframework.zip", - checksum: "7af812e2f4292321d7cc7dc0d672b5fb435e82baca4e3cd7c72fb97b35bfd8e4" + checksum: "7af812e2f4292321d7cc7dc0d672b5fb435e82baca4e3cd7c72fb97b35bfd8e4" //generated by "" ), .target ( name: "SentrySwiftUI", dependencies: ["Sentry", "SentryInternal"], diff --git a/scripts/update-package-sha.sh b/scripts/update-package-sha.sh index c255626bbe4..94fb3987b05 100755 --- a/scripts/update-package-sha.sh +++ b/scripts/update-package-sha.sh @@ -4,7 +4,7 @@ set -euo pipefail GITHUB_BRANCH="${1}" NEW_CHECKSUM=$(shasum -a 256 ${2} | awk '{print $1}') -sed -i '' "s/checksum: \".*\"/checksum: \"$NEW_CHECKSUM\"/" "Package.swift" +sed -i '' "s/checksum: \".*\" \/\/generated by \".*\"/checksum: \"$NEW_CHECKSUM\" \/\/generated by \"${3}\"/" "Package.swift" echo "Updating Package.swift framework SHA" git config --global user.email "bot+github-bot@sentry.io" diff --git a/scripts/currentversion.sh b/scripts/xcframework-generated-run.sh similarity index 100% rename from scripts/currentversion.sh rename to scripts/xcframework-generated-run.sh From d0afa5972dc7db121aeee1fc1999d61cdfb99ebe Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 26 Feb 2024 12:06:31 +0100 Subject: [PATCH 31/62] Update xcframework-generated-run.sh --- scripts/xcframework-generated-run.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/scripts/xcframework-generated-run.sh b/scripts/xcframework-generated-run.sh index 1b3098e73bf..4598c6212d1 100755 --- a/scripts/xcframework-generated-run.sh +++ b/scripts/xcframework-generated-run.sh @@ -1,10 +1,2 @@ #!/bin/bash - -# Read the line containing the version from the file -version_line=$(grep 's.version' Sentry.podspec) - -# Extract the version using awk -version=$(echo "$version_line" | awk -F'"' '{print $2}') - -# Print the version -echo "$version" +grep "generated by" "Package.swift" | sed 's/.*generated by \"\(.*\)\"/\1/' From a6246e3141cd3077cb3acb58fc6da8e43c006abe Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 26 Feb 2024 12:14:28 +0100 Subject: [PATCH 32/62] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 624b2b7d3ee..4a765600786 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -109,7 +109,7 @@ jobs: - name: Check XCFramework if: startsWith(github.ref, 'refs/heads/release/') - ls -R Carthage + run: ls -R Carthage - name: Build xcframework if: startsWith(github.ref, 'refs/heads/release/') == false From 2c4323f15aeabd23e2f00ed1d1f7553ee33750bf Mon Sep 17 00:00:00 2001 From: Sentry Github Bot Date: Mon, 26 Feb 2024 11:20:48 +0000 Subject: [PATCH 33/62] Update Package.swift framework SHA --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 3fab1ed1a76..769d05842eb 100644 --- a/Package.swift +++ b/Package.swift @@ -12,7 +12,7 @@ let package = Package( .binaryTarget( name: "Sentry", url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.21.0-beta.0/Sentry.xcframework.zip", - checksum: "7af812e2f4292321d7cc7dc0d672b5fb435e82baca4e3cd7c72fb97b35bfd8e4" //generated by "" + checksum: "185ad7b9b9f8ff4811c8bcf511e0bdd3071bade8bdea945905e58ee6a169776d" //generated by "8047964629" ), .target ( name: "SentrySwiftUI", dependencies: ["Sentry", "SentryInternal"], From 3290d9182287dece28ecf5b46c5986fa27ea5c39 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 26 Feb 2024 13:10:53 +0100 Subject: [PATCH 34/62] fixing artefact check --- .github/workflows/release.yml | 15 ++++++++++----- scripts/bump.sh | 3 +++ scripts/update-package-sha.sh | 17 ++++++++--------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a309e101e8e..5e2b91238ad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,16 +22,14 @@ jobs: - name: 'Generate XCFramework' run: | ./scripts/ci-select-xcode.sh 15.2 - make build-xcframework + cp README.md Carthage/Sentry.xcframework.zip +# make build-xcframework - uses: actions/upload-artifact@v4 with: name: Sentry.xcframework.zip path: Carthage/Sentry.xcframework.zip overwrite: true - - - name: 'Update Package.swift' - run: ./scripts/update-package-sha.sh "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" ${{ github.workspace }}/Carthage/Sentry.xcframework.zip ${{ github.run_id }} job_release: runs-on: ubuntu-latest @@ -43,7 +41,14 @@ jobs: with: token: ${{ secrets.GH_RELEASE_PAT }} fetch-depth: 0 - + + - uses: actions/download-artifact@v4 + with: + name: Sentry.xcframework.zip + path: Carthage/ + + - run: export GITHUB_RUN_ID=${{ github.run_id }} + - name: Prepare release uses: getsentry/action-prepare-release@v1 env: diff --git a/scripts/bump.sh b/scripts/bump.sh index f53406d37dc..55d4f11bd46 100755 --- a/scripts/bump.sh +++ b/scripts/bump.sh @@ -11,3 +11,6 @@ cd Utils/VersionBump && swift build cd $SCRIPT_DIR/.. echo "--> Bumping version to ${OLD_VERSION} ${NEW_VERSION}" ./Utils/VersionBump/.build/debug/VersionBump ${NEW_VERSION} + +./scripts/update-package.sha.sh + diff --git a/scripts/update-package-sha.sh b/scripts/update-package-sha.sh index 94fb3987b05..6b32eb56328 100755 --- a/scripts/update-package-sha.sh +++ b/scripts/update-package-sha.sh @@ -1,14 +1,13 @@ #!/bin/bash set -euo pipefail -GITHUB_BRANCH="${1}" -NEW_CHECKSUM=$(shasum -a 256 ${2} | awk '{print $1}') +NEW_CHECKSUM=$(shasum -a 256 Carthage/Sentry.xcframework.zip | awk '{print $1}') -sed -i '' "s/checksum: \".*\" \/\/generated by \".*\"/checksum: \"$NEW_CHECKSUM\" \/\/generated by \"${3}\"/" "Package.swift" +sed -i '' "s/checksum: \".*\" \/\/generated by \".*\"/checksum: \"$NEW_CHECKSUM\" \/\/generated by \"$GITHUB_RUN_ID\"/" "Package.swift" -echo "Updating Package.swift framework SHA" -git config --global user.email "bot+github-bot@sentry.io" -git config --global user.name "Sentry Github Bot" -git add . -git commit -m "Update Package.swift framework SHA" -git push origin $GITHUB_BRANCH +#echo "Updating Package.swift framework SHA" +#git config --global user.email "bot+github-bot@sentry.io" +#git config --global user.name "Sentry Github Bot" +#git add . +#git commit -m "Update Package.swift framework SHA" +#git push origin $GITHUB_BRANCH From 7cfe9a41ccc7b6f66289d281b320b33a24454735 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 26 Feb 2024 13:28:58 +0100 Subject: [PATCH 35/62] Update release.yml --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e2b91238ad..112bef07564 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,7 @@ jobs: - name: 'Generate XCFramework' run: | ./scripts/ci-select-xcode.sh 15.2 + mkdir Carthage cp README.md Carthage/Sentry.xcframework.zip # make build-xcframework From 5c89a2b157e513a2a156a917e64f75117b61258f Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 26 Feb 2024 13:36:44 +0100 Subject: [PATCH 36/62] Update bump.sh --- scripts/bump.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bump.sh b/scripts/bump.sh index 55d4f11bd46..5e223ebed68 100755 --- a/scripts/bump.sh +++ b/scripts/bump.sh @@ -12,5 +12,5 @@ cd $SCRIPT_DIR/.. echo "--> Bumping version to ${OLD_VERSION} ${NEW_VERSION}" ./Utils/VersionBump/.build/debug/VersionBump ${NEW_VERSION} -./scripts/update-package.sha.sh +./scripts/update-package-sha.sh From ebef537d51076fc61d61235dd361969631abcb33 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 26 Feb 2024 13:43:18 +0100 Subject: [PATCH 37/62] Update update-package-sha.sh --- scripts/update-package-sha.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/update-package-sha.sh b/scripts/update-package-sha.sh index 6b32eb56328..607be99de46 100755 --- a/scripts/update-package-sha.sh +++ b/scripts/update-package-sha.sh @@ -3,6 +3,8 @@ set -euo pipefail NEW_CHECKSUM=$(shasum -a 256 Carthage/Sentry.xcframework.zip | awk '{print $1}') +pwd + sed -i '' "s/checksum: \".*\" \/\/generated by \".*\"/checksum: \"$NEW_CHECKSUM\" \/\/generated by \"$GITHUB_RUN_ID\"/" "Package.swift" #echo "Updating Package.swift framework SHA" From dc24d43e19b169c94eddccfd595a7b2157c6c020 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 26 Feb 2024 13:56:37 +0100 Subject: [PATCH 38/62] Update update-package-sha.sh --- scripts/update-package-sha.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/update-package-sha.sh b/scripts/update-package-sha.sh index 607be99de46..dad3d93e1b5 100755 --- a/scripts/update-package-sha.sh +++ b/scripts/update-package-sha.sh @@ -3,9 +3,7 @@ set -euo pipefail NEW_CHECKSUM=$(shasum -a 256 Carthage/Sentry.xcframework.zip | awk '{print $1}') -pwd - -sed -i '' "s/checksum: \".*\" \/\/generated by \".*\"/checksum: \"$NEW_CHECKSUM\" \/\/generated by \"$GITHUB_RUN_ID\"/" "Package.swift" +sed -i "s/checksum: \".*\" \/\/generated by \".*\"/checksum: \"$NEW_CHECKSUM\" \/\/generated by \"$GITHUB_RUN_ID\"/" Package.swift #echo "Updating Package.swift framework SHA" #git config --global user.email "bot+github-bot@sentry.io" From f05bae542cb11bafe3f2e22855e4ae457cadcf8e Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 26 Feb 2024 14:19:05 +0100 Subject: [PATCH 39/62] Update update-package-sha.sh --- scripts/update-package-sha.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/scripts/update-package-sha.sh b/scripts/update-package-sha.sh index dad3d93e1b5..706fda7e3fb 100755 --- a/scripts/update-package-sha.sh +++ b/scripts/update-package-sha.sh @@ -3,11 +3,4 @@ set -euo pipefail NEW_CHECKSUM=$(shasum -a 256 Carthage/Sentry.xcframework.zip | awk '{print $1}') -sed -i "s/checksum: \".*\" \/\/generated by \".*\"/checksum: \"$NEW_CHECKSUM\" \/\/generated by \"$GITHUB_RUN_ID\"/" Package.swift - -#echo "Updating Package.swift framework SHA" -#git config --global user.email "bot+github-bot@sentry.io" -#git config --global user.name "Sentry Github Bot" -#git add . -#git commit -m "Update Package.swift framework SHA" -#git push origin $GITHUB_BRANCH +sed -i "s/checksum: \".*\" \/\/generated by \".*\"/checksum: \"$NEW_CHECKSUM\" \/\/generated by \"$GITHUB_RUN_ID\"/" Package.swifts From f2369e9539a1c170cde51fc2d478f778108f919e Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 26 Feb 2024 14:24:38 +0100 Subject: [PATCH 40/62] Update update-package-sha.sh --- scripts/update-package-sha.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-package-sha.sh b/scripts/update-package-sha.sh index 706fda7e3fb..404137ca98b 100755 --- a/scripts/update-package-sha.sh +++ b/scripts/update-package-sha.sh @@ -3,4 +3,4 @@ set -euo pipefail NEW_CHECKSUM=$(shasum -a 256 Carthage/Sentry.xcframework.zip | awk '{print $1}') -sed -i "s/checksum: \".*\" \/\/generated by \".*\"/checksum: \"$NEW_CHECKSUM\" \/\/generated by \"$GITHUB_RUN_ID\"/" Package.swifts +sed -i "s/checksum: \".*\" \/\/generated by \".*\"/checksum: \"$NEW_CHECKSUM\" \/\/generated by \"$GITHUB_RUN_ID\"/" Package.swift From aa2e76514b14796c52088f65b125fcc3de48286c Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 26 Feb 2024 14:42:12 +0100 Subject: [PATCH 41/62] SwiftUI too --- .github/workflows/build.yml | 9 +++++++-- .github/workflows/release.yml | 15 ++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a765600786..20f3743c907 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -102,14 +102,19 @@ jobs: - uses: actions/download-artifact@v4 if: startsWith(github.ref, 'refs/heads/release/') with: - name: Sentry.xcframework.zip + name: xcframeworks.zip path: Carthage/ github-token: ${{ secrets.GITHUB_TOKEN }} run-id: ${{ env.FRAMEWORKRUNID }} - name: Check XCFramework if: startsWith(github.ref, 'refs/heads/release/') - run: ls -R Carthage + run: | + ls -R Carthage + if [ ! -f Carthage/Sentry.xcframework.zip ]; then + echo "XCFramework is not available" + exit 1 + fi - name: Build xcframework if: startsWith(github.ref, 'refs/heads/release/') == false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 112bef07564..7f99bf8f44d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,15 +21,15 @@ jobs: - name: 'Generate XCFramework' run: | - ./scripts/ci-select-xcode.sh 15.2 - mkdir Carthage - cp README.md Carthage/Sentry.xcframework.zip -# make build-xcframework + ./scripts/ci-select-xcode.sh 15.2 + make build-xcframework - uses: actions/upload-artifact@v4 with: - name: Sentry.xcframework.zip - path: Carthage/Sentry.xcframework.zip + name: xcframeworks.zip + path: | + Carthage/Sentry.xcframework.zip + Carthage/SentrySwiftUI.xcframework.zip overwrite: true job_release: @@ -45,9 +45,10 @@ jobs: - uses: actions/download-artifact@v4 with: - name: Sentry.xcframework.zip + name: xcframeworks.zip path: Carthage/ + #update-package-sha.sh uses this env variable to update Package.swift - run: export GITHUB_RUN_ID=${{ github.run_id }} - name: Prepare release From 914d06903ad6768bc4d9ba87207700d27b441940 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 26 Feb 2024 14:49:07 +0100 Subject: [PATCH 42/62] Apply suggestions from code review --- Sources/Sentry/include/SentrySwift.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Sources/Sentry/include/SentrySwift.h b/Sources/Sentry/include/SentrySwift.h index bc2b4a1fbe4..7a1392671d6 100644 --- a/Sources/Sentry/include/SentrySwift.h +++ b/Sources/Sentry/include/SentrySwift.h @@ -1,9 +1,7 @@ #ifndef SentrySwift_h #define SentrySwift_h -#if SWIFT_PACKAGE -@import SentryPrivate; -#elif __has_include("Sentry-Swift.h") +#if __has_include("Sentry-Swift.h") # import "Sentry-Swift.h" #else # import "Sentry/Sentry-Swift.h" From a67aab714c22279286405fc6b4975434066ac1af Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 26 Feb 2024 16:26:15 +0100 Subject: [PATCH 43/62] restore perf tests --- .github/workflows/benchmarking.yml | 2 + .../MetricKit/SentryMXCallStackTree.swift | 40 +-- Sources/Swift/MetricKit/SentryMXManager.swift | 12 +- Sources/Swift/SwiftDescriptor.swift | 6 +- Sources/Swift/Tools/HTTPHeaderSanitizer.swift | 4 +- Sources/Swift/Tools/UrlSanitized.swift | 14 +- Tests/Perf/metrics-test.yml | 14 + .../test-app-plain.xcodeproj/project.pbxproj | 257 ++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 93 ++++++ .../Assets.xcassets/Contents.json | 6 + .../test-app-plain/ContentView.swift | 14 + .../Preview Assets.xcassets/Contents.json | 6 + .../test-app-plain/test_app_plainApp.swift | 10 + .../test-app-sentry.xcodeproj/project.pbxproj | 286 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 93 ++++++ .../Assets.xcassets/Contents.json | 6 + .../test-app-sentry/ContentView.swift | 14 + .../Preview Assets.xcassets/Contents.json | 6 + .../test-app-sentry/test_app_sentryApp.swift | 18 ++ .../SentryMXCallStackTreeTests.swift | 1 + .../MetricKit/SentryMXManagerTests.swift | 1 + .../SentryMetricKitIntegrationTests.swift | 2 +- ...iewControllerPerformanceTrackerTests.swift | 1 + ...SentryUIViewControllerSwizzlingTests.swift | 2 +- Tests/SentryTests/SwiftDescriptorTests.swift | 1 + Tests/SentryTests/UrlSanitizedTests.swift | 1 + 32 files changed, 922 insertions(+), 40 deletions(-) create mode 100644 Tests/Perf/metrics-test.yml create mode 100644 Tests/Perf/test-app-plain/test-app-plain.xcodeproj/project.pbxproj create mode 100644 Tests/Perf/test-app-plain/test-app-plain.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Tests/Perf/test-app-plain/test-app-plain.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/Contents.json create mode 100644 Tests/Perf/test-app-plain/test-app-plain/ContentView.swift create mode 100644 Tests/Perf/test-app-plain/test-app-plain/Preview Content/Preview Assets.xcassets/Contents.json create mode 100644 Tests/Perf/test-app-plain/test-app-plain/test_app_plainApp.swift create mode 100644 Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.pbxproj create mode 100644 Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/Contents.json create mode 100644 Tests/Perf/test-app-sentry/test-app-sentry/ContentView.swift create mode 100644 Tests/Perf/test-app-sentry/test-app-sentry/Preview Content/Preview Assets.xcassets/Contents.json create mode 100644 Tests/Perf/test-app-sentry/test-app-sentry/test_app_sentryApp.swift diff --git a/.github/workflows/benchmarking.yml b/.github/workflows/benchmarking.yml index a53bb9e35ee..bd3680e3952 100644 --- a/.github/workflows/benchmarking.yml +++ b/.github/workflows/benchmarking.yml @@ -126,6 +126,8 @@ jobs: MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }} MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} + - name: Build Framework + run: make build-xcframework - name: Build test app with sentry run: bundle exec fastlane build_perf_test_app_sentry env: diff --git a/Sources/Swift/MetricKit/SentryMXCallStackTree.swift b/Sources/Swift/MetricKit/SentryMXCallStackTree.swift index d764a08609f..850d4f718fb 100644 --- a/Sources/Swift/MetricKit/SentryMXCallStackTree.swift +++ b/Sources/Swift/MetricKit/SentryMXCallStackTree.swift @@ -5,47 +5,47 @@ import Foundation * JSON specification of MXCallStackTree can be found here https://developer.apple.com/documentation/metrickit/mxcallstacktree/3552293-jsonrepresentation */ @objcMembers -public class SentryMXCallStackTree: NSObject, Codable { +class SentryMXCallStackTree: NSObject, Codable { - public let callStacks: [SentryMXCallStack] - public let callStackPerThread: Bool + let callStacks: [SentryMXCallStack] + let callStackPerThread: Bool - public init(callStacks: [SentryMXCallStack], callStackPerThread: Bool) { + init(callStacks: [SentryMXCallStack], callStackPerThread: Bool) { self.callStacks = callStacks self.callStackPerThread = callStackPerThread } - public static func from(data: Data) throws -> SentryMXCallStackTree { + static func from(data: Data) throws -> SentryMXCallStackTree { return try JSONDecoder().decode(SentryMXCallStackTree.self, from: data) } } @objcMembers -public class SentryMXCallStack: NSObject, Codable { - public var threadAttributed: Bool? - public var callStackRootFrames: [SentryMXFrame] +class SentryMXCallStack: NSObject, Codable { + var threadAttributed: Bool? + var callStackRootFrames: [SentryMXFrame] - public var flattenedRootFrames: [SentryMXFrame] { + var flattenedRootFrames: [SentryMXFrame] { return callStackRootFrames.flatMap { [$0] + $0.frames } } - public init(threadAttributed: Bool, rootFrames: [SentryMXFrame]) { + init(threadAttributed: Bool, rootFrames: [SentryMXFrame]) { self.threadAttributed = threadAttributed self.callStackRootFrames = rootFrames } } @objcMembers -public class SentryMXFrame: NSObject, Codable { - public var binaryUUID: UUID - public var offsetIntoBinaryTextSegment: Int - public var binaryName: String? - public var address: UInt64 - public var subFrames: [SentryMXFrame]? +class SentryMXFrame: NSObject, Codable { + var binaryUUID: UUID + var offsetIntoBinaryTextSegment: Int + var binaryName: String? + var address: UInt64 + var subFrames: [SentryMXFrame]? - public var sampleCount: Int? + var sampleCount: Int? - public init(binaryUUID: UUID, offsetIntoBinaryTextSegment: Int, sampleCount: Int? = nil, binaryName: String? = nil, address: UInt64, subFrames: [SentryMXFrame]?) { + init(binaryUUID: UUID, offsetIntoBinaryTextSegment: Int, sampleCount: Int? = nil, binaryName: String? = nil, address: UInt64, subFrames: [SentryMXFrame]?) { self.binaryUUID = binaryUUID self.offsetIntoBinaryTextSegment = offsetIntoBinaryTextSegment self.sampleCount = sampleCount @@ -54,11 +54,11 @@ public class SentryMXFrame: NSObject, Codable { self.subFrames = subFrames } - public var frames: [SentryMXFrame] { + var frames: [SentryMXFrame] { return (subFrames?.flatMap { [$0] + $0.frames } ?? []) } - public var framesIncludingSelf: [SentryMXFrame] { + var framesIncludingSelf: [SentryMXFrame] { return [self] + frames } } diff --git a/Sources/Swift/MetricKit/SentryMXManager.swift b/Sources/Swift/MetricKit/SentryMXManager.swift index dad63645bc2..3a41087608e 100644 --- a/Sources/Swift/MetricKit/SentryMXManager.swift +++ b/Sources/Swift/MetricKit/SentryMXManager.swift @@ -12,7 +12,7 @@ import MetricKit @available(iOS 15.0, macOS 12.0, macCatalyst 15.0, *) @available(tvOS, unavailable) @available(watchOS, unavailable) -@objc public protocol SentryMXManagerDelegate { +@objc protocol SentryMXManagerDelegate { func didReceiveCrashDiagnostic(_ diagnostic: MXCrashDiagnostic, callStackTree: SentryMXCallStackTree, timeStampBegin: Date, timeStampEnd: Date) @@ -26,7 +26,7 @@ import MetricKit @available(iOS 15.0, macOS 12.0, macCatalyst 15.0, *) @available(tvOS, unavailable) @available(watchOS, unavailable) -@objcMembers public class SentryMXManager: NSObject, MXMetricManagerSubscriber { +@objcMembers class SentryMXManager: NSObject, MXMetricManagerSubscriber { let disableCrashDiagnostics: Bool @@ -34,19 +34,19 @@ import MetricKit self.disableCrashDiagnostics = disableCrashDiagnostics } - public weak var delegate: SentryMXManagerDelegate? + weak var delegate: SentryMXManagerDelegate? - public func receiveReports() { + func receiveReports() { let shared = MXMetricManager.shared shared.add(self) } - public func pauseReports() { + func pauseReports() { let shared = MXMetricManager.shared shared.remove(self) } - public func didReceive(_ payloads: [MXDiagnosticPayload]) { + func didReceive(_ payloads: [MXDiagnosticPayload]) { func actOn(callStackTree: MXCallStackTree, action: (SentryMXCallStackTree) -> Void) { guard let callStackTree = try? SentryMXCallStackTree.from(data: callStackTree.jsonRepresentation()) else { return diff --git a/Sources/Swift/SwiftDescriptor.swift b/Sources/Swift/SwiftDescriptor.swift index 32b440bf8fb..9c292a2f111 100644 --- a/Sources/Swift/SwiftDescriptor.swift +++ b/Sources/Swift/SwiftDescriptor.swift @@ -1,15 +1,15 @@ import Foundation @objc -public class SwiftDescriptor: NSObject { +class SwiftDescriptor: NSObject { @objc - public static func getObjectClassName(_ object: AnyObject) -> String { + static func getObjectClassName(_ object: AnyObject) -> String { return String(describing: type(of: object)) } @objc - public static func getSwiftErrorDescription(_ error: Error) -> String? { + static func getSwiftErrorDescription(_ error: Error) -> String? { return String(describing: error) } diff --git a/Sources/Swift/Tools/HTTPHeaderSanitizer.swift b/Sources/Swift/Tools/HTTPHeaderSanitizer.swift index 192238144f3..b78a96b0dd3 100644 --- a/Sources/Swift/Tools/HTTPHeaderSanitizer.swift +++ b/Sources/Swift/Tools/HTTPHeaderSanitizer.swift @@ -1,8 +1,8 @@ import Foundation @objcMembers -public class HTTPHeaderSanitizer: NSObject { - public static func sanitizeHeaders(_ headers: [String: String]) -> [String: String] { +class HTTPHeaderSanitizer: NSObject { + static func sanitizeHeaders(_ headers: [String: String]) -> [String: String] { let _securityHeaders = Set([ "X-FORWARDED-FOR", "AUTHORIZATION", "COOKIE", "SET-COOKIE", "X-API-KEY", "X-REAL-IP", "REMOTE-ADDR", "FORWARDED", "PROXY-AUTHORIZATION", "X-CSRF-TOKEN", "X-CSRFTOKEN", diff --git a/Sources/Swift/Tools/UrlSanitized.swift b/Sources/Swift/Tools/UrlSanitized.swift index d84ec566379..705ebe68b73 100644 --- a/Sources/Swift/Tools/UrlSanitized.swift +++ b/Sources/Swift/Tools/UrlSanitized.swift @@ -1,15 +1,15 @@ import Foundation @objcMembers -public class UrlSanitized: NSObject { - public static let SENSITIVE_DATA_SUBSTITUTE = "[Filtered]" +class UrlSanitized: NSObject { + static let SENSITIVE_DATA_SUBSTITUTE = "[Filtered]" private var components: URLComponents? - public var query: String? { components?.query } - public var queryItems: [URLQueryItem]? { components?.queryItems } - public var fragment: String? { components?.fragment } + var query: String? { components?.query } + var queryItems: [URLQueryItem]? { components?.queryItems } + var fragment: String? { components?.fragment } - public init(URL url: URL) { + init(URL url: URL) { components = URLComponents(url: url, resolvingAgainstBaseURL: false) if components?.user != nil { @@ -21,7 +21,7 @@ public class UrlSanitized: NSObject { } } - public var sanitizedUrl: String? { + var sanitizedUrl: String? { guard var result = self.components?.string else { return nil } if let end = result.firstIndex(of: "?") ?? result.firstIndex(of: "#") { result = String(result[result.startIndex.. + + + + diff --git a/Tests/Perf/test-app-plain/test-app-plain.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Tests/Perf/test-app-plain/test-app-plain.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000000..18d981003d6 --- /dev/null +++ b/Tests/Perf/test-app-plain/test-app-plain.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/AccentColor.colorset/Contents.json b/Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 00000000000..eb878970081 --- /dev/null +++ b/Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/AppIcon.appiconset/Contents.json b/Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000000..5a3257a7d00 --- /dev/null +++ b/Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,93 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/Contents.json b/Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/Contents.json new file mode 100644 index 00000000000..73c00596a7f --- /dev/null +++ b/Tests/Perf/test-app-plain/test-app-plain/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tests/Perf/test-app-plain/test-app-plain/ContentView.swift b/Tests/Perf/test-app-plain/test-app-plain/ContentView.swift new file mode 100644 index 00000000000..0ec9f8a0cf9 --- /dev/null +++ b/Tests/Perf/test-app-plain/test-app-plain/ContentView.swift @@ -0,0 +1,14 @@ +import SwiftUI + +struct ContentView: View { + var body: some View { + Text("Hello, world!") + .padding() + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/Tests/Perf/test-app-plain/test-app-plain/Preview Content/Preview Assets.xcassets/Contents.json b/Tests/Perf/test-app-plain/test-app-plain/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 00000000000..73c00596a7f --- /dev/null +++ b/Tests/Perf/test-app-plain/test-app-plain/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tests/Perf/test-app-plain/test-app-plain/test_app_plainApp.swift b/Tests/Perf/test-app-plain/test-app-plain/test_app_plainApp.swift new file mode 100644 index 00000000000..20a926a7c8b --- /dev/null +++ b/Tests/Perf/test-app-plain/test-app-plain/test_app_plainApp.swift @@ -0,0 +1,10 @@ +import SwiftUI + +@main +struct test_app_plainApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.pbxproj b/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.pbxproj new file mode 100644 index 00000000000..e3461a18e34 --- /dev/null +++ b/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.pbxproj @@ -0,0 +1,286 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 55; + objects = { + +/* Begin PBXBuildFile section */ + 2C101B6E28A2956900D320BC /* test_app_sentryApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C101B6D28A2956900D320BC /* test_app_sentryApp.swift */; }; + 2C101B7028A2956900D320BC /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C101B6F28A2956900D320BC /* ContentView.swift */; }; + 2C101B7228A2956A00D320BC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2C101B7128A2956A00D320BC /* Assets.xcassets */; }; + 2C101B7528A2956A00D320BC /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2C101B7428A2956A00D320BC /* Preview Assets.xcassets */; }; + D88D25BD2B8CE4270073C3D5 /* Sentry.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D88D25BC2B8CE4270073C3D5 /* Sentry.xcframework */; }; + D88D25BE2B8CE4270073C3D5 /* Sentry.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D88D25BC2B8CE4270073C3D5 /* Sentry.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + D88D25BF2B8CE4270073C3D5 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + D88D25BE2B8CE4270073C3D5 /* Sentry.xcframework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 2C101B6A28A2956900D320BC /* test-app-sentry.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "test-app-sentry.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 2C101B6D28A2956900D320BC /* test_app_sentryApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = test_app_sentryApp.swift; sourceTree = ""; }; + 2C101B6F28A2956900D320BC /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 2C101B7128A2956A00D320BC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2C101B7428A2956A00D320BC /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + D88D25BC2B8CE4270073C3D5 /* Sentry.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Sentry.xcframework; path = ../../../Carthage/Build/Sentry.xcframework; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2C101B6728A2956900D320BC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D88D25BD2B8CE4270073C3D5 /* Sentry.xcframework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 2C101B6128A2956900D320BC = { + isa = PBXGroup; + children = ( + 2C101B6C28A2956900D320BC /* test-app-sentry */, + 2C101B6B28A2956900D320BC /* Products */, + 2C101B7F28A2EF1B00D320BC /* Frameworks */, + ); + sourceTree = ""; + }; + 2C101B6B28A2956900D320BC /* Products */ = { + isa = PBXGroup; + children = ( + 2C101B6A28A2956900D320BC /* test-app-sentry.app */, + ); + name = Products; + sourceTree = ""; + }; + 2C101B6C28A2956900D320BC /* test-app-sentry */ = { + isa = PBXGroup; + children = ( + 2C101B6D28A2956900D320BC /* test_app_sentryApp.swift */, + 2C101B6F28A2956900D320BC /* ContentView.swift */, + 2C101B7128A2956A00D320BC /* Assets.xcassets */, + 2C101B7328A2956A00D320BC /* Preview Content */, + ); + path = "test-app-sentry"; + sourceTree = ""; + }; + 2C101B7328A2956A00D320BC /* Preview Content */ = { + isa = PBXGroup; + children = ( + 2C101B7428A2956A00D320BC /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 2C101B7F28A2EF1B00D320BC /* Frameworks */ = { + isa = PBXGroup; + children = ( + D88D25BC2B8CE4270073C3D5 /* Sentry.xcframework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2C101B6928A2956900D320BC /* test-app-sentry */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2C101B7828A2956A00D320BC /* Build configuration list for PBXNativeTarget "test-app-sentry" */; + buildPhases = ( + 2C101B6628A2956900D320BC /* Sources */, + 2C101B6728A2956900D320BC /* Frameworks */, + 2C101B6828A2956900D320BC /* Resources */, + D88D25BF2B8CE4270073C3D5 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "test-app-sentry"; + packageProductDependencies = ( + ); + productName = "test-app-sentry"; + productReference = 2C101B6A28A2956900D320BC /* test-app-sentry.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2C101B6228A2956900D320BC /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1340; + LastUpgradeCheck = 1340; + TargetAttributes = { + 2C101B6928A2956900D320BC = { + CreatedOnToolsVersion = 13.4; + }; + }; + }; + buildConfigurationList = 2C101B6528A2956900D320BC /* Build configuration list for PBXProject "test-app-sentry" */; + compatibilityVersion = "Xcode 13.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 2C101B6128A2956900D320BC; + productRefGroup = 2C101B6B28A2956900D320BC /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2C101B6928A2956900D320BC /* test-app-sentry */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2C101B6828A2956900D320BC /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2C101B7528A2956A00D320BC /* Preview Assets.xcassets in Resources */, + 2C101B7228A2956A00D320BC /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2C101B6628A2956900D320BC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2C101B7028A2956900D320BC /* ContentView.swift in Sources */, + 2C101B6E28A2956900D320BC /* test_app_sentryApp.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2C101B7728A2956A00D320BC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = 97JCY7859U; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2C101B7A28A2956A00D320BC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Manual; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"test-app-sentry/Preview Content\""; + DEVELOPMENT_TEAM = 97JCY7859U; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.cocoa.perf-test-app-sentry"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = "match Development io.sentry.cocoa.perf-test-app-sentry"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2C101B6528A2956900D320BC /* Build configuration list for PBXProject "test-app-sentry" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2C101B7728A2956A00D320BC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2C101B7828A2956A00D320BC /* Build configuration list for PBXNativeTarget "test-app-sentry" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2C101B7A28A2956A00D320BC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2C101B6228A2956900D320BC /* Project object */; +} diff --git a/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000000..919434a6254 --- /dev/null +++ b/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000000..18d981003d6 --- /dev/null +++ b/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/AccentColor.colorset/Contents.json b/Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 00000000000..eb878970081 --- /dev/null +++ b/Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/AppIcon.appiconset/Contents.json b/Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000000..5a3257a7d00 --- /dev/null +++ b/Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,93 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/Contents.json b/Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/Contents.json new file mode 100644 index 00000000000..73c00596a7f --- /dev/null +++ b/Tests/Perf/test-app-sentry/test-app-sentry/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tests/Perf/test-app-sentry/test-app-sentry/ContentView.swift b/Tests/Perf/test-app-sentry/test-app-sentry/ContentView.swift new file mode 100644 index 00000000000..0ec9f8a0cf9 --- /dev/null +++ b/Tests/Perf/test-app-sentry/test-app-sentry/ContentView.swift @@ -0,0 +1,14 @@ +import SwiftUI + +struct ContentView: View { + var body: some View { + Text("Hello, world!") + .padding() + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/Tests/Perf/test-app-sentry/test-app-sentry/Preview Content/Preview Assets.xcassets/Contents.json b/Tests/Perf/test-app-sentry/test-app-sentry/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 00000000000..73c00596a7f --- /dev/null +++ b/Tests/Perf/test-app-sentry/test-app-sentry/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tests/Perf/test-app-sentry/test-app-sentry/test_app_sentryApp.swift b/Tests/Perf/test-app-sentry/test-app-sentry/test_app_sentryApp.swift new file mode 100644 index 00000000000..c36427544ac --- /dev/null +++ b/Tests/Perf/test-app-sentry/test-app-sentry/test_app_sentryApp.swift @@ -0,0 +1,18 @@ +import Sentry +import Sentry +import SwiftUI + +@main +struct test_app_sentryApp: App { + init() { + SentrySDK.start { options in + options.dsn = "https://a92d50327ac74b8b9aa4ea80eccfb267@o447951.ingest.sentry.io/5428557" + } + } + + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/Tests/SentryTests/Integrations/MetricKit/SentryMXCallStackTreeTests.swift b/Tests/SentryTests/Integrations/MetricKit/SentryMXCallStackTreeTests.swift index 8467fe9c36e..80337e31f3c 100644 --- a/Tests/SentryTests/Integrations/MetricKit/SentryMXCallStackTreeTests.swift +++ b/Tests/SentryTests/Integrations/MetricKit/SentryMXCallStackTreeTests.swift @@ -1,5 +1,6 @@ #if os(iOS) || os(macOS) import XCTest +@testable import Sentry /** * We need to check if MetricKit is available for compatibility on iOS 12 and below. As there are no compiler directives for iOS versions we use canImport diff --git a/Tests/SentryTests/Integrations/MetricKit/SentryMXManagerTests.swift b/Tests/SentryTests/Integrations/MetricKit/SentryMXManagerTests.swift index 1c53ca15cd6..3bd8598e1eb 100644 --- a/Tests/SentryTests/Integrations/MetricKit/SentryMXManagerTests.swift +++ b/Tests/SentryTests/Integrations/MetricKit/SentryMXManagerTests.swift @@ -1,6 +1,7 @@ import MetricKit import SentryTestUtils import XCTest +@testable import Sentry #if os(iOS) || os(macOS) diff --git a/Tests/SentryTests/Integrations/MetricKit/SentryMetricKitIntegrationTests.swift b/Tests/SentryTests/Integrations/MetricKit/SentryMetricKitIntegrationTests.swift index a9375325026..4ccb58a361a 100644 --- a/Tests/SentryTests/Integrations/MetricKit/SentryMetricKitIntegrationTests.swift +++ b/Tests/SentryTests/Integrations/MetricKit/SentryMetricKitIntegrationTests.swift @@ -1,4 +1,4 @@ -import Sentry +@testable import Sentry import SentryTestUtils import XCTest diff --git a/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerPerformanceTrackerTests.swift b/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerPerformanceTrackerTests.swift index 6262eb35479..10d40d03954 100644 --- a/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerPerformanceTrackerTests.swift +++ b/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerPerformanceTrackerTests.swift @@ -4,6 +4,7 @@ import Nimble import ObjectiveC import SentryTestUtils import XCTest +@testable import Sentry class TestViewController: UIViewController { } diff --git a/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerSwizzlingTests.swift b/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerSwizzlingTests.swift index 4c86d0119bf..4107efb5e05 100644 --- a/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerSwizzlingTests.swift +++ b/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerSwizzlingTests.swift @@ -1,6 +1,6 @@ #if os(iOS) || os(tvOS) || targetEnvironment(macCatalyst) -import Sentry +@testable import Sentry import SentryTestUtils import SentryTestUtilsDynamic import XCTest diff --git a/Tests/SentryTests/SwiftDescriptorTests.swift b/Tests/SentryTests/SwiftDescriptorTests.swift index 244db6a95bf..8862cf0e0d2 100644 --- a/Tests/SentryTests/SwiftDescriptorTests.swift +++ b/Tests/SentryTests/SwiftDescriptorTests.swift @@ -1,4 +1,5 @@ import XCTest +@testable import Sentry class SwiftDescriptorTests: XCTestCase { diff --git a/Tests/SentryTests/UrlSanitizedTests.swift b/Tests/SentryTests/UrlSanitizedTests.swift index b027b5bf00a..e202d37805e 100644 --- a/Tests/SentryTests/UrlSanitizedTests.swift +++ b/Tests/SentryTests/UrlSanitizedTests.swift @@ -1,5 +1,6 @@ import Foundation import XCTest +@testable import Sentry class UrlSanitizedTests: XCTestCase { From 2bd640f93e3b67a832fe6fcaedb5b80a6a8e77d6 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 26 Feb 2024 16:33:01 +0100 Subject: [PATCH 44/62] format --- .../Integrations/MetricKit/SentryMXCallStackTreeTests.swift | 2 +- .../Integrations/MetricKit/SentryMXManagerTests.swift | 2 +- .../SentryUIViewControllerPerformanceTrackerTests.swift | 2 +- Tests/SentryTests/SwiftDescriptorTests.swift | 2 +- Tests/SentryTests/UrlSanitizedTests.swift | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Tests/SentryTests/Integrations/MetricKit/SentryMXCallStackTreeTests.swift b/Tests/SentryTests/Integrations/MetricKit/SentryMXCallStackTreeTests.swift index 80337e31f3c..6bde794a652 100644 --- a/Tests/SentryTests/Integrations/MetricKit/SentryMXCallStackTreeTests.swift +++ b/Tests/SentryTests/Integrations/MetricKit/SentryMXCallStackTreeTests.swift @@ -1,6 +1,6 @@ #if os(iOS) || os(macOS) -import XCTest @testable import Sentry +import XCTest /** * We need to check if MetricKit is available for compatibility on iOS 12 and below. As there are no compiler directives for iOS versions we use canImport diff --git a/Tests/SentryTests/Integrations/MetricKit/SentryMXManagerTests.swift b/Tests/SentryTests/Integrations/MetricKit/SentryMXManagerTests.swift index 3bd8598e1eb..d8cf62aa52a 100644 --- a/Tests/SentryTests/Integrations/MetricKit/SentryMXManagerTests.swift +++ b/Tests/SentryTests/Integrations/MetricKit/SentryMXManagerTests.swift @@ -1,7 +1,7 @@ import MetricKit +@testable import Sentry import SentryTestUtils import XCTest -@testable import Sentry #if os(iOS) || os(macOS) diff --git a/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerPerformanceTrackerTests.swift b/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerPerformanceTrackerTests.swift index 10d40d03954..b0a636ae788 100644 --- a/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerPerformanceTrackerTests.swift +++ b/Tests/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerPerformanceTrackerTests.swift @@ -2,9 +2,9 @@ import Nimble import ObjectiveC +@testable import Sentry import SentryTestUtils import XCTest -@testable import Sentry class TestViewController: UIViewController { } diff --git a/Tests/SentryTests/SwiftDescriptorTests.swift b/Tests/SentryTests/SwiftDescriptorTests.swift index 8862cf0e0d2..2e6f5a08127 100644 --- a/Tests/SentryTests/SwiftDescriptorTests.swift +++ b/Tests/SentryTests/SwiftDescriptorTests.swift @@ -1,5 +1,5 @@ -import XCTest @testable import Sentry +import XCTest class SwiftDescriptorTests: XCTestCase { diff --git a/Tests/SentryTests/UrlSanitizedTests.swift b/Tests/SentryTests/UrlSanitizedTests.swift index e202d37805e..2d46b7b5c30 100644 --- a/Tests/SentryTests/UrlSanitizedTests.swift +++ b/Tests/SentryTests/UrlSanitizedTests.swift @@ -1,6 +1,6 @@ import Foundation -import XCTest @testable import Sentry +import XCTest class UrlSanitizedTests: XCTestCase { From 2f1a880a44bae808c92541a6d3160a4504fdbf68 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Tue, 27 Feb 2024 09:38:42 +0100 Subject: [PATCH 45/62] use a file for runid --- .github/last-release-runid | 1 + Package.swift | 2 +- scripts/update-package-sha.sh | 10 +++++++++- scripts/xcframework-generated-run.sh | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 .github/last-release-runid diff --git a/.github/last-release-runid b/.github/last-release-runid new file mode 100644 index 00000000000..48082f72f08 --- /dev/null +++ b/.github/last-release-runid @@ -0,0 +1 @@ +12 diff --git a/Package.swift b/Package.swift index 769d05842eb..0c73f4c9dca 100644 --- a/Package.swift +++ b/Package.swift @@ -12,7 +12,7 @@ let package = Package( .binaryTarget( name: "Sentry", url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.21.0-beta.0/Sentry.xcframework.zip", - checksum: "185ad7b9b9f8ff4811c8bcf511e0bdd3071bade8bdea945905e58ee6a169776d" //generated by "8047964629" + checksum: "f718d2cec8bf47a5c66248658ab25743ef7b1a658004f3467e42f4cd3610e56f" ), .target ( name: "SentrySwiftUI", dependencies: ["Sentry", "SentryInternal"], diff --git a/scripts/update-package-sha.sh b/scripts/update-package-sha.sh index 404137ca98b..14db52159de 100755 --- a/scripts/update-package-sha.sh +++ b/scripts/update-package-sha.sh @@ -3,4 +3,12 @@ set -euo pipefail NEW_CHECKSUM=$(shasum -a 256 Carthage/Sentry.xcframework.zip | awk '{print $1}') -sed -i "s/checksum: \".*\" \/\/generated by \".*\"/checksum: \"$NEW_CHECKSUM\" \/\/generated by \"$GITHUB_RUN_ID\"/" Package.swift +os=$(uname) + +if [ "$os" == "Linux" ]; then + sed -i "s/checksum: \".*\"/checksum: \"$NEW_CHECKSUM\"/" Package.swift +else + sed -i "" "s/checksum: \".*\"/checksum: \"$NEW_CHECKSUM\"/" Package.swift +fi + +echo $GITHUB_RUN_ID > .github/last-release-runid diff --git a/scripts/xcframework-generated-run.sh b/scripts/xcframework-generated-run.sh index 4598c6212d1..731a022a033 100755 --- a/scripts/xcframework-generated-run.sh +++ b/scripts/xcframework-generated-run.sh @@ -1,2 +1,2 @@ #!/bin/bash -grep "generated by" "Package.swift" | sed 's/.*generated by \"\(.*\)\"/\1/' +cat .github/last-release-runid From 820b575d71b338cc2012585c74a52e65ae5445a9 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Tue, 27 Feb 2024 16:08:06 +0100 Subject: [PATCH 46/62] No Carthage --- Makefile | 7 +-- Package.swift | 21 ++++---- Sentry.xcodeproj/project.pbxproj | 52 ++++++++++++-------- Sources/Configuration/SentryPrivate.xcconfig | 3 -- Sources/Configuration/SentrySwiftUI.xcconfig | 1 + Sources/SentrySwiftUI/SentryTracedView.swift | 2 - Sources/SentrySwiftUI/module.modulemap | 4 ++ 7 files changed, 51 insertions(+), 39 deletions(-) delete mode 100644 Sources/Configuration/SentryPrivate.xcconfig create mode 100644 Sources/SentrySwiftUI/module.modulemap diff --git a/Makefile b/Makefile index d51a385091b..f92d73034cc 100644 --- a/Makefile +++ b/Makefile @@ -60,10 +60,11 @@ analyze: # For more info check out: https://github.com/Carthage/Carthage/releases/tag/0.38.0 build-xcframework: @echo "--> Carthage: creating Sentry xcframework" - carthage build --use-xcframeworks --no-skip-current --verbose > build-xcframework.log + ./scripts/build-xcframework.sh > build-xcframework.log # use ditto here to avoid clobbering symlinks which exist in macOS frameworks - ditto -c -k -X --rsrc --keepParent Carthage/Build/Sentry.xcframework Carthage/Sentry.xcframework.zip - ditto -c -k -X --rsrc --keepParent Carthage/Build/SentrySwiftUI.xcframework Carthage/SentrySwiftUI.xcframework.zip + ditto -c -k -X --rsrc --keepParent Carthage/Sentry.xcframework Carthage/Sentry.xcframework.zip + ditto -c -k -X --rsrc --keepParent Carthage/Sentry-Dynamic.xcframework Carthage/Sentry-Dynamic.xcframework.zip + ditto -c -k -X --rsrc --keepParent Carthage/SentrySwiftUI.xcframework Carthage/SentrySwiftUI.xcframework.zip build-xcframework-sample: ./scripts/create-carthage-json.sh diff --git a/Package.swift b/Package.swift index 0c73f4c9dca..d70976c3706 100644 --- a/Package.swift +++ b/Package.swift @@ -6,29 +6,28 @@ let package = Package( platforms: [.iOS(.v11), .macOS(.v10_13), .tvOS(.v11), .watchOS(.v4)], products: [ .library(name: "Sentry", targets: ["Sentry"]), - .library(name: "SentrySwiftUI", targets: ["SentrySwiftUI"]) + .library(name: "SentrySwiftUI", targets: ["Sentry","SentrySwiftUI"]) ], targets: [ .binaryTarget( name: "Sentry", - url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.21.0-beta.0/Sentry.xcframework.zip", - checksum: "f718d2cec8bf47a5c66248658ab25743ef7b1a658004f3467e42f4cd3610e56f" + url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.22.0-alpha.0/Sentry.xcframework.zip", + checksum: "86156301aee5c8774a8cd5c240286f914f6e7721aaac5a7c9d049ea613a4b730" ), .target ( name: "SentrySwiftUI", dependencies: ["Sentry", "SentryInternal"], - path: "Sources", - exclude: ["SentrySwiftUI/SentryInternal/"], - sources: [ - "SentrySwiftUI" + path: "Sources/SentrySwiftUI", + exclude: ["SentryInternal/", "module.modulemap"], + linkerSettings: [ + .linkedFramework("Sentry") ] ), - //SentryInternal is how we expose some internal Sentry SDK classes to SentrySwiftUI. .target( name: "SentryInternal", - path: "Sources", + path: "Sources/SentrySwiftUI", sources: [ - "SentrySwiftUI/SentryInternal/" + "SentryInternal/" ], - publicHeadersPath: "SentrySwiftUI/SentryInternal/" + publicHeadersPath: "SentryInternal/" ) ], cxxLanguageStandard: .cxx14 diff --git a/Sentry.xcodeproj/project.pbxproj b/Sentry.xcodeproj/project.pbxproj index a358706960c..b65a45ee4e6 100644 --- a/Sentry.xcodeproj/project.pbxproj +++ b/Sentry.xcodeproj/project.pbxproj @@ -1721,7 +1721,6 @@ D81A346B291AECC7005A27A9 /* PrivateSentrySDKOnly.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PrivateSentrySDKOnly.h; path = include/HybridPublic/PrivateSentrySDKOnly.h; sourceTree = ""; }; D81A349B291D0C0B005A27A9 /* Sentry.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Sentry.swift; sourceTree = ""; }; D81A349F291D5568005A27A9 /* SentryPrivate.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; path = SentryPrivate.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - D81A34A0291D5715005A27A9 /* SentryPrivate.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = SentryPrivate.xcconfig; sourceTree = ""; }; D81FDF10280EA0080045E0E4 /* SentryScreenShotTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryScreenShotTests.swift; sourceTree = ""; }; D8292D7A2A38AF04009872F7 /* HTTPHeaderSanitizer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HTTPHeaderSanitizer.swift; sourceTree = ""; }; D8292D7C2A39A027009872F7 /* UrlSanitizedTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UrlSanitizedTests.swift; sourceTree = ""; }; @@ -1769,6 +1768,7 @@ D88817D626D7149100BF2251 /* SentryTraceContext.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryTraceContext.m; sourceTree = ""; }; D88817D926D72AB800BF2251 /* SentryTraceContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryTraceContext.h; path = include/SentryTraceContext.h; sourceTree = ""; }; D88817DB26D72B7B00BF2251 /* SentryTraceStateTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryTraceStateTests.swift; sourceTree = ""; }; + D88D25E92B8E0BAC0073C3D5 /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = ""; }; D8918B212849FA6D00701F9A /* SentrySDKIntegrationTestsBase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySDKIntegrationTestsBase.swift; sourceTree = ""; }; D8AB40DA2806EC1900E5E9F7 /* SentryScreenshotIntegration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryScreenshotIntegration.h; path = include/SentryScreenshotIntegration.h; sourceTree = ""; }; D8ACE3C42762187200F5A213 /* SentryNSDataSwizzling.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SentryNSDataSwizzling.m; sourceTree = ""; }; @@ -2310,7 +2310,6 @@ D8BD2E27292D1F7300D96C6A /* SDK.xcconfig */, 84B7FA4729B2995A00AD93B1 /* DeploymentTargets.xcconfig */, 63AA75C51EB8B00100D153DE /* Sentry.xcconfig */, - D81A34A0291D5715005A27A9 /* SentryPrivate.xcconfig */, D8199DCF29376FF40074249E /* SentrySwiftUI.xcconfig */, ); path = Configuration; @@ -3354,6 +3353,7 @@ children = ( D8199DB429376ECC0074249E /* SentryInternal */, D8199DB529376ECC0074249E /* SentrySwiftUI.h */, + D88D25E92B8E0BAC0073C3D5 /* module.modulemap */, D8199DB629376ECC0074249E /* SentryTracedView.swift */, ); path = SentrySwiftUI; @@ -4658,7 +4658,6 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -4716,7 +4715,6 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = ""; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; @@ -4756,7 +4754,6 @@ CLANG_WARN_FLOAT_CONVERSION = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Manual; - COPY_PHASE_STRIP = YES; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -4796,7 +4793,6 @@ CLANG_WARN_FLOAT_CONVERSION = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Manual; - COPY_PHASE_STRIP = YES; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -4916,7 +4912,6 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -4962,7 +4957,6 @@ CLANG_WARN_FLOAT_CONVERSION = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Manual; - COPY_PHASE_STRIP = YES; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -5058,7 +5052,6 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -5102,7 +5095,6 @@ CLANG_WARN_FLOAT_CONVERSION = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Manual; - COPY_PHASE_STRIP = YES; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -5170,6 +5162,7 @@ baseConfigurationReference = D8199DCF29376FF40074249E /* SentrySwiftUI.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; CLANG_ENABLE_MODULES = YES; @@ -5196,13 +5189,16 @@ "@loader_path/Frameworks", ); MARKETING_VERSION = 1.0; + MODULEMAP_FILE = ""; + MODULEMAP_PRIVATE_FILE = ""; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentrySwiftUI; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OBJC_BRIDGING_HEADER = Sources/SentrySwiftUI/SentrySwiftUI.h; + SWIFT_INCLUDE_PATHS = Sources/SentrySwiftUI/; + SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; @@ -5544,7 +5540,6 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = ""; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; @@ -5587,7 +5582,6 @@ CLANG_WARN_FLOAT_CONVERSION = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Manual; - COPY_PHASE_STRIP = YES; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -5650,6 +5644,7 @@ baseConfigurationReference = D8199DCF29376FF40074249E /* SentrySwiftUI.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; CLANG_ENABLE_MODULES = YES; @@ -5676,11 +5671,14 @@ "@loader_path/Frameworks", ); MARKETING_VERSION = 1.0; + MODULEMAP_FILE = ""; + MODULEMAP_PRIVATE_FILE = ""; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentrySwiftUI; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OBJC_BRIDGING_HEADER = Sources/SentrySwiftUI/SentrySwiftUI.h; + SWIFT_INCLUDE_PATHS = Sources/SentrySwiftUI/; + SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; }; @@ -5774,7 +5772,6 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = ""; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -5819,7 +5816,6 @@ CLANG_WARN_FLOAT_CONVERSION = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Manual; - COPY_PHASE_STRIP = YES; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -5884,6 +5880,7 @@ baseConfigurationReference = D8199DCF29376FF40074249E /* SentrySwiftUI.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; CLANG_ENABLE_MODULES = YES; @@ -5910,13 +5907,16 @@ "@loader_path/Frameworks", ); MARKETING_VERSION = 1.0; + MODULEMAP_FILE = ""; + MODULEMAP_PRIVATE_FILE = ""; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentrySwiftUI; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OBJC_BRIDGING_HEADER = Sources/SentrySwiftUI/SentrySwiftUI.h; + SWIFT_INCLUDE_PATHS = Sources/SentrySwiftUI/; + SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; @@ -5928,6 +5928,7 @@ baseConfigurationReference = D8199DCF29376FF40074249E /* SentrySwiftUI.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; CLANG_ENABLE_MODULES = YES; @@ -5954,11 +5955,14 @@ "@loader_path/Frameworks", ); MARKETING_VERSION = 1.0; + MODULEMAP_FILE = ""; + MODULEMAP_PRIVATE_FILE = ""; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentrySwiftUI; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OBJC_BRIDGING_HEADER = Sources/SentrySwiftUI/SentrySwiftUI.h; + SWIFT_INCLUDE_PATHS = Sources/SentrySwiftUI/; + SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; }; @@ -5969,6 +5973,7 @@ baseConfigurationReference = D8199DCF29376FF40074249E /* SentrySwiftUI.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; CLANG_ENABLE_MODULES = YES; @@ -5995,11 +6000,14 @@ "@loader_path/Frameworks", ); MARKETING_VERSION = 1.0; + MODULEMAP_FILE = ""; + MODULEMAP_PRIVATE_FILE = ""; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentrySwiftUI; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OBJC_BRIDGING_HEADER = Sources/SentrySwiftUI/SentrySwiftUI.h; + SWIFT_INCLUDE_PATHS = Sources/SentrySwiftUI/; + SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; }; @@ -6010,6 +6018,7 @@ baseConfigurationReference = D8199DCF29376FF40074249E /* SentrySwiftUI.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; CLANG_ENABLE_MODULES = YES; @@ -6036,11 +6045,14 @@ "@loader_path/Frameworks", ); MARKETING_VERSION = 1.0; + MODULEMAP_FILE = ""; + MODULEMAP_PRIVATE_FILE = ""; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentrySwiftUI; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OBJC_BRIDGING_HEADER = Sources/SentrySwiftUI/SentrySwiftUI.h; + SWIFT_INCLUDE_PATHS = Sources/SentrySwiftUI/; + SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; }; diff --git a/Sources/Configuration/SentryPrivate.xcconfig b/Sources/Configuration/SentryPrivate.xcconfig deleted file mode 100644 index f236dfd61aa..00000000000 --- a/Sources/Configuration/SentryPrivate.xcconfig +++ /dev/null @@ -1,3 +0,0 @@ -PRODUCT_NAME = SentryPrivate -MACH_O_TYPE = staticlib -CURRENT_PROJECT_VERSION = 8.21.0-beta.0 diff --git a/Sources/Configuration/SentrySwiftUI.xcconfig b/Sources/Configuration/SentrySwiftUI.xcconfig index 27688821f70..195c7d84616 100644 --- a/Sources/Configuration/SentrySwiftUI.xcconfig +++ b/Sources/Configuration/SentrySwiftUI.xcconfig @@ -5,3 +5,4 @@ MACOSX_DEPLOYMENT_TARGET = 10.15 IPHONEOS_DEPLOYMENT_TARGET = 13.0 WATCHOS_DEPLOYMENT_TARGET = 6.0 TVOS_DEPLOYMENT_TARGET = 13.0 +MACH_O_TYPE = mh_dylib diff --git a/Sources/SentrySwiftUI/SentryTracedView.swift b/Sources/SentrySwiftUI/SentryTracedView.swift index ca409f93740..7774dd5b2a7 100644 --- a/Sources/SentrySwiftUI/SentryTracedView.swift +++ b/Sources/SentrySwiftUI/SentryTracedView.swift @@ -1,9 +1,7 @@ import Foundation import Sentry import SwiftUI -#if SWIFT_PACKAGE import SentryInternal -#endif /// A control to measure the performance of your views and send the result as a transaction to Sentry.io. /// diff --git a/Sources/SentrySwiftUI/module.modulemap b/Sources/SentrySwiftUI/module.modulemap new file mode 100644 index 00000000000..fc8127e7198 --- /dev/null +++ b/Sources/SentrySwiftUI/module.modulemap @@ -0,0 +1,4 @@ +module SentryInternal { + header "SentrySwiftUI.h" +} + From 56eac9cd724b6e62644f5c900e9889afef46a4e8 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Tue, 27 Feb 2024 16:08:14 +0100 Subject: [PATCH 47/62] Create build-xcframework.sh --- scripts/build-xcframework.sh | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 scripts/build-xcframework.sh diff --git a/scripts/build-xcframework.sh b/scripts/build-xcframework.sh new file mode 100755 index 00000000000..06086fe032a --- /dev/null +++ b/scripts/build-xcframework.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +sdks=(iphoneos iphonesimulator macosx appletvos appletvsimulator watchos watchsimulator xros xrsimulator) + +rm -rf Carthage/ +mkdir Carthage + +ALL_SDKS=$(xcodebuild -showsdks) + +generate_xcframework() { + local scheme="$1" + local sufix="${2:-}" + local MACH_O_TYPE="${3-mh_dylib}" + + for sdk in "${sdks[@]}"; do + if [[ -n "$(grep "${sdk}" <<< "$ALL_SDKS")" ]]; then + xcodebuild archive -project Sentry.xcodeproj/ -scheme "$scheme" -configuration Release -sdk "$sdk" -archivePath ./Carthage/archive/${scheme}${sufix}/${sdk}.xcarchive CODE_SIGNING_REQUIRED=NO SKIP_INSTALL=NO CODE_SIGN_IDENTITY= CARTHAGE=YES MACH_O_TYPE=$MACH_O_TYPE + + if [ -d "Carthage/archive/${scheme}${sufix}/${sdk}.xcarchive/dSYMs/${scheme}.framework.dSYM" ]; then + # Has debug symbols + xcodebuild -create-xcframework -framework Carthage/archive/${scheme}${sufix}/${sdk}.xcarchive/Products/Library/Frameworks/${scheme}.framework -debug-symbols "$(pwd -P)"/Carthage/archive/${scheme}${sufix}/${sdk}.xcarchive/dSYMs/${scheme}.framework.dSYM -output Carthage/${scheme}${sufix}.xcframework + else + # Has no debug symbols - static libs or projects configured to not produce it + xcodebuild -create-xcframework -framework Carthage/archive/${scheme}${sufix}/${sdk}.xcarchive/Products/Library/Frameworks/${scheme}.framework -output Carthage/${scheme}${sufix}.xcframework + fi + else + echo "${sdk} SDK not found" + fi + done +} + +# Create Sentry.xcframework +generate_xcframework "Sentry" "-Dynamic" + +generate_xcframework "Sentry" "" staticlib + +# Create SentrySwiftUI.xcframework +generate_xcframework "SentrySwiftUI" From 0cbc3919cbb776e8c9f3468525c8284a04c32c5e Mon Sep 17 00:00:00 2001 From: Sentry Github Bot Date: Tue, 27 Feb 2024 15:09:14 +0000 Subject: [PATCH 48/62] Format code --- Package.swift | 2 +- Sources/SentrySwiftUI/SentryTracedView.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index d70976c3706..60a26fa82b0 100644 --- a/Package.swift +++ b/Package.swift @@ -6,7 +6,7 @@ let package = Package( platforms: [.iOS(.v11), .macOS(.v10_13), .tvOS(.v11), .watchOS(.v4)], products: [ .library(name: "Sentry", targets: ["Sentry"]), - .library(name: "SentrySwiftUI", targets: ["Sentry","SentrySwiftUI"]) + .library(name: "SentrySwiftUI", targets: ["Sentry", "SentrySwiftUI"]) ], targets: [ .binaryTarget( diff --git a/Sources/SentrySwiftUI/SentryTracedView.swift b/Sources/SentrySwiftUI/SentryTracedView.swift index 7774dd5b2a7..ea095336cae 100644 --- a/Sources/SentrySwiftUI/SentryTracedView.swift +++ b/Sources/SentrySwiftUI/SentryTracedView.swift @@ -1,7 +1,7 @@ import Foundation import Sentry -import SwiftUI import SentryInternal +import SwiftUI /// A control to measure the performance of your views and send the result as a transaction to Sentry.io. /// From 890bdd2aae5fe12d4198ba4debf8941132ecfcfd Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Tue, 27 Feb 2024 16:17:42 +0100 Subject: [PATCH 49/62] format --- .github/workflows/release.yml | 1 + Package.swift | 2 +- Sources/SentrySwiftUI/SentryTracedView.swift | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7f99bf8f44d..52d5a742840 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,6 +29,7 @@ jobs: name: xcframeworks.zip path: | Carthage/Sentry.xcframework.zip + Carthage/Sentry-Dynamic.xcframework.zip Carthage/SentrySwiftUI.xcframework.zip overwrite: true diff --git a/Package.swift b/Package.swift index d70976c3706..60a26fa82b0 100644 --- a/Package.swift +++ b/Package.swift @@ -6,7 +6,7 @@ let package = Package( platforms: [.iOS(.v11), .macOS(.v10_13), .tvOS(.v11), .watchOS(.v4)], products: [ .library(name: "Sentry", targets: ["Sentry"]), - .library(name: "SentrySwiftUI", targets: ["Sentry","SentrySwiftUI"]) + .library(name: "SentrySwiftUI", targets: ["Sentry", "SentrySwiftUI"]) ], targets: [ .binaryTarget( diff --git a/Sources/SentrySwiftUI/SentryTracedView.swift b/Sources/SentrySwiftUI/SentryTracedView.swift index 7774dd5b2a7..ea095336cae 100644 --- a/Sources/SentrySwiftUI/SentryTracedView.swift +++ b/Sources/SentrySwiftUI/SentryTracedView.swift @@ -1,7 +1,7 @@ import Foundation import Sentry -import SwiftUI import SentryInternal +import SwiftUI /// A control to measure the performance of your views and send the result as a transaction to Sentry.io. /// From c8e6b240c521fba5dd3be309174db1f4a50a08e2 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Tue, 27 Feb 2024 16:43:53 +0100 Subject: [PATCH 50/62] Update AppDelegate.swift --- Samples/iOS-Swift/iOS-Swift/AppDelegate.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Samples/iOS-Swift/iOS-Swift/AppDelegate.swift b/Samples/iOS-Swift/iOS-Swift/AppDelegate.swift index 6c450483309..26cd244d1bd 100644 --- a/Samples/iOS-Swift/iOS-Swift/AppDelegate.swift +++ b/Samples/iOS-Swift/iOS-Swift/AppDelegate.swift @@ -179,7 +179,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate { let appSupport = NSSearchPathForDirectoriesInDomains(.applicationSupportDirectory, .userDomainMask, true).first! let cache = NSSearchPathForDirectoriesInDomains(.cachesDirectory, .userDomainMask, true).first! for path in [appSupport, cache] { - for item in FileManager.default.enumerator(atPath: path)! { + guard let files = FileManager.default.enumerator(atPath: path) else { return } + for item in files { try! FileManager.default.removeItem(atPath: (path as NSString).appendingPathComponent((item as! String))) } } From 630de640fab418d540815878b8949bbaf07df7d8 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Wed, 28 Feb 2024 11:34:28 +0100 Subject: [PATCH 51/62] Make pod works --- Sentry.podspec | 1 + scripts/build-xcframework.sh | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Sentry.podspec b/Sentry.podspec index fd7f8ed2450..73146d2d830 100644 --- a/Sentry.podspec +++ b/Sentry.podspec @@ -21,6 +21,7 @@ Pod::Spec.new do |s| 'GCC_ENABLE_CPP_EXCEPTIONS' => 'YES', 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++14', 'CLANG_CXX_LIBRARY' => 'libc++', + 'APPLICATION_EXTENSION_API_ONLY' => 'YES' } s.watchos.pod_target_xcconfig = { 'OTHER_LDFLAGS' => '$(inherited) -framework WatchKit' diff --git a/scripts/build-xcframework.sh b/scripts/build-xcframework.sh index 06086fe032a..32db00b0964 100755 --- a/scripts/build-xcframework.sh +++ b/scripts/build-xcframework.sh @@ -12,21 +12,25 @@ generate_xcframework() { local sufix="${2:-}" local MACH_O_TYPE="${3-mh_dylib}" + local createxcframework="xcodebuild -create-xcframework " + for sdk in "${sdks[@]}"; do if [[ -n "$(grep "${sdk}" <<< "$ALL_SDKS")" ]]; then xcodebuild archive -project Sentry.xcodeproj/ -scheme "$scheme" -configuration Release -sdk "$sdk" -archivePath ./Carthage/archive/${scheme}${sufix}/${sdk}.xcarchive CODE_SIGNING_REQUIRED=NO SKIP_INSTALL=NO CODE_SIGN_IDENTITY= CARTHAGE=YES MACH_O_TYPE=$MACH_O_TYPE + createxcframework+="-framework Carthage/archive/${scheme}${sufix}/${sdk}.xcarchive/Products/Library/Frameworks/${scheme}.framework " + if [ -d "Carthage/archive/${scheme}${sufix}/${sdk}.xcarchive/dSYMs/${scheme}.framework.dSYM" ]; then # Has debug symbols - xcodebuild -create-xcframework -framework Carthage/archive/${scheme}${sufix}/${sdk}.xcarchive/Products/Library/Frameworks/${scheme}.framework -debug-symbols "$(pwd -P)"/Carthage/archive/${scheme}${sufix}/${sdk}.xcarchive/dSYMs/${scheme}.framework.dSYM -output Carthage/${scheme}${sufix}.xcframework - else - # Has no debug symbols - static libs or projects configured to not produce it - xcodebuild -create-xcframework -framework Carthage/archive/${scheme}${sufix}/${sdk}.xcarchive/Products/Library/Frameworks/${scheme}.framework -output Carthage/${scheme}${sufix}.xcframework + createxcframework+="-debug-symbols $(pwd -P)/Carthage/archive/${scheme}${sufix}/${sdk}.xcarchive/dSYMs/${scheme}.framework.dSYM " fi else echo "${sdk} SDK not found" fi done + + createxcframework+="-output Carthage/${scheme}${sufix}.xcframework" + $createxcframework } # Create Sentry.xcframework From 335c1d0b63a1304bc90dbda64436f36c441542c1 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Wed, 28 Feb 2024 13:03:23 +0100 Subject: [PATCH 52/62] Fix SentrySwiftUI for pods --- Sentry.xcodeproj/project.pbxproj | 6 ++++++ Sources/SentrySwiftUI/SentryTracedView.swift | 2 ++ 2 files changed, 8 insertions(+) diff --git a/Sentry.xcodeproj/project.pbxproj b/Sentry.xcodeproj/project.pbxproj index b65a45ee4e6..22d147bd299 100644 --- a/Sentry.xcodeproj/project.pbxproj +++ b/Sentry.xcodeproj/project.pbxproj @@ -5193,6 +5193,7 @@ MODULEMAP_PRIVATE_FILE = ""; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; + OTHER_SWIFT_FLAGS = "-DCARTHAGE"; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentrySwiftUI; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; @@ -5674,6 +5675,7 @@ MODULEMAP_FILE = ""; MODULEMAP_PRIVATE_FILE = ""; MTL_FAST_MATH = YES; + OTHER_SWIFT_FLAGS = "-DCARTHAGE"; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentrySwiftUI; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; @@ -5911,6 +5913,7 @@ MODULEMAP_PRIVATE_FILE = ""; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; + OTHER_SWIFT_FLAGS = "-DCARTHAGE"; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentrySwiftUI; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; @@ -5958,6 +5961,7 @@ MODULEMAP_FILE = ""; MODULEMAP_PRIVATE_FILE = ""; MTL_FAST_MATH = YES; + OTHER_SWIFT_FLAGS = "-DCARTHAGE"; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentrySwiftUI; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; @@ -6003,6 +6007,7 @@ MODULEMAP_FILE = ""; MODULEMAP_PRIVATE_FILE = ""; MTL_FAST_MATH = YES; + OTHER_SWIFT_FLAGS = "-DCARTHAGE"; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentrySwiftUI; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; @@ -6048,6 +6053,7 @@ MODULEMAP_FILE = ""; MODULEMAP_PRIVATE_FILE = ""; MTL_FAST_MATH = YES; + OTHER_SWIFT_FLAGS = "-DCARTHAGE"; PRODUCT_BUNDLE_IDENTIFIER = io.sentry.SentrySwiftUI; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; diff --git a/Sources/SentrySwiftUI/SentryTracedView.swift b/Sources/SentrySwiftUI/SentryTracedView.swift index ea095336cae..b991d06bdf3 100644 --- a/Sources/SentrySwiftUI/SentryTracedView.swift +++ b/Sources/SentrySwiftUI/SentryTracedView.swift @@ -1,6 +1,8 @@ import Foundation import Sentry +#if SWIFT_PACKAGE || CARTHAGE import SentryInternal +#endif import SwiftUI /// A control to measure the performance of your views and send the result as a transaction to Sentry.io. From 0a6d52bb6e9a443192c62ec7c87d117191bb5926 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Wed, 28 Feb 2024 14:05:32 +0100 Subject: [PATCH 53/62] fixing test --- Package.swift | 7 ++++++- .../test-app-sentry.xcodeproj/project.pbxproj | 16 ++++++++-------- scripts/update-package-sha.sh | 9 ++++++--- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/Package.swift b/Package.swift index 60a26fa82b0..135bd5956b0 100644 --- a/Package.swift +++ b/Package.swift @@ -12,7 +12,12 @@ let package = Package( .binaryTarget( name: "Sentry", url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.22.0-alpha.0/Sentry.xcframework.zip", - checksum: "86156301aee5c8774a8cd5c240286f914f6e7721aaac5a7c9d049ea613a4b730" + checksum: "86156301aee5c8774a8cd5c240286f914f6e7721aaac5a7c9d049ea613a4b730" //Sentry-Static + ), + .binaryTarget( + name: "Sentry", + url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.22.0-alpha.0/Sentry-Dynamic.xcframework.zip", + checksum: "86156301aee5c8774a8cd5c240286f914f6e7721aaac5a7c9d049ea613a4b730" //Sentry-Dynamic ), .target ( name: "SentrySwiftUI", dependencies: ["Sentry", "SentryInternal"], diff --git a/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.pbxproj b/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.pbxproj index e3461a18e34..95eadd8d362 100644 --- a/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.pbxproj +++ b/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.pbxproj @@ -11,18 +11,18 @@ 2C101B7028A2956900D320BC /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C101B6F28A2956900D320BC /* ContentView.swift */; }; 2C101B7228A2956A00D320BC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2C101B7128A2956A00D320BC /* Assets.xcassets */; }; 2C101B7528A2956A00D320BC /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2C101B7428A2956A00D320BC /* Preview Assets.xcassets */; }; - D88D25BD2B8CE4270073C3D5 /* Sentry.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D88D25BC2B8CE4270073C3D5 /* Sentry.xcframework */; }; - D88D25BE2B8CE4270073C3D5 /* Sentry.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D88D25BC2B8CE4270073C3D5 /* Sentry.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + D856EFE72B8F66E600078BA3 /* Sentry.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D856EFE62B8F66E600078BA3 /* Sentry.xcframework */; }; + D856EFE82B8F66E600078BA3 /* Sentry.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D856EFE62B8F66E600078BA3 /* Sentry.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ - D88D25BF2B8CE4270073C3D5 /* Embed Frameworks */ = { + D856EFE92B8F66E600078BA3 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( - D88D25BE2B8CE4270073C3D5 /* Sentry.xcframework in Embed Frameworks */, + D856EFE82B8F66E600078BA3 /* Sentry.xcframework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -35,7 +35,7 @@ 2C101B6F28A2956900D320BC /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 2C101B7128A2956A00D320BC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 2C101B7428A2956A00D320BC /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; - D88D25BC2B8CE4270073C3D5 /* Sentry.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Sentry.xcframework; path = ../../../Carthage/Build/Sentry.xcframework; sourceTree = ""; }; + D856EFE62B8F66E600078BA3 /* Sentry.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Sentry.xcframework; path = ../../../Carthage/Sentry.xcframework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -43,7 +43,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D88D25BD2B8CE4270073C3D5 /* Sentry.xcframework in Frameworks */, + D856EFE72B8F66E600078BA3 /* Sentry.xcframework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -89,7 +89,7 @@ 2C101B7F28A2EF1B00D320BC /* Frameworks */ = { isa = PBXGroup; children = ( - D88D25BC2B8CE4270073C3D5 /* Sentry.xcframework */, + D856EFE62B8F66E600078BA3 /* Sentry.xcframework */, ); name = Frameworks; sourceTree = ""; @@ -104,7 +104,7 @@ 2C101B6628A2956900D320BC /* Sources */, 2C101B6728A2956900D320BC /* Frameworks */, 2C101B6828A2956900D320BC /* Resources */, - D88D25BF2B8CE4270073C3D5 /* Embed Frameworks */, + D856EFE92B8F66E600078BA3 /* Embed Frameworks */, ); buildRules = ( ); diff --git a/scripts/update-package-sha.sh b/scripts/update-package-sha.sh index 14db52159de..9c69782a560 100755 --- a/scripts/update-package-sha.sh +++ b/scripts/update-package-sha.sh @@ -1,14 +1,17 @@ #!/bin/bash set -euo pipefail -NEW_CHECKSUM=$(shasum -a 256 Carthage/Sentry.xcframework.zip | awk '{print $1}') +NEW_CHECKSUM_STATIC=$(shasum -a 256 Carthage/Sentry.xcframework.zip | awk '{print $1}') +NEW_CHECKSUM_DYNAMIC=$(shasum -a 256 Carthage/Sentry-Dynamic.xcframework.zip | awk '{print $1}') os=$(uname) if [ "$os" == "Linux" ]; then - sed -i "s/checksum: \".*\"/checksum: \"$NEW_CHECKSUM\"/" Package.swift + sed -i "s/checksum: \".*\" \/\/Sentry-Static/checksum: \"$NEW_CHECKSUM_STATIC\" \/\/Sentry-Static/" Package.swift + sed -i "s/checksum: \".*\" \/\/Sentry-Dynamic/checksum: \"$NEW_CHECKSUM_DYNAMIC\" \/\/Sentry-Dynamic/" Package.swift else - sed -i "" "s/checksum: \".*\"/checksum: \"$NEW_CHECKSUM\"/" Package.swift + sed -i "" "s/checksum: \".*\" \/\/Sentry-Static/checksum: \"$NEW_CHECKSUM_STATIC\" \/\/Sentry-Static/" Package.swift + sed -i "" "s/checksum: \".*\" \/\/Sentry-Dynamic/checksum: \"$NEW_CHECKSUM_DYNAMIC\" \/\/Sentry-Dynamic/" Package.swift fi echo $GITHUB_RUN_ID > .github/last-release-runid From 92a52d4bed4380932977269015090c41f7e68ce0 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Wed, 28 Feb 2024 15:24:51 +0100 Subject: [PATCH 54/62] Update project.pbxproj --- .../test-app-sentry.xcodeproj/project.pbxproj | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.pbxproj b/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.pbxproj index 95eadd8d362..1669c6f8ac1 100644 --- a/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.pbxproj +++ b/Tests/Perf/test-app-sentry/test-app-sentry.xcodeproj/project.pbxproj @@ -11,18 +11,18 @@ 2C101B7028A2956900D320BC /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C101B6F28A2956900D320BC /* ContentView.swift */; }; 2C101B7228A2956A00D320BC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2C101B7128A2956A00D320BC /* Assets.xcassets */; }; 2C101B7528A2956A00D320BC /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2C101B7428A2956A00D320BC /* Preview Assets.xcassets */; }; - D856EFE72B8F66E600078BA3 /* Sentry.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D856EFE62B8F66E600078BA3 /* Sentry.xcframework */; }; - D856EFE82B8F66E600078BA3 /* Sentry.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D856EFE62B8F66E600078BA3 /* Sentry.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + D856EFF12B8F709500078BA3 /* Sentry-Dynamic.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D856EFED2B8F706600078BA3 /* Sentry-Dynamic.xcframework */; }; + D856EFF22B8F709500078BA3 /* Sentry-Dynamic.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D856EFED2B8F706600078BA3 /* Sentry-Dynamic.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ - D856EFE92B8F66E600078BA3 /* Embed Frameworks */ = { + D856EFF32B8F709500078BA3 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( - D856EFE82B8F66E600078BA3 /* Sentry.xcframework in Embed Frameworks */, + D856EFF22B8F709500078BA3 /* Sentry-Dynamic.xcframework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -35,7 +35,7 @@ 2C101B6F28A2956900D320BC /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 2C101B7128A2956A00D320BC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 2C101B7428A2956A00D320BC /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; - D856EFE62B8F66E600078BA3 /* Sentry.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Sentry.xcframework; path = ../../../Carthage/Sentry.xcframework; sourceTree = ""; }; + D856EFED2B8F706600078BA3 /* Sentry-Dynamic.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = "Sentry-Dynamic.xcframework"; path = "../../../Carthage/Sentry-Dynamic.xcframework"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -43,7 +43,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D856EFE72B8F66E600078BA3 /* Sentry.xcframework in Frameworks */, + D856EFF12B8F709500078BA3 /* Sentry-Dynamic.xcframework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -89,7 +89,7 @@ 2C101B7F28A2EF1B00D320BC /* Frameworks */ = { isa = PBXGroup; children = ( - D856EFE62B8F66E600078BA3 /* Sentry.xcframework */, + D856EFED2B8F706600078BA3 /* Sentry-Dynamic.xcframework */, ); name = Frameworks; sourceTree = ""; @@ -104,7 +104,7 @@ 2C101B6628A2956900D320BC /* Sources */, 2C101B6728A2956900D320BC /* Frameworks */, 2C101B6828A2956900D320BC /* Resources */, - D856EFE92B8F66E600078BA3 /* Embed Frameworks */, + D856EFF32B8F709500078BA3 /* Embed Frameworks */, ); buildRules = ( ); From 524355db309fc3b813b180f0aa2deefee54a29dc Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Wed, 28 Feb 2024 16:00:43 +0100 Subject: [PATCH 55/62] more fixes and enabling more ci --- .github/workflows/build.yml | 1 - Package.swift | 3 ++- Tests/Perf/metrics-test.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20f3743c907..de466c4e072 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -139,7 +139,6 @@ jobs: validate-xcframework: name: Validate XCFramework - if: false runs-on: macos-13-xlarge needs: build-xcframework steps: diff --git a/Package.swift b/Package.swift index 135bd5956b0..dc9cb29114b 100644 --- a/Package.swift +++ b/Package.swift @@ -6,6 +6,7 @@ let package = Package( platforms: [.iOS(.v11), .macOS(.v10_13), .tvOS(.v11), .watchOS(.v4)], products: [ .library(name: "Sentry", targets: ["Sentry"]), + .library(name: "Sentry-Dynamic", targets: ["Sentry-Dynamic"]), .library(name: "SentrySwiftUI", targets: ["Sentry", "SentrySwiftUI"]) ], targets: [ @@ -15,7 +16,7 @@ let package = Package( checksum: "86156301aee5c8774a8cd5c240286f914f6e7721aaac5a7c9d049ea613a4b730" //Sentry-Static ), .binaryTarget( - name: "Sentry", + name: "Sentry-Dynamic", url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.22.0-alpha.0/Sentry-Dynamic.xcframework.zip", checksum: "86156301aee5c8774a8cd5c240286f914f6e7721aaac5a7c9d049ea613a4b730" //Sentry-Dynamic ), diff --git a/Tests/Perf/metrics-test.yml b/Tests/Perf/metrics-test.yml index f4d057b76e6..12c58f9c149 100644 --- a/Tests/Perf/metrics-test.yml +++ b/Tests/Perf/metrics-test.yml @@ -11,4 +11,4 @@ startupTimeTest: binarySizeTest: diffMin: 200 KiB - diffMax: 420 KiB + diffMax: 600 KiB From 5f28a3840fd94d4bf894689a9e25cf2f5710897b Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Wed, 28 Feb 2024 17:32:11 +0100 Subject: [PATCH 56/62] SPM validation --- .github/workflows/build.yml | 38 +++++++++++++-------- Samples/SPM-Dynamic/Package.swift | 6 ++-- Samples/macOS-SPM-CommandLine/Package.swift | 3 +- 3 files changed, 27 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de466c4e072..99cc0010115 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -155,17 +155,18 @@ jobs: # See https://github.community/t/github-sha-isnt-the-value-expected/17903/17906. validate-spm: name: Validate Swift Package Manager - if: false runs-on: macos-13 + needs: build-xcframework steps: - uses: actions/checkout@v4 - - name: Set SPM revision to current git commit + - uses: actions/download-artifact@v4 + with: + name: ${{ github.sha }} + - name: Change path of the framework run: >- - if [[ "${{ github.event.pull_request.head.sha }}" != "" ]]; then - sed -i '' 's/.branch("main")/.revision("${{ github.event.pull_request.head.sha }}")/g' Samples/macOS-SPM-CommandLine/Package.swift - else - sed -i '' 's/.branch("main")/.revision("${{ github.sha }}")/g' Samples/macOS-SPM-CommandLine/Package.swift - fi + sed -i '' 's/url.*//g' Package.swift + sed -i '' 's/checksum: ".*" \/\/Sentry-Static/path: "Sentry.xcframework.zip"/g' Package.swift + sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic/path: "Sentry-Dynamic.xcframework.zip"/g' Package.swift shell: bash - run: swift build working-directory: Samples/macOS-SPM-CommandLine @@ -173,17 +174,15 @@ jobs: validate-spm-dynamic: name: Validate Swift Package Manager Dynamic - if: false runs-on: macos-13 + needs: build-xcframework steps: - uses: actions/checkout@v4 - - name: Set SPM revision to current git commit + - name: Change path of the framework run: >- - if [[ "${{ github.event.pull_request.head.sha }}" != "" ]]; then - sed -i '' 's/.branch("main")/.revision("${{ github.event.pull_request.head.sha }}")/g' Samples/SPM-Dynamic/Package.swift - else - sed -i '' 's/.branch("main")/.revision("${{ github.sha }}")/g' Samples/SPM-Dynamic/Package.swift - fi + sed -i '' 's/url.*//g' Package.swift + sed -i '' 's/checksum: ".*" \/\/Sentry-Static/path: "Sentry.xcframework.zip"/g' Package.swift + sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic/path: "Sentry-Dynamic.xcframework.zip"/g' Package.swift shell: bash - run: swift build working-directory: Samples/SPM-Dynamic @@ -191,10 +190,19 @@ jobs: swift-build: name: Build with Swift - if: false runs-on: macos-13 + needs: build-xcframework steps: - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 + with: + name: ${{ github.sha }} + - name: Change path of the framework + run: >- + sed -i '' 's/url.*//g' Package.swift + sed -i '' 's/checksum: ".*" \/\/Sentry-Static/path: "Sentry.xcframework.zip"/g' Package.swift + sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic/path: "Sentry-Dynamic.xcframework.zip"/g' Package.swift + shell: bash - run: swift build shell: sh diff --git a/Samples/SPM-Dynamic/Package.swift b/Samples/SPM-Dynamic/Package.swift index 03d09e78869..63bedac9a59 100644 --- a/Samples/SPM-Dynamic/Package.swift +++ b/Samples/SPM-Dynamic/Package.swift @@ -7,16 +7,16 @@ let package = Package( name: "SPM-Dynamic", platforms: [.macOS(.v10_13)], products: [ - .library(name: "SPM-Dynamic", type: .dynamic, targets: ["SPM-Dynamic"]) + .executable(name: "SPM-Dynamic", targets: ["SPM-Dynamic"]) ], dependencies: [ // branch is replaced in CI to the current sha - .package(name: "Sentry", url: "https://github.com/getsentry/sentry-cocoa", .branch("main") ) + .package(name: "Sentry", path: "../../../sentry-cocoa") ], targets: [ .target( name: "SPM-Dynamic", - dependencies: ["Sentry"], + dependencies: [.product(name: "Sentry-Dynamic", package: "Sentry")], swiftSettings: [ .unsafeFlags(["-warnings-as-errors"]) ]) diff --git a/Samples/macOS-SPM-CommandLine/Package.swift b/Samples/macOS-SPM-CommandLine/Package.swift index 8193a6fa539..b2dec63aeee 100644 --- a/Samples/macOS-SPM-CommandLine/Package.swift +++ b/Samples/macOS-SPM-CommandLine/Package.swift @@ -6,8 +6,7 @@ import PackageDescription let package = Package( name: "macOS-SPM-CommandLine", dependencies: [ - // branch is replaced in CI to the current sha - .package(name: "Sentry", url: "https://github.com/getsentry/sentry-cocoa", .branch("main") ) + .package(name: "Sentry", path: "../../../sentry-cocoa") ], targets: [ .target( From 88822d6ca27ce869e0dee0694720eb94db8a6268 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Wed, 28 Feb 2024 20:58:24 +0100 Subject: [PATCH 57/62] Update build.yml --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 99cc0010115..bc4c3e41449 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -163,7 +163,7 @@ jobs: with: name: ${{ github.sha }} - name: Change path of the framework - run: >- + run: | sed -i '' 's/url.*//g' Package.swift sed -i '' 's/checksum: ".*" \/\/Sentry-Static/path: "Sentry.xcframework.zip"/g' Package.swift sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic/path: "Sentry-Dynamic.xcframework.zip"/g' Package.swift @@ -179,7 +179,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Change path of the framework - run: >- + run: | sed -i '' 's/url.*//g' Package.swift sed -i '' 's/checksum: ".*" \/\/Sentry-Static/path: "Sentry.xcframework.zip"/g' Package.swift sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic/path: "Sentry-Dynamic.xcframework.zip"/g' Package.swift @@ -198,7 +198,7 @@ jobs: with: name: ${{ github.sha }} - name: Change path of the framework - run: >- + run: | sed -i '' 's/url.*//g' Package.swift sed -i '' 's/checksum: ".*" \/\/Sentry-Static/path: "Sentry.xcframework.zip"/g' Package.swift sed -i '' 's/checksum: ".*" \/\/Sentry-Dynamic/path: "Sentry-Dynamic.xcframework.zip"/g' Package.swift From a9a593f3a09263719c53bf83399307dcd084a82b Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Thu, 29 Feb 2024 07:46:23 +0100 Subject: [PATCH 58/62] Update build.yml --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bc4c3e41449..8c2cc0c183c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -178,6 +178,9 @@ jobs: needs: build-xcframework steps: - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 + with: + name: ${{ github.sha }} - name: Change path of the framework run: | sed -i '' 's/url.*//g' Package.swift From 574d7623860e09d83660e718f228fe5cfdbe0cb7 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 1 Mar 2024 11:55:22 +0100 Subject: [PATCH 59/62] Apply suggestions from code review Co-authored-by: Philipp Hofmann --- .github/workflows/build.yml | 8 +++++--- .github/workflows/release.yml | 8 ++++++-- scripts/build-xcframework.sh | 2 -- scripts/update-package-sha.sh | 8 +++++++- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c2cc0c183c..6bd969b187b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -97,7 +97,7 @@ jobs: steps: - uses: actions/checkout@v4 - run: ./scripts/ci-select-xcode.sh 15.2 - - run: echo "FRAMEWORKRUNID=$(./scripts/xcframework-generated-run.sh)" >> $GITHUB_ENV + - run: echo "FRAMEWORK_RUN_ID=$(./scripts/xcframework-generated-run.sh)" >> $GITHUB_ENV - uses: actions/download-artifact@v4 if: startsWith(github.ref, 'refs/heads/release/') @@ -105,10 +105,12 @@ jobs: name: xcframeworks.zip path: Carthage/ github-token: ${{ secrets.GITHUB_TOKEN }} - run-id: ${{ env.FRAMEWORKRUNID }} + run-id: ${{ env.FRAMEWORK_RUN_ID }} - name: Check XCFramework - if: startsWith(github.ref, 'refs/heads/release/') + #We dont compile the framework during releases to not change the artefact SHA value + #instead we use the one archive as an artefact + if: startsWith(github.ref, 'refs/heads/release/') run: | ls -R Carthage if [ ! -f Carthage/Sentry.xcframework.zip ]; then diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 52d5a742840..f00c443a99e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,10 @@ jobs: - name: 'Generate XCFramework' run: | ./scripts/ci-select-xcode.sh 15.2 - make build-xcframework + #We need to build the framework during release to get it's SHA value + #the framework will be saved as an artefact and we will use the same + #binary for the entire release process to avoid the SHA to change + make build-xcframework - uses: actions/upload-artifact@v4 with: @@ -49,7 +52,8 @@ jobs: name: xcframeworks.zip path: Carthage/ - #update-package-sha.sh uses this env variable to update Package.swift + #update-package-sha.sh uses this env variable to update Package.swift. + #During release Craft calls bump.sh that uses update-package-sha.sh. - run: export GITHUB_RUN_ID=${{ github.run_id }} - name: Prepare release diff --git a/scripts/build-xcframework.sh b/scripts/build-xcframework.sh index 32db00b0964..034adecbd4f 100755 --- a/scripts/build-xcframework.sh +++ b/scripts/build-xcframework.sh @@ -33,10 +33,8 @@ generate_xcframework() { $createxcframework } -# Create Sentry.xcframework generate_xcframework "Sentry" "-Dynamic" generate_xcframework "Sentry" "" staticlib -# Create SentrySwiftUI.xcframework generate_xcframework "SentrySwiftUI" diff --git a/scripts/update-package-sha.sh b/scripts/update-package-sha.sh index 9c69782a560..ee06d488d2a 100755 --- a/scripts/update-package-sha.sh +++ b/scripts/update-package-sha.sh @@ -1,11 +1,17 @@ #!/bin/bash set -euo pipefail +if [ -z "$GITHUB_RUN_ID" ]; then + echo "Error: GITHUB_RUN_ID is not set. Exiting script." + exit 1 +fi + NEW_CHECKSUM_STATIC=$(shasum -a 256 Carthage/Sentry.xcframework.zip | awk '{print $1}') NEW_CHECKSUM_DYNAMIC=$(shasum -a 256 Carthage/Sentry-Dynamic.xcframework.zip | awk '{print $1}') os=$(uname) - +# Craft pre-release command runs on an ubuntu machine +# and `sed` needs an extra argument for macOS if [ "$os" == "Linux" ]; then sed -i "s/checksum: \".*\" \/\/Sentry-Static/checksum: \"$NEW_CHECKSUM_STATIC\" \/\/Sentry-Static/" Package.swift sed -i "s/checksum: \".*\" \/\/Sentry-Dynamic/checksum: \"$NEW_CHECKSUM_DYNAMIC\" \/\/Sentry-Dynamic/" Package.swift From 6d245babedb2f461c34e0211f6c3474f38cf1e20 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 1 Mar 2024 13:30:41 +0100 Subject: [PATCH 60/62] Apply suggestions from code review Co-authored-by: Philipp Hofmann --- .github/workflows/release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f00c443a99e..44085cf502b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,9 +22,9 @@ jobs: - name: 'Generate XCFramework' run: | ./scripts/ci-select-xcode.sh 15.2 - #We need to build the framework during release to get it's SHA value - #the framework will be saved as an artefact and we will use the same - #binary for the entire release process to avoid the SHA to change + # We need to build the framework during release to get it's SHA value + # the framework will be saved as an artefact and we will use the same + # binary for the entire release process to avoid the SHA to change make build-xcframework - uses: actions/upload-artifact@v4 @@ -52,8 +52,8 @@ jobs: name: xcframeworks.zip path: Carthage/ - #update-package-sha.sh uses this env variable to update Package.swift. - #During release Craft calls bump.sh that uses update-package-sha.sh. + # update-package-sha.sh uses this env variable to update Package.swift. + # During release Craft calls bump.sh that uses update-package-sha.sh. - run: export GITHUB_RUN_ID=${{ github.run_id }} - name: Prepare release From e20f1a585bcf8acff44c8f3d2e426279b7f9480f Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Fri, 1 Mar 2024 13:33:09 +0100 Subject: [PATCH 61/62] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f0825777e92..94a7a4f9e29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Improvements -- Remove SentryPrivate from Carthage, self built, and CocoaPods (#3623) +- Remove SentryPrivate library (#3623) ### Fixes From 5f46b57a745724dfed7e352ec0a58a011355c7a0 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 4 Mar 2024 13:23:21 +0100 Subject: [PATCH 62/62] Update CHANGELOG.md --- CHANGELOG.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35b4d61ada6..06b665536a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Improvements + +- Remove SentryPrivate library (#3623) + ## 8.21.0 ### Features @@ -16,10 +22,6 @@ for development. Read our [blog post](https://blog.sentry.io/sentry-for-developm - Cache installationID async to avoid file IO on the main thread when starting the SDK (#3601) - Add reason for NSPrivacyAccessedAPICategoryFileTimestamp (#3626) -### Improvements - -- Remove SentryPrivate library (#3623) - ### Fixes - Finish TTID span when transaction finishes (#3610)