Skip to content

Xcode reports a "module not found" error even though the module is one of the target dependencies #5951

@crazytonyli

Description

@crazytonyli

Description

Mix.zip is an example Swift package.

There are three targets in this package:

  • MixCore is implemented in Swift.
  • MixObjC depends on MixCore and is implemented in Objective-C.
  • Mix depends on both above targets and is implemented in Swift.

Expected behavior

Mix scheme can be built successfully.

Actual behavior

Mix scheme can't be built.

Screen Shot 2022-12-07 at 11 25 48 AM

Steps to reproduce

  1. Open this project in Xcode.
  2. MixObjC scheme can be built successfully.
  3. Xcode reports an error when building Mix scheme: "module not found" error in MixObjc/ObjC.h.

Screen Shot 2022-12-07 at 11 25 48 AM

Swift Package Manager version/commit hash

Release 5.7

Swift & OS version (output of swift --version && uname -a)

swift-driver version: 1.62.15 Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51)
Target: arm64-apple-macosx12.0
Darwin A8C-MBP.local 21.6.0 Darwin Kernel Version 21.6.0: Thu Sep 29 20:13:56 PDT 2022; root:xnu-8020.240.7~1/RELEASE_ARM64_T6000 arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions