SPM: Loading resources from second common module

Hi guys,

i'm encountering an issue that makes me crazy. Dunno if there's a solution available :D

I have a main apps that imports a lot of local SPM modules; some of them are considered base common models, imported by other modules (e.g. Module1 is a base module with common resources for Module2 and Module3).

Unfortunately when i import all the modules, all the resources inside the Module1 seems not loaded (not found!) correctly.

Module1 (common model)

targets: [
                          .target(name: Module1,
                                  dependencies: [],
                                  resources: [
                                      .process("Resources")
                                  ]),

Module2

targets: [
                          .target(name: Module2,
                                  dependencies: [
                                      .byName(name: Module1),
                                  ],
                                  resources: [
                                      .process("Resources")
                                  ]),

Module3

targets: [
                          .target(name: Module3,
                                  dependencies: [
                                      .byName(name: Module1),
                                  ],
                                  resources: [
                                      .process("Resources")
                                  ]),

Example of errors i'm encountering:

Calls from main app (.workspace) with imported SPM Module1, 2, 3.

Bundle.module.path(forResource: <xib file in Module1>, ofType: "nib") => nil

Bundle.module.loadNibNamed(<xib file in Module1>, owner: self, options: nil)?.first as? UIView => nil

Do you have any idea how to load correctly all the dependencies?

SPM: Loading resources from second common module
 
 
Q