stripe / stripe-ios

Stripe iOS SDK
https://stripe.com
MIT License
2.12k stars 981 forks source link

Xcode 12.5b3 - Umbrella header for module 'Stripe3DS2' does not include header 'STDSSpacerView.h' #1770

Closed joshbuhler closed 3 years ago

joshbuhler commented 3 years ago

Summary

When importing Stripe via Swift Package Manager, I'm unable to build due to the following error:

Umbrella header for module 'Stripe3DS2' does not include header '<HEADER>'

I get enough of the same error that Xcode stops due to too many errors being emitted. Xcode is complaining about the following:

.../SourcePackages/checkouts/stripe-ios/Stripe3DS2/Stripe3DS2/include/Stripe3DS2.h:53:1: Umbrella header for module 'Stripe3DS2' does not include header 'STDSSecTypeUtilities.h'
.../SourcePackages/checkouts/stripe-ios/Stripe3DS2/Stripe3DS2/include/Stripe3DS2.h:53:1: Umbrella header for module 'Stripe3DS2' does not include header 'STDSDeviceInformationParameter.h'
.../SourcePackages/checkouts/stripe-ios/Stripe3DS2/Stripe3DS2/include/Stripe3DS2.h:53:1: Umbrella header for module 'Stripe3DS2' does not include header 'NSString+EmptyChecking.h'
.../SourcePackages/checkouts/stripe-ios/Stripe3DS2/Stripe3DS2/include/Stripe3DS2.h:53:1: Umbrella header for module 'Stripe3DS2' does not include header 'STDSTransaction+Private.h'
.../SourcePackages/checkouts/stripe-ios/Stripe3DS2/Stripe3DS2/include/Stripe3DS2.h:53:1: Umbrella header for module 'Stripe3DS2' does not include header 'STDSBrandingView.h'
.../SourcePackages/checkouts/stripe-ios/Stripe3DS2/Stripe3DS2/include/Stripe3DS2.h:53:1: Umbrella header for module 'Stripe3DS2' does not include header 'STDSChallengeResponseMessageExtension.h'
.../SourcePackages/checkouts/stripe-ios/Stripe3DS2/Stripe3DS2/include/Stripe3DS2.h:53:1: Umbrella header for module 'Stripe3DS2' does not include header 'STDSDeviceInformationManager.h'
.../SourcePackages/checkouts/stripe-ios/Stripe3DS2/Stripe3DS2/include/Stripe3DS2.h:53:1: Umbrella header for module 'Stripe3DS2' does not include header 'STDSDirectoryServerCertificate.h'
.../SourcePackages/checkouts/stripe-ios/Stripe3DS2/Stripe3DS2/include/Stripe3DS2.h:53:1: Umbrella header for module 'Stripe3DS2' does not include header 'STDSImageLoader.h'
.../SourcePackages/checkouts/stripe-ios/Stripe3DS2/Stripe3DS2/include/Stripe3DS2.h:53:1: Umbrella header for module 'Stripe3DS2' does not include header 'STDSACSNetworkingManager.h'
.../SourcePackages/checkouts/stripe-ios/Stripe3DS2/Stripe3DS2/include/Stripe3DS2.h:53:1: Umbrella header for module 'Stripe3DS2' does not include header 'STDSDebuggerChecker.h'
.../SourcePackages/checkouts/stripe-ios/Stripe3DS2/Stripe3DS2/include/Stripe3DS2.h:53:1: Umbrella header for module 'Stripe3DS2' does not include header 'STDSSelectionButton.h'
.../SourcePackages/checkouts/stripe-ios/Stripe3DS2/Stripe3DS2/include/Stripe3DS2.h:53:1: Umbrella header for module 'Stripe3DS2' does not include header 'STDSChallengeResponseSelectionInfo.h'
.../SourcePackages/checkouts/stripe-ios/Stripe3DS2/Stripe3DS2/include/Stripe3DS2.h:53:1: Umbrella header for module 'Stripe3DS2' does not include header 'Stripe3DS2-Bridging-Header.h'
.../SourcePackages/checkouts/stripe-ios/Stripe3DS2/Stripe3DS2/include/Stripe3DS2.h:53:1: Umbrella header for module 'Stripe3DS2' does not include header 'STDSBundleLocator.h'
.../SourcePackages/checkouts/stripe-ios/Stripe3DS2/Stripe3DS2/include/Stripe3DS2.h:53:1: Umbrella header for module 'Stripe3DS2' does not include header 'STDSSpacerView.h'
.../SourcePackages/checkouts/stripe-ios/Stripe3DS2/Stripe3DS2/include/Stripe3DS2.h:53:1: Umbrella header for module 'Stripe3DS2' does not include header 'STDSThreeDSProtocolVersion+Private.h'
.../SourcePackages/checkouts/stripe-ios/Stripe3DS2/Stripe3DS2/include/Stripe3DS2.h:53:1: Umbrella header for module 'Stripe3DS2' does not include header 'STDSChallengeRequestParameters.h'
.../SourcePackages/checkouts/stripe-ios/Stripe3DS2/Stripe3DS2/include/Stripe3DS2.h:53:1: Umbrella header for module 'Stripe3DS2' does not include...

iOS version

Seeing this with a deployment target of iOS 13.0

Installation method

Swift Package Manager in Xcode 12.5 beta 3

SDK version

21.3.1

Other information

We had previously been using Carthage to integrate Stripe, and we're now migrating to SPM. I had removed Stripe from our project before re-adding it via SPM. While we use several internal frameworks, the Stripe package was added to the main project, and not any of our frameworks.

csabol-stripe commented 3 years ago

@joshbuhler it looks like xcode is expecting private headers to be declared which is suspicious...I'm working on getting Xcode 12.5 installed to see if I could reproduce. If possible could you confirm if this reproduces for you with Xcode 12.4?

joshbuhler commented 3 years ago

Sorry - I meant to update this with some further testing. I was able to duplicate this in 12.4 as well.

However, last night I completely removed Stripe again, reset the SPM caches, nuked the contents of Carthage caches, emptied Xcode's derived data folders, and hit Product > Clean Build Folder in Xcode a half-dozen times. Afterwards, I was then able to add Stripe 21.3.1 as a package in Xcode 12.4, got my app building w/ no errors, and then re-built again successfully in 12.5. So… ¯_(ツ)_/¯

Going to keep an eye on this though, and will update if I can get it to happen again. Thanks for taking a look at it though.

csabol-stripe commented 3 years ago

Thanks for the followup. I'll go ahead an close this issue then, but feel free to re-open or submit if you find more :)

joshbuhler commented 3 years ago

@csabol-stripe - It's back, and this time no amount of cleaning/resetting/etc. is helping. My project will build and run successfully in Xcode 12.4, but the same project with no changes will generate these errors in 12.5b3.

Each cluster of error messages also includes the following: Could not build Objective-C module 'String3DS2'

joshbuhler commented 3 years ago

@csabol-stripe - Finally found the source of my problems. We have the "Treat Warnings as Errors" setting enabled. This isn't an issue in Xcode 12.4, but it will generate the errors in 12.5. I've written this up and posted a sample project with more details: https://github.com/stripe/stripe-ios/issues/1772