Xcode 12.5 and SPM binary dependencies

I've run into an issue that was allegedly fixed in Xcode 12.5, but it still occurs for me. Moreover the published workarounds seem to have no effect. My project builds fine, but if I Archive it, it fails compiling one of the source dependencies, saying it can't find a (binary) module to import. The workaround is to directly include the module when setting up the SPM dependency, as discussed here: braintree_ios/SWIFT_PACKAGE_MANAGER.md at master · braintree/braintree_ios · GitHub

None of this is working for me. I've removed and re-added the dependencies a few times. It seemed like one time it worked, and the archive succeeded; I thought it was just because I added the two Braintree dependencies in a particular order. But when I went back to archive again (after bumping the build number), it failed to build. No amount of removing and re-adding the dependencies is helping.

I'm going to have to make a build in the next few days and I'm really at a loss here.

My exact issue: Unable to archive project which use BraintreeDataCollector or PayPalDataCollector · Issue #576 · braintree/braintree_ios · GitHub

Showing All Messages
…/Library/Developer/Xcode/DerivedData/myapp-ddpqzanhcoirbhgiutyxskvtupcs/SourcePackages/checkouts/braintree_ios/Sources/PayPalDataCollector/Public/PayPalDataCollector/PPDataCollector.swift:1:8: No such module 'PPRiskMagnes'

Unresolved Swift bug: [SR-13803] Can’t archive App that uses a swift package with an xcframework · Issue #4481 · apple/swift-package-manager · GitHub

I have this issue too. I have made more swift wrappers for my objective-c binaries in the project. When I building the project, It's seems ok. But It's failed for archiving.

1 Like