iOS Development

ios – Including third occasion dependancy in swift bundle supervisor points

Spread the love


I’ve created one swift bundle supervisor. In that i’ve so as to add third occasion bundle
https://github.com/danielgindi/Charts. I’ve added that bundle as dependancy in Package deal.swift file. It has been added and displaying beneath bundle dependancies. However when i attempt to use that bundle, it’s giving me error No such module ‘DGCharts’. What might be the problem right here?

Package deal file

// swift-tools-version: 5.7
// The swift-tools-version declares the minimal model of Swift required to construct this bundle.

    import PackageDescription
    
    let bundle = Package deal(
        identify: "XYZFramework",
        platforms: [
            .iOS(.v15)
        ],
    
        
        merchandise: [
            // Products define the executables and libraries a package produces, and make them visible to other packages.
            .library(
                name: "XYZFramework",
                targets: ["XYZFramework"]),
        ],
        dependencies: [
            // Dependencies declare other packages that this package depends on.
            // .package(url: /* package url */, from: "1.0.0"),
            .package(url: "https://github.com/danielgindi/Charts.git", .upToNextMajor(from: "5.0.0"))
        ],
        targets: [
            // Targets are the basic building blocks of a package. A target can define a module or a test suite.
            // Targets can depend on other targets in this package, and on products in packages this package depends on.
            .target(
                name: "XYZFramework",
                dependencies: []
                /*,
                sources: [Resource.process("XYZFramework/Sources/XYZFramework/Resources/XYZFramework.xcassets")]*/),
            .testTarget(
                identify: "XYZFrameworkTests",
                dependencies: ["XYZFramework"]),
        ]
    )
import SwiftUI
import DGCharts

struct SwiftUIView: View {
    let chartView = PieChartView()

    var physique: some View {
        Textual content(/*@START_MENU_TOKEN@*/"Howdy, World!"/*@END_MENU_TOKEN@*/)
    }
}

#Preview {
    SwiftUIView()
}

In above it’s giving error No such module ‘DGCharts’

Leave a Reply

Your email address will not be published. Required fields are marked *