Skip to content

Update Analytics swift API tests. #11965

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

Merged
merged 4 commits into from
Oct 23, 2023
Merged

Update Analytics swift API tests. #11965

merged 4 commits into from
Oct 23, 2023

Conversation

tsunghung
Copy link
Contributor

Update Analytics swift API tests. #no-changelog

Copy link
Member

@ncooke3 ncooke3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating!

@tsunghung
Copy link
Contributor Author

It seems that the @unknown default trick does not work for NS_TYPED_ENUM.

typedef NSString *FIRConsentType NS_TYPED_ENUM NS_SWIFT_NAME(ConsentType);
extern FIRConsentType const FIRConsentTypeAdStorage;
extern FIRConsentType const FIRConsentTypeAnalyticsStorage;
extern FIRConsentType const FIRConsentTypeAdUserData;
extern FIRConsentType const FIRConsentTypeAdPersonalization;

The fix is to remove @unknown, which would not require listing all enumerations. It makes the whole switch statement less useful. (I already list whole known enumerations in the setConsent() test.)

@tsunghung tsunghung merged commit ea1886a into master Oct 23, 2023
@tsunghung tsunghung deleted the analytics-api-tests branch October 23, 2023 15:42
@firebase firebase locked and limited conversation to collaborators Nov 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants