Skip to content

Build for Testing Fails for IQKeyboardToolbarManager Due to Missing IQKeyboardCore Symbols #19

@binduojha

Description

@binduojha

Describe the bug
When building the IQKeyboardToolbarManager Swift package independently using:

xcodebuild -scheme IQKeyboardToolbarManager -destination 'generic/platform=iOS' build

the package builds successfully.

However, when building the package as part of the main workspace using Build for Testing, the build fails during the linking phase with the following error:

Undefined symbols for architecture arm64:
(extension in IQKeyboardCore): IQKeyboardCore.IQKeyboardExtended...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1

Observations

The package depends on:

  • IQKeyboardToolbar
  • IQTextInputViewNotification

IQKeyboardCore is a transitive dependency via IQKeyboardToolbar.
The package compiles successfully in isolation.
The failure occurs only during Build for Testing within the workspace.
The failure happens at the linking stage, not compilation.

Root Cause (Suspected)
The IQKeyboardToolbarManager target imports IQKeyboardCore, but it is not explicitly declared as a product dependency in Package.swift.
While transitive dependencies resolve correctly, Xcode's generated PackageProduct.framework during Build for Testing does not link IQKeyboardCore unless it is explicitly declared.

Proposed Fix
Add IQKeyboardCore explicitly to the target dependencies:

.product(name: "IQKeyboardCore", package: "IQKeyboardCore")

This ensures proper linking during dynamic framework generation in workspace builds.

Impact

  • Blocks Build for Testing
  • Affects CI workflows
  • Does not affect standalone package builds

Details
vesrison - 1.1.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions