相关疑难解决方法(0)

生成 resource_bundle_accessor,类型 'Bundle' 没有成员 'module'

有时 Xcode 无法确定moduleBundle 中的参数。

类型“捆绑”没有成员“模块”

我的调查表明,SPM 会在名为的文件中自动为该属性生成模块扩展(有时)resource_bundle_accessor

import class Foundation.Bundle

private class BundleFinder {}

extension Foundation.Bundle {
    /// Returns the resource bundle associated with the current Swift module.
    static var module: Bundle = {
        let bundleName = "ABUIKit_ABStyleKit"

        let candidates = [
            // Bundle should be present here when the package is linked into an App.
            Bundle.main.resourceURL,

            // Bundle should be present here when the package is linked into a framework.
            Bundle(for: BundleFinder.self).resourceURL,

            // For command-line …
Run Code Online (Sandbox Code Playgroud)

xcode bundle swift swift-package-manager

22
推荐指数
3
解决办法
4273
查看次数

标签 统计

bundle ×1

swift ×1

swift-package-manager ×1

xcode ×1