ReactiveX / RxSwift

Reactive Programming in Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

xcodebuild archive fails for RxCocoa using SPM

hungrxyz opened this issue · comments

Short description of the issue:

Archiving a framework which is using RxCocoa as a Swift package dependency fails using xcodebuild.

Expected outcome:

Archive succeeds.

What actually happens:

Here's my command to archive the framework:

xcodebuild archive \
    -project Project.xcodeproj \
    -scheme Scheme \
    -destination "generic/platform=iOS" \
    -configuration Release \
    -archivePath "archives/Release-iOS" \
    SKIP_INSTALL=NO \
    BUILD_LIBRARY_FOR_DISTRIBUTION=YES \

And here's the command line output:

** ARCHIVE FAILED **

The following build commands failed:
SwiftVerifyEmittedModuleInterface normal arm64 Verifying\ emitted\ module\ interface\ RxCocoa.private.swiftinterface /Users/.../DerivedData/Project-ericldteywlbdydxfxsgvkaxpvdj/Build/Intermediates.noindex/ArchiveIntermediates/Project/IntermediateBuildFilesPath/RxSwift.build/Release-iphoneos/RxCocoa.build/Objects-normal/arm64/RxCocoa.private.swiftinterface (in target 'RxCocoa' from project 'RxSwift')
SwiftVerifyEmittedModuleInterface normal arm64 Verifying\ emitted\ module\ interface\ RxCocoa.swiftinterface /Users/.../DerivedData/Project-ericldteywlbdydxfxsgvkaxpvdj/Build/Intermediates.noindex/ArchiveIntermediates/Project/IntermediateBuildFilesPath/RxSwift.build/Release-iphoneos/RxCocoa.build/Objects-normal/arm64/RxCocoa.swiftinterface (in target 'RxCocoa' from project 'RxSwift')
(2 failures)

RxSwift/RxCocoa/RxBlocking/RxTest version/commit

6.6.0

Platform/Environment

  • iOS
  • macOS
  • tvOS
  • watchOS
  • playgrounds

How easy is to reproduce? (chances of successful reproduce after running the self contained code)

  • easy, 100% repro
  • sometimes, 10%-100%
  • hard, 2% - 10%
  • extremely hard, %0 - 2%

Xcode version:

Xcode 14.3.1

Installation method:

  • CocoaPods
  • Carthage
  • Git submodules
  • Swift Package Manager

I have multiple versions of Xcode installed:
(so we can know if this is a potential cause of your issue)

  • yes (which ones)
  • no

Level of RxSwift knowledge:
(this is so we can understand your level of knowledge
and formulate the response in an appropriate manner)

  • just starting
  • I have a small code base
  • I have a significant code base

try it:

xcodebuild archive \
    -project Project.xcodeproj \
    -scheme Scheme \
    -destination "generic/platform=iOS" \
    -configuration Release \
    -archivePath "archives/Release-iOS" \
    SKIP_INSTALL=NO \
    BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
OTHER_SWIFT_FLAGS="-no-verify-emitted-module-interface"

try it:

xcodebuild archive \
    -project Project.xcodeproj \
    -scheme Scheme \
    -destination "generic/platform=iOS" \
    -configuration Release \
    -archivePath "archives/Release-iOS" \
    SKIP_INSTALL=NO \
    BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
OTHER_SWIFT_FLAGS="-no-verify-emitted-module-interface"

I think I tried that already and it didn't help but I'll try again to make sure and report back this week hopefully.

I'm also not sure if it works well.
Maybe it will generate another error.