mattress icon indicating copy to clipboard operation
mattress copied to clipboard

update swift files to swift 3

Open evgenybruhachev opened this issue 8 years ago • 10 comments

evgenybruhachev avatar Sep 22 '16 03:09 evgenybruhachev

HI, Is there any update for this issue?

Thanks,

wods avatar Sep 29 '16 03:09 wods

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).

dmauro avatar Sep 29 '16 15:09 dmauro

Thanks.

wods avatar Sep 30 '16 03:09 wods

It 's 2017now. Is there any update for this issue?

ChokWah avatar May 11 '17 01:05 ChokWah

Any update on this yet?

tvstuff avatar Jul 25 '17 18:07 tvstuff

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.

dmauro avatar Jul 25 '17 18:07 dmauro

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

abanobmikaeel avatar Aug 14 '17 17:08 abanobmikaeel

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?

dmauro avatar Aug 14 '17 17:08 dmauro

Glad to help. DiskCache line 33 mainly.

abanobmikaeel avatar Aug 14 '17 17:08 abanobmikaeel

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.

dmauro avatar Aug 14 '17 18:08 dmauro