Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPM Support #2280

Merged
merged 35 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
8adbf8e
update folder structiure to support SPM
denrase Sep 10, 2024
a0de8e2
Merge branch 'main' into feat/spm
denrase Oct 1, 2024
0ccc10e
remove trailing comma
denrase Oct 1, 2024
a2afc01
update folder structure for mac
denrase Oct 1, 2024
16bae70
Merge branch 'main' into feat/spm
denrase Oct 8, 2024
0636b64
Merge branch 'main' into feat/spm
denrase Nov 5, 2024
9a635fa
fix spm import
denrase Nov 5, 2024
6034522
update to import correctly (u
denrase Nov 5, 2024
acc2ff0
move to swift as main spm package
denrase Nov 6, 2024
160e5a5
setup macOS
denrase Nov 6, 2024
31fcd63
prefix hybrid import with _
denrase Nov 6, 2024
866fe0f
add cl entry, update hybrid module name
denrase Nov 6, 2024
bb6d8ac
add spm to guthub workflow
denrase Nov 6, 2024
a4e2e38
update Package.swift to use remote sentry-cocoa
denrase Nov 6, 2024
c694a20
Merge branch 'main' into feat/spm
denrase Nov 11, 2024
249bb1e
bump
denrase Nov 11, 2024
00cd940
Merge branch 'main' into feat/spm
denrase Nov 25, 2024
aaf4042
Merge branch 'main' into feat/spm
denrase Dec 9, 2024
45b985e
Bump sentry cocoa version
denrase Dec 9, 2024
b2e572d
Merge branch 'main' into feat/spm
denrase Dec 11, 2024
bffad02
update script to also set sentry-cocoa verison in spm file
denrase Dec 11, 2024
cc12932
Merge branch 'main' into feat/spm
denrase Dec 11, 2024
a6d93f2
fix cl
denrase Dec 17, 2024
7dc46fd
Merge branch 'main' into feat/spm
denrase Dec 17, 2024
b1b32ca
Bump to release version
denrase Dec 17, 2024
a63be8b
Merge branch 'main' into feat/spm
denrase Dec 17, 2024
b50e0b8
only build and don’t run with spm support
denrase Dec 17, 2024
cf145b9
fix pods file
denrase Dec 17, 2024
b3d4f09
Merge branch 'main' into feat/spm
denrase Dec 19, 2024
5f38dda
remove lefover comment
denrase Dec 19, 2024
3b4be53
Merge branch 'main' into feat/spm
denrase Jan 20, 2025
b2ebcf5
bump
denrase Jan 20, 2025
4ae483e
fix cl
denrase Jan 20, 2025
63f93d3
Merge branch 'main' into feat/spm
denrase Jan 20, 2025
124590f
fix cl
denrase Jan 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions flutter/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ build/

.vscode/launch.json
cocoa_bindings_temp

ios/sentry_flutter/Package.resolved

2 changes: 1 addition & 1 deletion flutter/example/ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import UIKit
import Flutter
import Sentry

@UIApplicationMain
@main
@objc class AppDelegate: FlutterAppDelegate {
private let _channel = "example.flutter.sentry.io"

Expand Down
Empty file removed flutter/ios/Assets/.gitkeep
Empty file.
4 changes: 2 additions & 2 deletions flutter/ios/sentry_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Sentry SDK for Flutter with support to native through sentry-cocoa.
s.authors = "Sentry"
s.source = { :git => "https://github.com/getsentry/sentry-dart.git",
:tag => s.version.to_s }
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.source_files = 'sentry_flutter/Sources/**/*'
s.public_header_files = 'sentry_flutter/Sources/**/*.h'
s.dependency 'Sentry/HybridSDK', '8.36.0'
s.ios.dependency 'Flutter'
s.osx.dependency 'FlutterMacOS'
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions flutter/ios/sentry_flutter/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "sentry_flutter",
platforms: [
.iOS("12.0"),
.macOS("10.13")
],
products: [
.library(name: "sentry-flutter", targets: ["sentry_flutter", "sentry_flutter_swift"])
],
dependencies: [
.package(url: "https://github.com/getsentry/sentry-cocoa", from: "8.36.0"),

Check failure on line 16 in flutter/ios/sentry_flutter/Package.swift

View workflow job for this annotation

GitHub Actions / swift-lint

Trailing Comma Violation: Collection literals should not have trailing commas (trailing_comma)
denrase marked this conversation as resolved.
Show resolved Hide resolved
],
targets: [
.target(
name: "sentry_flutter",
dependencies: [
"sentry_flutter_swift",
.product(name: "Sentry", package: "sentry-cocoa")
],
publicHeadersPath:"include"

Check failure on line 25 in flutter/ios/sentry_flutter/Package.swift

View workflow job for this annotation

GitHub Actions / swift-lint

Colon Spacing Violation: Colons should be next to the identifier when specifying a type and next to the key in dictionary literals (colon)
),
// SPM does not support mixed-language, so we need to move the swift files into a separate target
.target(
name: "sentry_flutter_swift",
dependencies: [
.product(name: "Sentry", package: "sentry-cocoa")
],
publicHeadersPath:"include"

Check failure on line 33 in flutter/ios/sentry_flutter/Package.swift

View workflow job for this annotation

GitHub Actions / swift-lint

Colon Spacing Violation: Colons should be next to the identifier when specifying a type and next to the key in dictionary literals (colon)
)
]
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import "SentryFlutterPlugin.h"
#import "include/SentryFlutterPlugin.h"
#if __has_include(<sentry_flutter/sentry_flutter-Swift.h>)
#import <sentry_flutter/sentry_flutter-Swift.h>
#else
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import "SentryFlutterReplayBreadcrumbConverter.h"
#import "include/SentryFlutterReplayBreadcrumbConverter.h"

@import Sentry;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,9 @@ public class SentryFlutterPluginApple: NSObject, FlutterPlugin {

#if canImport(UIKit) && !SENTRY_NO_UIKIT
#if os(iOS) || os(tvOS)
let breadcrumbConverter = SentryFlutterReplayBreadcrumbConverter()
let screenshotProvider = SentryFlutterReplayScreenshotProvider(channel: self.channel)
PrivateSentrySDKOnly.configureSessionReplay(with: breadcrumbConverter, screenshotProvider: screenshotProvider)
let breadcrumbConverter = SentryFlutterReplayBreadcrumbConverter()
let screenshotProvider = SentryFlutterReplayScreenshotProvider(channel: self.channel)
PrivateSentrySDKOnly.configureSessionReplay(with: breadcrumbConverter, screenshotProvider: screenshotProvider)
#endif
#endif

Expand Down
Loading