Skip to content

Conversation

ryanwilson
Copy link
Member

No description provided.

} else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#if !TARGET_OS_TV
Copy link
Member

Choose a reason for hiding this comment

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

Does the style guide cover #if !?

In some places, #if !defined(TARGET_OS_TV) is preferred.

Also, uglier, but more correct, to also #if the if respondsToSelector ...

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't see it but happy to do !defined instead. Will update it!

Copy link
Member Author

Choose a reason for hiding this comment

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

Re: the respondsToSelector, tvOS actually does support the above call, just not this one 😄

Copy link
Member

Choose a reason for hiding this comment

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

Understood - so the if will always be true on tvOS, but if it wasn't nothing would happen in the else.

If this was pure tvOS code, there would be no reason for the respondsToSelector check, but I'm fine with keeping the code easier to read.

@ryanwilson ryanwilson merged commit df28b4e into tvOS_master Nov 15, 2017
@ryanwilson ryanwilson deleted the rw-tv-auth branch November 15, 2017 19:35
@firebase firebase locked and limited conversation to collaborators Nov 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants