Skip to content

Commit

Permalink
update folder structiure to support SPM
Browse files Browse the repository at this point in the history
  • Loading branch information
denrase committed Sep 10, 2024
1 parent c185838 commit 8adbf8e
Show file tree
Hide file tree
Showing 14 changed files with 54 additions and 8 deletions.
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)
],
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
File renamed without changes.
File renamed without changes.
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

0 comments on commit 8adbf8e

Please sign in to comment.