Description
Bug Report
Plugin(s)
CapacitorFilesystem (= 6.0.1)
CapacitorFilesystem (= 6.0.0)
CapacitorFilesystem (= 6.0.0-rc.1)
CapacitorFilesystem (= 6.0.0-rc.0)
CapacitorFilesystem (= 6.0.0-beta.1)
CapacitorFilesystem (= 6.0.0-beta.0)
CapacitorFilesystem (= 6.0.0-alpha.2)
CapacitorFilesystem (= 6.0.0-alpha.1)
Capacitor Version
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 6.1.2
@capacitor/core: 6.1.2
@capacitor/android: 6.1.2
@capacitor/ios: 6.1.2
Installed Dependencies:
@capacitor/cli: 6.1.2
@capacitor/core: 6.1.2
@capacitor/android: 6.1.2
@capacitor/ios: 6.0.0
Platform(s)
iOS
Current Behavior
Can't add the CapacitorFileSystem
plugin directly as a dependency in our Package.swift file:
// swift-tools-version: 5.9
import PackageDescription
let package = Package(
name: "ExampleCapacitorPluginSDK",
platforms: [.iOS(.v13)],
products: [
.library(
name: "AsenseiSdkPlugin",
targets: ["AsenseiSdkPlugin"])
],
dependencies: [
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", branch: "6.0.0"),
.package(url: "https://github.com/ionic-team/ionic-portals-ios.git", exact: .init(0, 11, 0)),
.package(url: "https://github.com/ionic-team/capacitor-plugins.git", branch: "@capacitor/[email protected]"),
],
targets: [
.target(
name: "AsenseiSdkPlugin",
dependencies: [
.product(name: "Capacitor", package: "capacitor-swift-pm"),
.product(name: "Cordova", package: "capacitor-swift-pm"),
.product(name: "IonicPortals", package: "ionic-portals-ios"),
.product(name: "CapacitorFilesystem", package: "capacitor-plugins"),
],
path: "ios/Plugin"),
.testTarget(
name: "AsenseiSdkPluginTests",
dependencies: ["AsenseiSdkPlugin"],
path: "ios/PluginTests")
]
)
Output:
the package manifest at '/Package.swift' cannot be accessed (/Package.swift doesn't exist in file system) in https://github.com/ionic-team/capacitor-plugins.git
Expected Behavior
We should be able to natively add any released version of CapacitorFilesystem in our Package.swift
.
Other Technical Details
Swift package manager expects the Package.swift file to be a the root of the repo if added by a url.
Additional Context
A similar problem for the cocoapods was fixed in this issue: #2236