在阅读了此处列出的有关如何将Firebase
依赖项添加到 Swift 包的说明后,我无法让它工作,这是我的Package.swift
清单:
import PackageDescription
let package = Package(
name: "MyPackage",
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "MyPackage",
targets: ["MyPackage"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(name: "Firebase",
url: "https://github.com/firebase/firebase-ios-sdk.git",
.upToNextMajor(from: "8.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: "MyPackage",
dependencies: [.product(name: "FirebaseRemoteConfig", package: "Firebase")]),
.testTarget(
name: "MyPackageTests",
dependencies: ["MyPackage"]),
]
)
Sources/MyPackage.swift
包图可以毫无问题地解决,但是当我尝试从编译器开始添加自己的代码时import FirebaseRemoteConfig
会抱怨:
No such model 'FirebaseRemoteConfig'
.
我的设置出了什么问题?