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

OS version availability checks to resolve deprecation warnings #736

Merged
merged 3 commits into from Oct 19, 2020
Merged

OS version availability checks to resolve deprecation warnings #736

merged 3 commits into from Oct 19, 2020

Conversation

damienpontifex
Copy link
Contributor

@damienpontifex damienpontifex commented Oct 15, 2020

Mainly deprecations in Scanner methods from iOS 13.0 and one from CADisplayLink. See image here for warnings when we've included via cocoapods
image

@@ -704,7 +704,13 @@ open class SVGParser {
cleanedHexString = "\(x[0])\(x[0])\(x[1])\(x[1])\(x[2])\(x[2])"
}
var rgbValue: UInt32 = 0
Scanner(string: cleanedHexString).scanHexInt32(&rgbValue)
if #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) {
if let scannedInt = Scanner(string: cleanedHexString).scanUInt64(representation: .hexadecimal) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You can match two conditions into one

if #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *), let scannedInt = Scanner(string: cleanedHexString).scanUInt64(representation: .hexadecimal)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@damienpontifex
Copy link
Contributor Author

@amarunko the travis-ci didn't kick off to build/test this PR. Does this have to be manually triggered by someone?

@amarunko
Copy link
Contributor

Hm, no, Travis worked automatically on this project, need to check

@amarunko
Copy link
Contributor

Actually, build passed, I can't find this action on GitHub as before, but it's ok

@damienpontifex
Copy link
Contributor Author

Hmm interesting. Odd it didn't append details to the PR as travis normally does. Anyway, good to see it's passed automated processes

@ystrot ystrot self-assigned this Oct 19, 2020
@ystrot ystrot added this to the 0.9.8 milestone Oct 19, 2020
@ystrot ystrot merged commit 2b406e5 into exyte:master Oct 19, 2020
@ystrot
Copy link
Member

ystrot commented Oct 19, 2020

Thanks! Merged to the master.

@damienpontifex damienpontifex deleted the deprecations branch October 19, 2020 07:11
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