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

The FIRAnalytics(Consent) category is not part of the umbrella header in 7.2.0 #7114

Closed
kaybutter opened this issue Dec 7, 2020 · 4 comments
Labels
api: analytics Swift Package Manager zip-builder Tools related to building the zip file.
Milestone

Comments

@kaybutter
Copy link

kaybutter commented Dec 7, 2020

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 12.2
  • Firebase SDK version: 7.2.0
  • Installation method: Swift Package Manager
  • Firebase Component: Analytics

[REQUIRED] Step 2: Describe the problem

I'm trying to set the consent mode in the latest FirebaseAnalytics using the setConsent(_:) method as documented here. Xcode complains, that the method cannot be found. It worked in 7.1.0.

Looking inside the FirebaseAnalytics.xcframework, I can see that the header file declaring the method is there. But it is not included in the umbrella header. Because of that it cannot be used from swift, by just importing FirebaseAnalytics.

Steps to reproduce:

  1. Integrate FirebaseAnalytics 7.2.0
  2. Try to use the setConsent method.
  3. Try to build your app

Xcode will now complain that:

Type 'Analytics' has no member 'setConsent'

Relevant Code:

import FirebaseAnalytics

...

Analytics.setConsent([.adStorage: .denied, .analyticsStorage: .denied])
@google-oss-bot
Copy link

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@ryanwilson
Copy link
Member

Sorry for the issues and thanks for the report. Our ZipBuilder tool uses CocoaPods under the hood and it looks like the bug with a missing -ObjC flag may be hit, causing this. I'll see if we can publish a new patch with the fix soon.

In the meantime, @MapaX discovered a workaround: if you add the #import "FIRAnalytics+Consent.h" to Headers/FirebaseAnalytics.h it should work for now. (from #7117 (comment))

@ryanwilson ryanwilson added api: analytics Swift Package Manager zip-builder Tools related to building the zip file. and removed needs-triage labels Dec 7, 2020
@paulb777
Copy link
Member

paulb777 commented Dec 7, 2020

The recently added FIRAnalytics+Consent.h is missing from the FirebaseAnalytics.h umbrella headers.

Googlers, see the fix at cl/345499702

@paulb777 paulb777 added this to the 7.3.0 - M85 milestone Dec 7, 2020
@paulb777
Copy link
Member

paulb777 commented Dec 9, 2020

Fixed in today's 7.3.0 release.

@paulb777 paulb777 closed this as completed Dec 9, 2020
@firebase firebase locked and limited conversation to collaborators Jan 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: analytics Swift Package Manager zip-builder Tools related to building the zip file.
Projects
None yet
Development

No branches or pull requests

4 participants