Skip to content

Xcode warnings with SPM setup: Umbrella header for module 'YubiKit' does not include header #178

@balazs630

Description

@balazs630

Hi!

We got 109 warnings after integrating YubiKit 4.7.0 with Swift Package Manager to a new Xcode project:

umbrella header for module 'YubiKit' does not include header 'YKFU2FSignResponse+Private.h'
umbrella header for module 'YubiKit' does not include header 'YKFSessionError+Private.h'
umbrella header for module 'YubiKit' does not include header 'YKFTLVRecord.h'
...
Image

Steps to reproduce:

  1. Create a new iOS application project in Xcode 16.4
  2. Select the project file (above the target), click on "Package Dependencies"
  3. Click the + button
  4. Paste the following URL: https://github.com/Yubico/yubikit-ios
  5. Click on "Add Package" and confirm to add YubiKit to the application target
  6. Open a Swift file and import YubiKit
  7. Configure signing with your development team
  8. Select Xcode > Product > Clean Build Folder...
  9. Build the application
    Issue: 109 build time warnings are generated

Things that I tried:

  • Adding the required capabilities for Lightning connector and NFC
  • Adding a Bridging header with #import <YubiKit.h>
  • Setting -ObjC flag at Other Linker Flags
  • Setting -Xcc -Wno-incomplete-umbrella flag at Other Swift Flags

Demo project:
YubiKitSPMWarnings.zip

Working solution:

Every header present in SPM's publicHeadersPath (in our case it's set to SPMHeaderLinks) had to be imported in the umbrella header (in this case YubiKit.h as it matches the name of the package).

In the SPMHeaderLinks folder we have 179 soft links to header files, but in YubiKit.h we only have 62 imports.

Adding all 179 header file imports to the YubiKit.h umbrella header would resolve these Xcode warnings.

Can you please have a look on this please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions