Skip to content

Building XCFramework fails with "SwiftVerifyEmittedModuleInterface" error when archiving Web3swift #905

@Saz-dev

Description

@Saz-dev

Description

When trying to archive and create an .xcframework for a project that includes Web3swift, the build fails with the following error:

Command SwiftVerifyEmittedModuleInterface failed with a nonzero exit code

This happens only during archive (Release) builds with
BUILD_LIBRARY_FOR_DISTRIBUTION=YES.


Expected Behavior

The framework should archive successfully and emit valid .swiftinterface files for distribution without verification errors.


Actual Behavior

Archiving fails with interface verification errors for Web3swift and its dependencies (secp256k1, CryptoSwift, etc.).

Example log:

SwiftVerifyEmittedModuleInterface normal arm64 Verifying emitted module interface Web3Core.swiftinterface SwiftVerifyEmittedModuleInterface normal arm64 Verifying emitted module interface secp256k1.swiftinterface Command SwiftVerifyEmittedModuleInterface failed with a nonzero exit code

Steps to Reproduce

  1. Create a new iOS Framework project in Xcode.

  2. Add Web3swift via Swift Package Manager.

  3. Enable BUILD_LIBRARY_FOR_DISTRIBUTION=YES for the framework target.

  4. Run:

    xcodebuild archive \ -scheme YourFrameworkName \ -destination "generic/platform=iOS" \ -archivePath "./build/ios_devices.xcarchive" \ SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
  5. The archive fails with the interface verification error above.


Environment

Item | Version -- | -- Xcode | (example) 16.0 Swift | (example) 5.10 Web3swift | (example) 3.0.2 CryptoSwift | (example) 1.8.1 Platform | iOS

Workarounds Tried

  • Using SWIFT_VERIFICATION_MODE=none → allows archive to succeed but .swiftinterface files are skipped.

  • Disabling BUILD_LIBRARY_FOR_DISTRIBUTION → archive succeeds but framework isn’t binary-compatible.

  • Updating dependencies (CryptoSwift, secp256k1) → same result.


Additional Context

This issue blocks creating a distributable .xcframework for private SDK distribution.
It seems related to Swift module interface verification failing in one of Web3swift’s submodules.

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