Skip to content

Commit

Permalink
Merge 970b026 into 48c7211
Browse files Browse the repository at this point in the history
  • Loading branch information
brustolin authored Nov 21, 2022
2 parents 48c7211 + 970b026 commit 26a56f3
Show file tree
Hide file tree
Showing 52 changed files with 581 additions and 193 deletions.
1 change: 1 addition & 0 deletions .github/workflows/benchmarking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- master
- 8.0.0

pull_request:
paths:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- master
- 8.0.0
- release/**

pull_request:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- master
- 8.0.0

pull_request:
paths:
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- master
- 8.0.0
paths:
- 'Sources/**'
- 'Tests/**'
Expand Down Expand Up @@ -39,8 +40,8 @@ jobs:
- run: ./scripts/ci-select-xcode.sh
- run: make analyze

validate-podspec:
name: Validate Podspec
validate-podspec-framework:
name: Validate Podspec as Framework
runs-on: macos-12
strategy:
matrix:
Expand All @@ -50,7 +51,21 @@ jobs:
- uses: actions/checkout@v3
- run: ./scripts/ci-select-xcode.sh
- name: Validate Podspec
run: pod lib lint --verbose --platforms=${{ matrix.platform }}
run: pod lib lint --verbose --platforms=${{ matrix.platform }} Sentry.podspec --include-podspecs=SentryPrivate.podspec
shell: sh

validate-podspec-static:
name: Validate Podspec as Static library
runs-on: macos-12
strategy:
matrix:
platform: ['ios', 'macos', 'tvos', 'watchos']

steps:
- uses: actions/checkout@v3
- run: ./scripts/ci-select-xcode.sh
- name: Validate Podspec
run: pod lib lint --verbose --platforms=${{ matrix.platform }} Sentry.podspec --include-podspecs=SentryPrivate.podspec --use-libraries
shell: sh

validate-high-risk-files:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/saucelabs-UI-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
push:
branches:
- master
- 8.0.0

pull_request:
paths:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- master
- 8.0.0
- release/**

pull_request:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/testflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- master
- 8.0.0
paths:
- 'Sources/**'
- 'Samples/iOS-Swift/**'
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## Unreleased

This version adds a dependency on Swift.

### Breaking Changes

- Make public APIs Swift friendly (#)
- Renamed `SentrySDK.addBreadcrumb(crumb:)` to `SentrySDK.addBreadcrumb(_ crumb:)`
- Renamed `SentryClient.add(_ crumb:)` to `SentryClient.addBreadcrumb(_ crumb:)`
- Renamed `SentryClient.add(_ attachment:)` to `SentryClient.addAttachment(_ attachment:)`
- Renamed `SentryClient.apply(to:)` to `SentryClient.applyTo(session:)`
- Renamed `SentryClient.apply(to:maxBreadcrumb:)` to `SentryClient.applyTo(event:maxBreadcrumbs:)`

### Features

- Properly demangle Swift class name (#2162)

## 7.31.2

### Fixes
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,4 @@ git-commit-add:

release-pod:
pod trunk push Sentry.podspec
pod trunk push SentryPrivate.podspec
7 changes: 7 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ let package = Package(
.library(name: "Sentry-Dynamic", type: .dynamic, targets: ["Sentry"])
],
targets: [
.target( name: "SentryPrivate",
path: "Sources",
sources: [
"Swift"
]
),
.target(
name: "Sentry",
dependencies: ["SentryPrivate"],
path: "Sources",
sources: [
"Sentry/",
Expand Down
2 changes: 1 addition & 1 deletion Samples/Carthage-Validation/Framework/input.xcfilelist
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$(SRCROOT)/Carthage/Build/iOS/Sentry.framework
$(SRCROOT)/Carthage/Build/iOS/Sentry.framework
2 changes: 1 addition & 1 deletion Samples/Carthage-Validation/Framework/output.xcfilelist
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Sentry.framework
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Sentry.framework
15 changes: 15 additions & 0 deletions Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@
remoteGlobalIDString = 637AFDA5243B02760034958B;
remoteInfo = "iOS-Swift";
};
D81A3499291D0B2C005A27A9 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6308532C2440C44F00DDE4CE /* Sentry.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D81A3488291D0AC0005A27A9;
remoteInfo = SentryPrivate;
};
D83A30CA279F075800372D0A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6308532C2440C44F00DDE4CE /* Sentry.xcodeproj */;
Expand Down Expand Up @@ -350,6 +357,7 @@
children = (
630853322440C44F00DDE4CE /* Sentry.framework */,
630853342440C44F00DDE4CE /* SentryTests.xctest */,
D81A349A291D0B2C005A27A9 /* SentryPrivate.framework */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -720,6 +728,13 @@
remoteRef = 630853332440C44F00DDE4CE /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
D81A349A291D0B2C005A27A9 /* SentryPrivate.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = SentryPrivate.framework;
remoteRef = D81A3499291D0B2C005A27A9 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */

/* Begin PBXResourcesBuildPhase section */
Expand Down
4 changes: 2 additions & 2 deletions Samples/iOS-Swift/iOS-Swift/Tools/MetricKitManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class MetricKitManager: NSObject, MXMetricManagerSubscriber {
}

SentrySDK.capture(message: "MetricKit received MXMetricPayload.") { scope in
attachments.forEach { scope.add($0) }
attachments.forEach { scope.addAttachment($0) }
}
}

Expand All @@ -34,7 +34,7 @@ class MetricKitManager: NSObject, MXMetricManagerSubscriber {
}

SentrySDK.capture(message: "MetricKit received MXDiagnosticPayload.") { scope in
attachments.forEach { scope.add($0) }
attachments.forEach { scope.addAttachment($0) }
}
}
}
6 changes: 3 additions & 3 deletions Samples/iOS-Swift/iOS-Swift/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ class ViewController: UIViewController {
scope.setUser(user)

if let path = Bundle.main.path(forResource: "Tongariro", ofType: "jpg") {
scope.add(Attachment(path: path, filename: "Tongariro.jpg", contentType: "image/jpeg"))
scope.addAttachment(Attachment(path: path, filename: "Tongariro.jpg", contentType: "image/jpeg"))
}
if let data = "hello".data(using: .utf8) {
scope.add(Attachment(data: data, filename: "log.txt"))
scope.addAttachment(Attachment(data: data, filename: "log.txt"))
}
}

Expand Down Expand Up @@ -75,7 +75,7 @@ class ViewController: UIViewController {
let crumb = Breadcrumb(level: SentryLevel.info, category: "Debug")
crumb.message = "tapped addBreadcrumb"
crumb.type = "user"
SentrySDK.addBreadcrumb(crumb: crumb)
SentrySDK.addBreadcrumb(crumb)
}

@IBAction func captureMessage(_ sender: Any) {
Expand Down
2 changes: 1 addition & 1 deletion Samples/iOS-SwiftUI/iOS-SwiftUI/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ struct ContentView: View {
let crumb = Breadcrumb(level: SentryLevel.info, category: "Debug")
crumb.message = "tapped addBreadcrumb"
crumb.type = "user"
SentrySDK.addBreadcrumb(crumb: crumb)
SentrySDK.addBreadcrumb(crumb)
}

var captureMessageAction: () -> Void = {
Expand Down
4 changes: 2 additions & 2 deletions Samples/macOS-Swift/macOS-Swift/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ class AppDelegate: NSObject, NSApplicationDelegate {

SentrySDK.configureScope { scope in
if let path = Bundle.main.path(forResource: "Tongariro", ofType: "jpg") {
scope.add(Attachment(path: path, filename: "Tongariro.jpg", contentType: "image/jpeg"))
scope.addAttachment(Attachment(path: path, filename: "Tongariro.jpg", contentType: "image/jpeg"))
}

if let data = "hello".data(using: .utf8) {
scope.add(Attachment(data: data, filename: "log.txt"))
scope.addAttachment(Attachment(data: data, filename: "log.txt"))
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Samples/macOS-Swift/macOS-Swift/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ViewController: NSViewController {
let crumb = Breadcrumb(level: SentryLevel.info, category: "Debug")
crumb.message = "tapped addBreadcrumb"
crumb.type = "user"
SentrySDK.addBreadcrumb(crumb: crumb)
SentrySDK.addBreadcrumb(crumb)
}

@IBAction func captureMessage(_ sender: Any) {
Expand Down
11 changes: 6 additions & 5 deletions Sentry.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Pod::Spec.new do |s|
s.requires_arc = true
s.frameworks = 'Foundation'
s.libraries = 'z', 'c++'
s.swift_versions = "5.5"
s.pod_target_xcconfig = {
'GCC_ENABLE_CPP_EXCEPTIONS' => 'YES',
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++14',
Expand All @@ -26,20 +27,20 @@ Pod::Spec.new do |s|
}

s.default_subspecs = ['Core']
s.dependency "SentryPrivate", "7.31.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}"
sp.public_header_files = "Sources/Sentry/Public/*.h"
"Sources/SentryCrash/**/*.{h,hpp,m,mm,c,cpp}", "Sources/Swift/Sentry.swift"
sp.public_header_files =
"Sources/Sentry/Public/*.h"
end

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/SentryCrash/**/*.{h,hpp,m,mm,c,cpp}", "Sources/Swift/Sentry.swift"

sp.public_header_files =
"Sources/Sentry/Public/*.h", "Sources/Sentry/include/PrivateSentrySDKOnly.h"
end

end
Loading

0 comments on commit 26a56f3

Please sign in to comment.