Skip to content

fix: include all public headers unconditionally in umbrella header#595

Open
mikefullerton wants to merge 1 commit intogoogle:mainfrom
temporal-company:fix/umbrella-header-warnings
Open

fix: include all public headers unconditionally in umbrella header#595
mikefullerton wants to merge 1 commit intogoogle:mainfrom
temporal-company:fix/umbrella-header-warnings

Conversation

@mikefullerton
Copy link

Problem

GIDAppCheckError.h and GIDSignInButton.h are conditionally imported in the umbrella header (GoogleSignIn.h) using #if TARGET_OS_IOS guards, but the module map declares them unconditionally. This produces warnings during Xcode's precompiled module generation:

warning: umbrella header for module 'GoogleSignIn' does not include header 'GIDAppCheckError.h'
warning: umbrella header for module 'GoogleSignIn' does not include header 'GIDSignInButton.h'

This affects every project that uses GoogleSignIn via SPM on macOS.

Fix

Remove the #if TARGET_OS guard around the imports in GoogleSignIn.h. Both headers already have their own internal platform guards:

  • GIDAppCheckError.h: #if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
  • GIDSignInButton.h: #if TARGET_OS_IOS || TARGET_OS_MACCATALYST

So importing them unconditionally in the umbrella header is safe — they compile to empty on unsupported platforms.

Testing

  • Built macOS and iOS targets with this change — zero umbrella header warnings
  • No functional changes — the headers' internal guards still control compilation

GIDAppCheckError.h and GIDSignInButton.h were conditionally imported
in the umbrella header (GoogleSignIn.h) but declared unconditionally
in the module map. This caused "umbrella header does not include header"
warnings during Xcode's precompiled module generation.

Both headers already have their own internal #if TARGET_OS guards, so
importing them unconditionally in the umbrella header is safe — they
compile to empty on unsupported platforms.
@google-cla
Copy link

google-cla bot commented Mar 19, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@mikefullerton
Copy link
Author

I signed the CLA agreement

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 this pull request may close these issues.

2 participants