agilebits / onepassword-app-extension

1Password Extension for iOS Apps
2.58k stars 311 forks source link

Upgrading Swift Demo to Swift 3 #377

Closed aforward closed 6 years ago

aforward commented 7 years ago

I was attempting to integrate into a iOS app, and ran into some compiler errors and warnings. I am very fresh to Swift (like hours fresh), so here is what I did:

1) Applied the automatic conversion as available within XCode 2) Applied the automatic upgrade to "suggested" settings 3) Did my best to try and make the code work again, and work as expected.

screen shot 2017-06-08 at 11 39 28 am

It compiles now!

XCode: Version 8.3.3 (8E3004b)
Swift: 3 (I think)
gks commented 7 years ago

Hi @aforward

Thanks for looking into this. We have another branch called new/ios10

This probably needs some minor updating but might have some of your work done for you.

I suspect we'll end up prepping for Swift 4 soon, and then we'll make sure to update master to be in lock step with that for demos.

aforward commented 7 years ago

Nice! I'll hope over to that branch to see other things to help with my integration. Feel free to close this

gks commented 6 years ago

I'm closing this one as I have an upcoming PR that will update it to Swift 4, for both of the included Swift projects. I did use some of your changes as inspiration for the upcoming PR though :) So thank you for doing this!