-
-
Notifications
You must be signed in to change notification settings - Fork 38
Description
Problem: Sentry Capacitor allows targeting multiple "Capacitor" SDKs. That is not an issue on the JavaScript side on package.json by defining "@capacitor/core": "^7.0.0 || ^8.0.0"
The issue starts on Package.swift where we can't target Capacitor V7 and V8, only a range without break changes like 7.0.0 to 7.9.9.
sentry-capacitor/Package.swift
Line 13 in 35d1bbb
| .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0"), |
sentry-capacitor/Package.swift
Lines 1 to 30 in 35d1bbb
| // swift-tools-version: 5.9 | |
| import PackageDescription | |
| let package = Package( | |
| name: "SentryCapacitor", | |
| platforms: [.iOS(.v14)], | |
| products: [ | |
| .library( | |
| name: "SentryCapacitor", | |
| targets: ["SentryCapacitorPlugin"]) | |
| ], | |
| dependencies: [ | |
| .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0"), | |
| .package(url: "https://github.com/getsentry/sentry-cocoa", from: "8.56.2") | |
| ], | |
| targets: [ | |
| .target( | |
| name: "SentryCapacitorPlugin", | |
| dependencies: [ | |
| .product(name: "Capacitor", package: "capacitor-swift-pm"), | |
| .product(name: "Cordova", package: "capacitor-swift-pm"), | |
| .product(name: "Sentry", package: "sentry-cocoa") | |
| ], | |
| path: "ios/Sources/SentryCapacitorPlugin"), | |
| .testTarget( | |
| name: "SentryCapacitorPluginTests", | |
| dependencies: ["SentryCapacitorPlugin"], | |
| path: "ios/Tests/SentryCapacitorPluginTests") | |
| ] | |
| ) |
Should we release two major versions of Sentry Capacitor, that shares the same codebase but differs on which capacitor is used? let's say, Sentry Capacitor 4.0.0 will only support Capacitor 7.0.0 whereas Sentry Capacitor 5.0.0 will support 8.0.0 up to 8.9.9.
Are there better approaches for this case?