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

Make the framework backwards compatible with Xcode 8 #650

Merged
merged 2 commits into from
Oct 31, 2017

Conversation

Adlai-Holler
Copy link
Member

  • Introduces AS_AVAILABLE_IOS(x) macro.
    • When possible, evaluates to __builtin_available(iOS x, *) – same as @available but valid in C/C++.
    • Otherwise evaluates to the runtime version check AS_AT_LEAST_IOSx – checking CFCoreFoundationVersionNumber.
  • Changes our attributed accessibility implementations not to use KVC. Instead we check both the SDK version and the runtime version. It's a little ugly but it's correct on both versions of Xcode, and it scales better (and faster!). cc Use Xcode9 API For Attributed Versions Of accessibilityLabel, accessibilityHint, accessibilityValue #642 which does some of this same stuff.
  • Removes an old #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_6_0 check. Sorry iOS 5 SDK users 😢

// in old SDKs. If the caller doesn't respect our API_AVAILABLE attributes, then they
// get an appropriate "unrecognized selector" runtime error.
#if __IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_11_0
@dynamic accessibilityAttributedLabel, accessibilityAttributedHint, accessibilityAttributedValue;
Copy link
Member

Choose a reason for hiding this comment

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

much better!

Copy link
Member

@garrettmoon garrettmoon left a comment

Choose a reason for hiding this comment

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

LGTM!

@Adlai-Holler Adlai-Holler merged commit 944cad6 into master Oct 31, 2017
@Adlai-Holler Adlai-Holler deleted the AHBackwardsCompat branch October 31, 2017 23:12
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.

bernieperez pushed a commit to AtomTickets/Texture that referenced this pull request Apr 25, 2018
* Make the framework backwards compatible with Xcode < 9

* Update changelog
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