Skip to content

Commit

Permalink
Merge branch 'main' into impr/capture-profile-on-bg-thread
Browse files Browse the repository at this point in the history
  • Loading branch information
philipphofmann committed Oct 2, 2024
2 parents acf9b68 + e88fe9a commit 696f141
Show file tree
Hide file tree
Showing 7 changed files with 133 additions and 58 deletions.
18 changes: 1 addition & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
scheme:
- macOS-Swift
- iOS13-Swift
- watchOS-Swift WatchKit App

steps:
- uses: actions/checkout@v4
Expand All @@ -73,23 +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
-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.
Expand Down
2 changes: 1 addition & 1 deletion Brewfile.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@
"system": {
"macos": {
"sonoma": {
"HOMEBREW_VERSION": "4.3.23",
"HOMEBREW_VERSION": "4.3.24-119-g3b26dd8",
"HOMEBREW_PREFIX": "/opt/homebrew",
"Homebrew/homebrew-core": "api",
"CLT": "16.0.0.0.1.1724870825",
Expand Down
10 changes: 0 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,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}"
Expand Down
22 changes: 0 additions & 22 deletions Samples/watchOS-Swift/README.md

This file was deleted.

135 changes: 129 additions & 6 deletions Samples/watchOS-Swift/watchOS-Swift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand All @@ -19,12 +20,60 @@
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, ); }; };
9273C09E2C89E76B0006FD34 /* Sentry.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9273C09C2C89E76B0006FD34 /* Sentry.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
84BA72BB2C9369D70045B828 /* GitInjections.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84BA72B92C9369D70045B828 /* GitInjections.swift */; };
/* 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 */;
Expand Down Expand Up @@ -64,20 +113,21 @@
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;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
498CC18E2C9217D50045143E /* Sentry.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Sentry.xcodeproj; path = ../../Sentry.xcodeproj; sourceTree = "<group>"; };
7B34280125876DFC00056519 /* Tongariro.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = Tongariro.jpg; sourceTree = "<group>"; };
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; };
Expand All @@ -98,6 +148,7 @@
7B82C4BA24C98CFC002CA6D1 /* Sentry.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Sentry.xcframework; path = libs/Sentry.xcframework; sourceTree = "<group>"; };
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; };
84BA72B92C9369D70045B828 /* GitInjections.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GitInjections.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand All @@ -106,16 +157,30 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
7B82C4C624C993E6002CA6D1 /* Sentry.xcframework 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 = "<group>";
};
7B82C47824C98A93002CA6D1 = {
isa = PBXGroup;
children = (
498CC18E2C9217D50045143E /* Sentry.xcodeproj */,
84BA72BA2C9369D70045B828 /* Shared */,
7B82C48724C98A93002CA6D1 /* watchOS-Swift WatchKit App */,
7B82C49624C98A95002CA6D1 /* watchOS-Swift WatchKit Extension */,
Expand Down Expand Up @@ -172,6 +237,7 @@
7B82C4B524C98AF4002CA6D1 /* Frameworks */ = {
isa = PBXGroup;
children = (
9273C09C2C89E76B0006FD34 /* Sentry.framework */,
7B82C4C224C9939A002CA6D1 /* Sentry.framework */,
7B82C4BF24C99340002CA6D1 /* Sentry.framework */,
7B82C4BA24C98CFC002CA6D1 /* Sentry.xcframework */,
Expand Down Expand Up @@ -234,12 +300,13 @@
7B82C48F24C98A95002CA6D1 /* Frameworks */,
84BA72A32C9368660045B828 /* Inject Git information into Info.plist */,
7B82C49024C98A95002CA6D1 /* Resources */,
7B82C4C824C993E6002CA6D1 /* Embed Frameworks */,
9273C09F2C89E76B0006FD34 /* Embed Frameworks */,
84BA72A42C9368670045B828 /* Reset Git fields in Info.plist */,
);
buildRules = (
);
dependencies = (
498CC1A42C9217DB0045143E /* PBXTargetDependency */,
);
name = "watchOS-Swift WatchKit Extension";
productName = "watchOS-Swift WatchKit Extension";
Expand Down Expand Up @@ -278,6 +345,12 @@
mainGroup = 7B82C47824C98A93002CA6D1;
productRefGroup = 7B82C48024C98A93002CA6D1 /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 498CC18F2C9217D50045143E /* Products */;
ProjectRef = 498CC18E2C9217D50045143E /* Sentry.xcodeproj */;
},
);
projectRoot = "";
targets = (
7B82C47E24C98A93002CA6D1 /* watchOS-Swift */,
Expand All @@ -287,6 +360,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;
Expand Down Expand Up @@ -372,6 +490,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 */;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
allowLocationSimulation = "YES"
notificationPayloadFile = "watchOS-Swift WatchKit Extension/PushNotificationPayload.apns">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
Expand Down
1 change: 0 additions & 1 deletion Sources/Configuration/SDK.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 696f141

Please sign in to comment.