-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Uses modern version detection API instead of floating point comparison. #13
Conversation
While the current way of checking for the version is not deprecated, converting the string to float isn’t a good idea either. The framework is for iOS 8 and above, so we can use the new Foundation API.
I would make a function. |
I was debating extracting this into a macro or function, but wanted to keep it close to the original. |
Yep, looks good to me, but we should also remove the #if's while we're here. The project has nullability in the headers so pre-8.3 tools cannot be used anymore. |
What about using [UIFont instancesRespondToSelector:@selector(systemFontOfSize:weight:)]; Edit: Not sure what about the other cases. |
@jwe-apple: re |
@iMartinKiss Just responding to the selector is not indicative whether the API was public in this case. |
@@ -35,9 +35,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |||
#import "ORKDefines_Private.h" | |||
|
|||
|
|||
#if !defined(__IPHONE_8_2) | |||
#define HKBiologicalSexOther 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost! Remove the HKBiologicalSexOther redefinition too, that was only for pre-8.2 tools.
Great. Deleting code is always fun :) |
I back @iMartinKiss and even for the check if the class can register to the |
Uses modern version detection API instead of floating point comparison.
While the current way of checking for the version is not deprecated,
converting the system version string to float isn’t a good idea either.
The framework is for iOS 8 and above, so we can use the new Foundation API.