mattress
mattress copied to clipboard
update swift files to swift 3
HI, Is there any update for this issue?
Thanks,
It might be a bit. We don't have plans to move over to Swift 3 internally just yet, so I'm not handy with it yet. I'll take a stab at it, but would also love a hand with it (I'll mark it as such).
Thanks.
It 's 2017now. Is there any update for this issue?
Any update on this yet?
I started working on this in some of my free time since it's not a priority for us. Still would love to get some help though if anyone is interested.
Currently working on the swift 3 migration running into issues with
'dispatch_once_t' is unavailable in Swift: Use lazily initialized globals instead
Any suggestions? @dmauro
Oh, awesome, glad to see someone is helping out with this, thank you! Yeah so for dispatch_once_t you should just use the a static var
instead probably. Which line is this you're dealing with specifically?
Glad to help. DiskCache line 33 mainly.
Ahhh, I think we should actually abandon that altogether and use something like this instead where we would otherwise reference that variable:
if #available(iOS 8.0, *) {
// equivalent to isAtLeastiOS8
} else {
// use the old crappier APIs
}
For other cases though where you can't just drop the dispatch once, static var
is probably the way to go.