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

[CapacitorFileSystem] Unable to add plugin directly in our Package.swift as a dependency: CapacitorFilesystem (= 6.0.1) #2243

Open
physxP opened this issue Nov 13, 2024 · 0 comments

Comments

@physxP
Copy link

physxP commented Nov 13, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants