Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StripeTerminal.h is missing an import of SCPOfflineDetails.h #176

Closed
Westacular opened this issue Oct 27, 2022 · 1 comment · Fixed by #178
Closed

StripeTerminal.h is missing an import of SCPOfflineDetails.h #176

Westacular opened this issue Oct 27, 2022 · 1 comment · Fixed by #178

Comments

@Westacular
Copy link

Summary

StripeTerminal.h doesn't import SCPOfflineDetails.h, and as a result, any targets which import StripeTerminal receive a warning Umbrella header for module 'StripeTerminal' does not include header 'SCPOfflineDetails.h'

If that target has "treat warnings as errors" enabled, then the warning is promoted to an error and the build fails.

It appears that when SCPOfflineDetails.h was added as a public header in 2.11.0, it was accidentally not added to StripeTerminal.h as well?

Steps to reproduce

It's not surprising that this issue wasn't caught because Xcode seems to be very aggressive with module caching and generally hides the warning as a result.

Nonetheless, I found a simple way to reproduce the issue:

  • Open the Example project in this repo
  • Edit the build settings for the Example target to set SWIFT_TREAT_WARNINGS_AS_ERRORS to Yes
  • In ~/Library/Developer/Xcode/DerivedData, delete both ModuleCache.noindex and the folder for this Example project. Running "Clean Build Folder" in Xcode is not enough clear a previously-successful state, you must delete these folders.
  • Build the Example app

The build will fail:

Screenshot 2022-10-27 at 18 56 21

Installation method

CocoaPods

SDK version

2.13.0

Based on the git history, I believe this problem is also present in 2.12.0 and 2.11.0

Other information

Xcode 14.1 RC 2

@bric-stripe
Copy link
Collaborator

@Westacular thanks for the report! I'm looking to see if we can get this fixed up for our 2.14.0 release scheduled for next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants