Xcode 14 RC No Such Module error with SPM

Hi fellow devs,

I updated Xcode to version 14 last week and I wanted to get our app ready for working on Xcode 14. As it turns out, Xcode 14 gives me an error when trying to test our regular scheme which is working fine on Xcode 13.x.

I'm getting No Such Module 'ModuleX' even thought I am importing the module in the Package.swift file. It looks like this:

let package = Package(
    name: "App",
    defaultLocalization: "en",
    platforms: [.iOS(.v13), .macOS(.v10_14)],
    products: [
        .library(name: "DesignSystem", targets: ["DesignSystem"]),
    ],
    dependencies: [
        .package(url: "git@ssh.blablabla/components-ios", from: "2.0.0")
    ],
    targets: [
     .target(
            name: "DesignSystem",
            dependencies: [
                .product(name: "ModuleX", package: "components-ios")
            ]
      )
]
)

I removed a ton of other packages here and renamed some modules because of the example. Other targets have DesignSystem as a dependency and that compiles just fine. I'm just getting very confused about what's going on.

A regular build and run on simulator compiles, but when I'm testing the scheme, he cannot seem to locate this specific Module.
I'm using swift tools version 5.6.

Do you have any advice?

Thanks in advance.

Regards,

Frank.

Hey Frank,

I just upgraded to Xcode 14 today and ran into this issue when archiving a build. I just found a solution for myself, but it's not preferable. I changed all my deployment targets to 16.0 and was able to upload to TestFlight (I had added a few checks for iOS 16, but may need to re-think those).

Hopefully this can help you, but I'll be exploring other options and will share my findings/keep an eye on this thread.

-Joey

1 Like

Hey Joey thanks for the reply,

We need to support at least iOS 13 - iOS 16 so just changing to 16 won't be a solution for us unfortunately.

Same. I will share any findings here.

Have a nice weekend!

Frank

Just quickly tried setting all deployment targets to iOS 16.0 but that does not help me unfortunately.