Some times Xcode can not determine the module
parameter in the Bundle.
Type \'Bundle\' has no member \'module\'
My inve
Bundle.module
will only be generated by SwiftPM if the resources
in the Package.swift
file is not empty and the specified resources actually exist.
So there are two possible reasons why it might not work for you:
resources
specified in Package.swift
. Fix like this:.target(
name: "MyLibrary",
dependencies: [
/* your dependencies */
],
resources: [
.copy("JsonData"),
.process("Assets.xcassets"),
]
),
The specified paths don't exist or are empty.
Fix by checking that you've actually placed your resources inside
the Sources/MyLibrary
directory. A common mistake is to place them
directly to Sources
or to a different targets subfolder.