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

FIRApp: add apple platform to firebaseUserAgent #4939

Merged
merged 4 commits into from
Feb 21, 2020

Conversation

maksymmalyhin
Copy link
Contributor

@maksymmalyhin maksymmalyhin commented Feb 19, 2020

Collect stats on Firebase usage by Apple platform (b/146507104).

#endif // TARGET_OS_WATCH

#if TARGET_OS_MACCATALYST
applePlatform = @"maccatalyst";
Copy link
Member

Choose a reason for hiding this comment

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

Please check that this define is not combined with any of the others. We might want it first with #elifs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to the current API docs it should not. I wonder if we can test it on Travis/GHA somehow?
Screen Shot 2020-02-19 at 3 30 48 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, for Catalyst app run on macOS both TARGET_OS_IOS and TARGET_OS_MACCATALYST are set. I wonder what platform we would like to log in this case? I assume maccatalyst. WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

I would say maccatalyst.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated with #elif accordingly.

+ (NSString *)applePlatform {
NSString *applePlatform = @"unknown";

#if TARGET_OS_MACCATALYST
Copy link
Member

Choose a reason for hiding this comment

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

Add a comment summarizing the discussion so we remember this is order-sensitive

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the comment. Is it what you meant?

Copy link
Member

Choose a reason for hiding this comment

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

Yep. Thanks!

@maksymmalyhin maksymmalyhin merged commit 2f5a980 into master Feb 21, 2020
@maksymmalyhin maksymmalyhin deleted the mm/platform-stats branch February 21, 2020 23:52
@firebase firebase locked and limited conversation to collaborators Mar 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.