From 7cd24044d27f836c1e0523169c5a0239bce184c4 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Thu, 5 Sep 2024 15:20:25 +0200 Subject: [PATCH 01/11] Use `Sentry.framework` instead of non-existetn `Sentry.xcframework` --- .../watchOS-Swift.xcodeproj/project.pbxproj | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Samples/watchOS-Swift/watchOS-Swift.xcodeproj/project.pbxproj b/Samples/watchOS-Swift/watchOS-Swift.xcodeproj/project.pbxproj index e6d5210826f..7875bde8513 100644 --- a/Samples/watchOS-Swift/watchOS-Swift.xcodeproj/project.pbxproj +++ b/Samples/watchOS-Swift/watchOS-Swift.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 50; objects = { /* Begin PBXBuildFile section */ @@ -19,8 +19,8 @@ 7B82C4A024C98A95002CA6D1 /* NotificationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B82C49F24C98A95002CA6D1 /* NotificationView.swift */; }; 7B82C4A224C98A96002CA6D1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7B82C4A124C98A96002CA6D1 /* Assets.xcassets */; }; 7B82C4A524C98A96002CA6D1 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7B82C4A424C98A96002CA6D1 /* Preview Assets.xcassets */; }; - 7B82C4C624C993E6002CA6D1 /* Sentry.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7B82C4BA24C98CFC002CA6D1 /* Sentry.xcframework */; }; - 7B82C4C724C993E6002CA6D1 /* Sentry.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7B82C4BA24C98CFC002CA6D1 /* Sentry.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 9273C09D2C89E76B0006FD34 /* Sentry.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9273C09C2C89E76B0006FD34 /* Sentry.framework */; }; + 9273C09E2C89E76B0006FD34 /* Sentry.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9273C09C2C89E76B0006FD34 /* Sentry.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -63,13 +63,13 @@ name = "Embed Watch Content"; runOnlyForDeploymentPostprocessing = 0; }; - 7B82C4C824C993E6002CA6D1 /* Embed Frameworks */ = { + 9273C09F2C89E76B0006FD34 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( - 7B82C4C724C993E6002CA6D1 /* Sentry.xcframework in Embed Frameworks */, + 9273C09E2C89E76B0006FD34 /* Sentry.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -97,6 +97,7 @@ 7B82C4BA24C98CFC002CA6D1 /* Sentry.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Sentry.xcframework; path = libs/Sentry.xcframework; sourceTree = ""; }; 7B82C4BF24C99340002CA6D1 /* Sentry.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Sentry.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7B82C4C224C9939A002CA6D1 /* Sentry.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Sentry.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9273C09C2C89E76B0006FD34 /* Sentry.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Sentry.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -104,7 +105,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7B82C4C624C993E6002CA6D1 /* Sentry.xcframework in Frameworks */, + 9273C09D2C89E76B0006FD34 /* Sentry.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -169,6 +170,7 @@ 7B82C4B524C98AF4002CA6D1 /* Frameworks */ = { isa = PBXGroup; children = ( + 9273C09C2C89E76B0006FD34 /* Sentry.framework */, 7B82C4C224C9939A002CA6D1 /* Sentry.framework */, 7B82C4BF24C99340002CA6D1 /* Sentry.framework */, 7B82C4BA24C98CFC002CA6D1 /* Sentry.xcframework */, @@ -221,7 +223,7 @@ 7B82C48E24C98A95002CA6D1 /* Sources */, 7B82C48F24C98A95002CA6D1 /* Frameworks */, 7B82C49024C98A95002CA6D1 /* Resources */, - 7B82C4C824C993E6002CA6D1 /* Embed Frameworks */, + 9273C09F2C89E76B0006FD34 /* Embed Frameworks */, ); buildRules = ( ); From d2b55f5a47cf638218c82a68557cc942447f2857 Mon Sep 17 00:00:00 2001 From: Andrew McKnight Date: Wed, 11 Sep 2024 10:27:10 -0800 Subject: [PATCH 02/11] try making watchOS-Swift link Sentry the same way as iOS-Swift --- .../watchOS-Swift.xcodeproj/project.pbxproj | 125 +++++++++++++++++- 1 file changed, 123 insertions(+), 2 deletions(-) diff --git a/Samples/watchOS-Swift/watchOS-Swift.xcodeproj/project.pbxproj b/Samples/watchOS-Swift/watchOS-Swift.xcodeproj/project.pbxproj index 7875bde8513..d4db90431e1 100644 --- a/Samples/watchOS-Swift/watchOS-Swift.xcodeproj/project.pbxproj +++ b/Samples/watchOS-Swift/watchOS-Swift.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 498CC1A52C9217E20045143E /* Sentry.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 498CC1982C9217D50045143E /* Sentry.framework */; }; 7B34280225876DFC00056519 /* Tongariro.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 7B34280125876DFC00056519 /* Tongariro.jpg */; }; 7B82C48424C98A93002CA6D1 /* watchOS-Swift WatchKit App.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 7B82C48324C98A93002CA6D1 /* watchOS-Swift WatchKit App.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 7B82C48A24C98A93002CA6D1 /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7B82C48824C98A93002CA6D1 /* Interface.storyboard */; }; @@ -19,11 +20,59 @@ 7B82C4A024C98A95002CA6D1 /* NotificationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B82C49F24C98A95002CA6D1 /* NotificationView.swift */; }; 7B82C4A224C98A96002CA6D1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7B82C4A124C98A96002CA6D1 /* Assets.xcassets */; }; 7B82C4A524C98A96002CA6D1 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7B82C4A424C98A96002CA6D1 /* Preview Assets.xcassets */; }; - 9273C09D2C89E76B0006FD34 /* Sentry.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9273C09C2C89E76B0006FD34 /* Sentry.framework */; }; 9273C09E2C89E76B0006FD34 /* Sentry.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9273C09C2C89E76B0006FD34 /* Sentry.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ + 498CC1972C9217D50045143E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 498CC18E2C9217D50045143E /* Sentry.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 63AA759B1EB8AEF500D153DE; + remoteInfo = Sentry; + }; + 498CC1992C9217D50045143E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 498CC18E2C9217D50045143E /* Sentry.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 63AA76651EB8CB2F00D153DE; + remoteInfo = SentryTests; + }; + 498CC19B2C9217D50045143E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 498CC18E2C9217D50045143E /* Sentry.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = D8199DAA29376E9B0074249E; + remoteInfo = SentrySwiftUI; + }; + 498CC19D2C9217D50045143E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 498CC18E2C9217D50045143E /* Sentry.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 8431EFD929B27B1100D8DC56; + remoteInfo = SentryProfilerTests; + }; + 498CC19F2C9217D50045143E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 498CC18E2C9217D50045143E /* Sentry.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 8431F00A29B284F200D8DC56; + remoteInfo = SentryTestUtils; + }; + 498CC1A12C9217D50045143E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 498CC18E2C9217D50045143E /* Sentry.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = D84DAD4D2B17428D003CF120; + remoteInfo = SentryTestUtilsDynamic; + }; + 498CC1A32C9217DB0045143E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 498CC18E2C9217D50045143E /* Sentry.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 63AA759A1EB8AEF500D153DE; + remoteInfo = Sentry; + }; 7B82C48524C98A93002CA6D1 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 7B82C47924C98A93002CA6D1 /* Project object */; @@ -77,6 +126,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 498CC18E2C9217D50045143E /* Sentry.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Sentry.xcodeproj; path = ../../Sentry.xcodeproj; sourceTree = ""; }; 7B34280125876DFC00056519 /* Tongariro.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = Tongariro.jpg; sourceTree = ""; }; 7B82C47F24C98A93002CA6D1 /* watchOS-Swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "watchOS-Swift.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 7B82C48324C98A93002CA6D1 /* watchOS-Swift WatchKit App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "watchOS-Swift WatchKit App.app"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -105,16 +155,30 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9273C09D2C89E76B0006FD34 /* Sentry.framework in Frameworks */, + 498CC1A52C9217E20045143E /* Sentry.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 498CC18F2C9217D50045143E /* Products */ = { + isa = PBXGroup; + children = ( + 498CC1982C9217D50045143E /* Sentry.framework */, + 498CC19A2C9217D50045143E /* SentryTests.xctest */, + 498CC19C2C9217D50045143E /* SentrySwiftUI.framework */, + 498CC19E2C9217D50045143E /* SentryProfilerTests.xctest */, + 498CC1A02C9217D50045143E /* libSentryTestUtils.a */, + 498CC1A22C9217D50045143E /* SentryTestUtilsDynamic.framework */, + ); + name = Products; + sourceTree = ""; + }; 7B82C47824C98A93002CA6D1 = { isa = PBXGroup; children = ( + 498CC18E2C9217D50045143E /* Sentry.xcodeproj */, 7B82C48724C98A93002CA6D1 /* watchOS-Swift WatchKit App */, 7B82C49624C98A95002CA6D1 /* watchOS-Swift WatchKit Extension */, 7B82C48024C98A93002CA6D1 /* Products */, @@ -228,6 +292,7 @@ buildRules = ( ); dependencies = ( + 498CC1A42C9217DB0045143E /* PBXTargetDependency */, ); name = "watchOS-Swift WatchKit Extension"; productName = "watchOS-Swift WatchKit Extension"; @@ -266,6 +331,12 @@ mainGroup = 7B82C47824C98A93002CA6D1; productRefGroup = 7B82C48024C98A93002CA6D1 /* Products */; projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 498CC18F2C9217D50045143E /* Products */; + ProjectRef = 498CC18E2C9217D50045143E /* Sentry.xcodeproj */; + }, + ); projectRoot = ""; targets = ( 7B82C47E24C98A93002CA6D1 /* watchOS-Swift */, @@ -275,6 +346,51 @@ }; /* End PBXProject section */ +/* Begin PBXReferenceProxy section */ + 498CC1982C9217D50045143E /* Sentry.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = Sentry.framework; + remoteRef = 498CC1972C9217D50045143E /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 498CC19A2C9217D50045143E /* SentryTests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = SentryTests.xctest; + remoteRef = 498CC1992C9217D50045143E /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 498CC19C2C9217D50045143E /* SentrySwiftUI.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = SentrySwiftUI.framework; + remoteRef = 498CC19B2C9217D50045143E /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 498CC19E2C9217D50045143E /* SentryProfilerTests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = SentryProfilerTests.xctest; + remoteRef = 498CC19D2C9217D50045143E /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 498CC1A02C9217D50045143E /* libSentryTestUtils.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libSentryTestUtils.a; + remoteRef = 498CC19F2C9217D50045143E /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 498CC1A22C9217D50045143E /* SentryTestUtilsDynamic.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = SentryTestUtilsDynamic.framework; + remoteRef = 498CC1A12C9217D50045143E /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + /* Begin PBXResourcesBuildPhase section */ 7B82C47D24C98A93002CA6D1 /* Resources */ = { isa = PBXResourcesBuildPhase; @@ -320,6 +436,11 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ + 498CC1A42C9217DB0045143E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Sentry; + targetProxy = 498CC1A32C9217DB0045143E /* PBXContainerItemProxy */; + }; 7B82C48624C98A93002CA6D1 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 7B82C48224C98A93002CA6D1 /* watchOS-Swift WatchKit App */; From 814505b426b799015db2b7a17bee90e5293f8b6d Mon Sep 17 00:00:00 2001 From: Andrew McKnight Date: Wed, 11 Sep 2024 11:00:33 -0800 Subject: [PATCH 03/11] add scheme for watchkit extension and target that for the CI build when using the watchOS app scheme/target, Xcode doesn't choose the correct target SDK for the Sentry SDK (it choose iPhoneOS) and then can't link because it can't find it inthe derived data tree (the sentry is under Debug-iphonesimulator while it needs to be in Debug-watchsimulator) --- .github/workflows/build.yml | 1 + .../watchOS-Swift WatchKit App.xcscheme | 3 +- .../watchOS-Swift WatchKit Extension.xcscheme | 107 ++++++++++++++++++ Sources/Configuration/SDK.xcconfig | 1 - 4 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 Samples/watchOS-Swift/watchOS-Swift.xcodeproj/xcshareddata/xcschemes/watchOS-Swift WatchKit Extension.xcscheme diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 12fee23456b..d545f84e615 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -86,6 +86,7 @@ jobs: env NSUnbufferedIO=YES xcodebuild -project Samples/watchOS-Swift/watchOS-Swift.xcodeproj + -scheme "watchOS-Swift WatchKit Extension" -configuration Debug CODE_SIGNING_ALLOWED="NO" build diff --git a/Samples/watchOS-Swift/watchOS-Swift.xcodeproj/xcshareddata/xcschemes/watchOS-Swift WatchKit App.xcscheme b/Samples/watchOS-Swift/watchOS-Swift.xcodeproj/xcshareddata/xcschemes/watchOS-Swift WatchKit App.xcscheme index 4979d444df6..29485b9eb40 100644 --- a/Samples/watchOS-Swift/watchOS-Swift.xcodeproj/xcshareddata/xcschemes/watchOS-Swift WatchKit App.xcscheme +++ b/Samples/watchOS-Swift/watchOS-Swift.xcodeproj/xcshareddata/xcschemes/watchOS-Swift WatchKit App.xcscheme @@ -53,7 +53,8 @@ ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" debugServiceExtension = "internal" - allowLocationSimulation = "YES"> + allowLocationSimulation = "YES" + notificationPayloadFile = "watchOS-Swift WatchKit Extension/PushNotificationPayload.apns"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/Configuration/SDK.xcconfig b/Sources/Configuration/SDK.xcconfig index 7e3f340528a..e4e9722997c 100644 --- a/Sources/Configuration/SDK.xcconfig +++ b/Sources/Configuration/SDK.xcconfig @@ -17,7 +17,6 @@ CLANG_ENABLE_OBJC_ARC = YES CLANG_ENABLE_MODULES = YES //OTHER_CFLAGS = -Wall -Wextra -Wpedantic -Wno-gnu-conditional-omitted-operand -ONLY_ACTIVE_ARCH[config=Debug] = YES GCC_OPTIMIZATION_LEVEL[config=Debug] = 0 COPY_PHASE_STRIP[config=Debug] = NO From 76b6bd33fccda2703167dc90592e2ee9d67f21be Mon Sep 17 00:00:00 2001 From: Andrew McKnight Date: Wed, 11 Sep 2024 11:31:44 -0800 Subject: [PATCH 04/11] add destination --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d545f84e615..1de69e14d3b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -87,6 +87,7 @@ jobs: xcodebuild -project Samples/watchOS-Swift/watchOS-Swift.xcodeproj -scheme "watchOS-Swift WatchKit Extension" + -destination "watch Simulator"" -configuration Debug CODE_SIGNING_ALLOWED="NO" build From ba63c092e8ac6a214e0fd2c4eb35d40efd52ac7e Mon Sep 17 00:00:00 2001 From: Andrew McKnight Date: Wed, 11 Sep 2024 11:40:14 -0800 Subject: [PATCH 05/11] fixup! add destination --- .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 1de69e14d3b..857e22068e0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -87,7 +87,7 @@ jobs: xcodebuild -project Samples/watchOS-Swift/watchOS-Swift.xcodeproj -scheme "watchOS-Swift WatchKit Extension" - -destination "watch Simulator"" + -destination "watch Simulator" -configuration Debug CODE_SIGNING_ALLOWED="NO" build From 27a5002a5f6aa4e19dc2f60281eb124547c49082 Mon Sep 17 00:00:00 2001 From: Andrew McKnight Date: Thu, 12 Sep 2024 15:08:40 -0800 Subject: [PATCH 06/11] fix destination --- .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 857e22068e0..1daeea30a54 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -87,7 +87,7 @@ jobs: xcodebuild -project Samples/watchOS-Swift/watchOS-Swift.xcodeproj -scheme "watchOS-Swift WatchKit Extension" - -destination "watch Simulator" + -destination "platform=watch Simulator,OS=latest" -configuration Debug CODE_SIGNING_ALLOWED="NO" build From 0562bd1ff274ffd762075166683717e067a58d5d Mon Sep 17 00:00:00 2001 From: Andrew McKnight Date: Thu, 12 Sep 2024 16:09:31 -0800 Subject: [PATCH 07/11] fix destination platform --- .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 1daeea30a54..f7e36652b48 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -87,7 +87,7 @@ jobs: xcodebuild -project Samples/watchOS-Swift/watchOS-Swift.xcodeproj -scheme "watchOS-Swift WatchKit Extension" - -destination "platform=watch Simulator,OS=latest" + -destination "platform=iOS Simulator,OS=latest" -configuration Debug CODE_SIGNING_ALLOWED="NO" build From 24fa87c3432ad4e898acfe86435424050e9601dc Mon Sep 17 00:00:00 2001 From: Andrew McKnight Date: Fri, 13 Sep 2024 13:28:00 -0800 Subject: [PATCH 08/11] use a device name --- .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 f7e36652b48..42990bd4c6a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -87,7 +87,7 @@ jobs: xcodebuild -project Samples/watchOS-Swift/watchOS-Swift.xcodeproj -scheme "watchOS-Swift WatchKit Extension" - -destination "platform=iOS Simulator,OS=latest" + -destination "platform=iOS Simulator,OS=15.5,name=iPhone 13" -configuration Debug CODE_SIGNING_ALLOWED="NO" build From 8eaf744b9afdf6e4a3b2cb8348d424c9a747bca6 Mon Sep 17 00:00:00 2001 From: Andrew McKnight Date: Fri, 13 Sep 2024 14:07:30 -0800 Subject: [PATCH 09/11] try using target instead of scheme --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 42990bd4c6a..f52ff40283d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -86,8 +86,7 @@ jobs: env NSUnbufferedIO=YES xcodebuild -project Samples/watchOS-Swift/watchOS-Swift.xcodeproj - -scheme "watchOS-Swift WatchKit Extension" - -destination "platform=iOS Simulator,OS=15.5,name=iPhone 13" + -target "watchOS-Swift WatchKit Extension" -configuration Debug CODE_SIGNING_ALLOWED="NO" build From b0a0cc4172027845386c7f56f4e86d50157ea14c Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Wed, 25 Sep 2024 15:03:52 +0200 Subject: [PATCH 10/11] Update build.yaml, remove refences to xcframework --- .github/workflows/build.yml | 19 +------------------ Makefile | 10 ---------- Samples/watchOS-Swift/README.md | 22 ---------------------- 3 files changed, 1 insertion(+), 50 deletions(-) delete mode 100644 Samples/watchOS-Swift/README.md diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f52ff40283d..d8639d93275 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,6 +58,7 @@ jobs: scheme: - macOS-Swift - iOS13-Swift + - watchOS-Swift WatchKit App steps: - uses: actions/checkout@v4 @@ -73,24 +74,6 @@ jobs: CODE_SIGNING_ALLOWED="NO" build - build-watch-os-sample: - name: Sample watchOS - runs-on: macos-12 - steps: - - uses: actions/checkout@v4 - - run: ./scripts/ci-select-xcode.sh 13.4.1 - - run: make build-for-watchos - - # Disable code signing. We just want to make sure these compile. - - run: >- - env NSUnbufferedIO=YES - xcodebuild - -project Samples/watchOS-Swift/watchOS-Swift.xcodeproj - -target "watchOS-Swift WatchKit Extension" - -configuration Debug - CODE_SIGNING_ALLOWED="NO" - build - build-xcframework: name: Build XCFramework # The macos-13 uses an Intel processor and doesn't compile the XCFramework for visionOS. diff --git a/Makefile b/Makefile index aa2a1b91b43..af2799801de 100644 --- a/Makefile +++ b/Makefile @@ -72,16 +72,6 @@ build-xcframework-sample: cd Samples/Carthage-Validation/XCFramework/ && carthage update --use-xcframeworks xcodebuild -project "Samples/Carthage-Validation/XCFramework/XCFramework.xcodeproj" -configuration Release CODE_SIGNING_ALLOWED="NO" build -## Build Sentry as a XCFramework that can be used with watchOS and save it to -## the watchOS sample. -watchOSLibPath = ./Samples/watchOS-Swift/libs -build-for-watchos: - @echo "--> Building Sentry as a XCFramework that can be used with watchOS" - rm -rf ${watchOSLibPath} - xcodebuild archive -scheme Sentry -destination="watchOS" -archivePath ${watchOSLibPath}/watchos.xcarchive -sdk watchos SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES - xcodebuild archive -scheme Sentry -destination="watch Simulator" -archivePath ${watchOSLibPath}//watchsimulator.xcarchive -sdk watchsimulator SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES - xcodebuild -create-xcframework -allow-internal-distribution -framework ${watchOSLibPath}/watchos.xcarchive/Products/Library/Frameworks/Sentry.framework -framework ${watchOSLibPath}/watchsimulator.xcarchive/Products/Library/Frameworks/Sentry.framework -output ${watchOSLibPath}//Sentry.xcframework - # call this like `make bump-version TO=5.0.0-rc.0` bump-version: clean-version-bump @echo "--> Bumping version from ${TO}" diff --git a/Samples/watchOS-Swift/README.md b/Samples/watchOS-Swift/README.md deleted file mode 100644 index f720379f479..00000000000 --- a/Samples/watchOS-Swift/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# watchOS-Swift Sample - -Run `make build-for-watchos` to build the Sentry.xcframework on which this -sample project depends on. - - -**Why XCFramework and not include a normal Framework as the other samples do it?** - -With the current project setup we can't add the Sentry.framework, like we do for the other sample projects, to a watchOS project. If we try to add it -we get the following error: - -``` -Building for watchOS Simulator, but the linked framework 'Sentry.framework' is building for iOS Simulator. You may need to configure 'Sentry.framework' to build for watchOS Simulator. -``` - -A solution would be to add Sentry via as a Swift Package, but this would -slow down the development cycle. - -A [XCFramework](https://help.apple.com/xcode/mac/11.4/#/dev6f6ac218b) can be -used on multiple platforms. As of July 2020 we need to manually create -XCFrameworkes with [xcodebuild](https://help.apple.com/xcode/mac/11.4/#/dev544efab96) and therefore we can't link directly to a XCFramework so -Xcode builds it for us. \ No newline at end of file From fa87a796abbc07d65382617a894e4520032d248b Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Tue, 1 Oct 2024 11:36:25 +0200 Subject: [PATCH 11/11] remove shared scheme --- .../watchOS-Swift WatchKit Extension.xcscheme | 107 ------------------ 1 file changed, 107 deletions(-) delete mode 100644 Samples/watchOS-Swift/watchOS-Swift.xcodeproj/xcshareddata/xcschemes/watchOS-Swift WatchKit Extension.xcscheme diff --git a/Samples/watchOS-Swift/watchOS-Swift.xcodeproj/xcshareddata/xcschemes/watchOS-Swift WatchKit Extension.xcscheme b/Samples/watchOS-Swift/watchOS-Swift.xcodeproj/xcshareddata/xcschemes/watchOS-Swift WatchKit Extension.xcscheme deleted file mode 100644 index 3b57887f5b8..00000000000 --- a/Samples/watchOS-Swift/watchOS-Swift.xcodeproj/xcshareddata/xcschemes/watchOS-Swift WatchKit Extension.xcscheme +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -