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

Rework ASTraitCollection to Fix Warnings and Remove Boilerplate #1211

Merged
merged 3 commits into from
Nov 6, 2018

Conversation

Adlai-Holler
Copy link
Member

This code was pretty messy.

This does include a small breaking change with an easy migration pathway. If users were calling +[ASTraitCollection traitCollectionWithBlah:AndBlah:Etc:] those are gone now. They were never supposed to be called. But there's an easy migration pathway using +traitCollectionWithASPrimitiveTraitCollection:.

Copy link
Member

@nguyenhuy nguyenhuy left a comment

Choose a reason for hiding this comment

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

Great cleanup!

@Adlai-Holler
Copy link
Member Author

Adlai-Holler commented Nov 6, 2018

The CI broke:

  • UIUserInterfaceStyle is not available on iOS.
  • But it is, in iOS 12, and it's marked correctly.
  • Xcode 9 doesn't know that because it has the iOS 11 SDK.
  • Two fixes:
    • Upgrade the CI to Xcode 10.
    • Make a new macro like AS_INTERFACE_STYLE_AVAILABILITY which expands to #if __IPHONE_12 API_AVAILABLE(tvos(10), ios(12) #else API_AVAILABLE(tvos(10)) #endif

The latter pattern doesn't scale. We should upgrade the CI to Xcode 10. Take a look at diff #1210!!

EDIT: I added the macro

@TextureGroup TextureGroup deleted a comment Nov 6, 2018
@TextureGroup TextureGroup deleted a comment Nov 6, 2018
@ghost
Copy link

ghost commented Nov 6, 2018

1 Warning
⚠️ This is a big PR, please consider splitting it up to ease code review.

Generated by 🚫 Danger

@TextureGroup TextureGroup deleted a comment Nov 6, 2018
@Adlai-Holler Adlai-Holler merged commit e392f83 into master Nov 6, 2018
@Adlai-Holler Adlai-Holler deleted the AHMoreWarnings branch November 6, 2018 16:31
mikezucc pushed a commit to mikezucc/Texture that referenced this pull request Nov 7, 2018
…ureGroup#1211)

* Clean up trait collection to fix a ton of warnings and remove code

* Support Xcode 9 (iOS 11 SDK)

* Hack harder
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.

None yet

3 participants