jrendel / SwiftKeychainWrapper

A simple wrapper for the iOS Keychain to allow you to use it in a similar fashion to User Defaults. Written in Swift.
MIT License
1.59k stars 339 forks source link

2.2.1 changes contract (2.2.x now replaced in CocoaPods with 3.0) #67

Closed le4ker closed 7 years ago

le4ker commented 7 years ago

Installing SwiftKeychainWrapper 2.2.1 (was 2.0.0)

Why is a minor update breaking our build by changing the library's interface? Shouldn't changes like this result to major number changing?

jrendel commented 7 years ago

2.0.0 -> 2.1.0 was a non breaking change updated for Swift 2.3. However, I don't think that version updated properly in cocoa pods and may only be accessible in my Swift 2.3 branch. 2.1.0 -> 2.2.0 was breaking changes for Swift 3.0. Function names were changed to better fit the api guidelines in Swift 3.0 2.2.0 -> 2.2.1 was a minor change of one function and one property and I marked the old as deprecated so that they would not be breaking.

If you need to continue using the older version, you can update your pod file and indicate to remain on 2.0.0 until you are ready for the Swift 3 version.

Sorry for the confusion.

jrendel commented 7 years ago

Also, I had issues getting the repo updated in Cocoapods. I was able to get those working last night and pushed 2.2.0. But then realized I needed the minor push for 2.2.1 as well. So that may be adding the confusion. But overall, in CocoaPods it was a major number change, from 2.0.0 to 2.2.1.

jrendel commented 7 years ago

So I don't know what I was thinking but I completely missed the point of your original comment. You're right with the major changes for Swift 3, including the api interface changes, this should have been a Major version change. i.e. a 3.0 of the library. That was my mistake for not really thinking through it properly.

So at this point I'm not sure what is the best way to resolve the issue. Any suggestions?

I could resubmit to Cocoapods as a 3.0 but that doesn't help the fact that its too late for everyone upgrading today. I'll have to see if Cocoapods has a way to roll back / remove a trunk version maybe. I'm not entirely sure what is the best solution now.

jrendel commented 7 years ago

Ok this should now be fixed. I found how to remove versions from CocoaPods, so I've removed 2.2.0 and 2.2.1, as you pointed out, these should have been major release. I felt this was the best fix and to take care of it right away before it affects anyone else.

I've pushed a 3.0.0 that now contains all the Swift 3 changes.

I'm going to leave this issue open for a couple days in case anyone else had the same issue. However, as 2.2.x only went up on CocoaPods last night, hopefully the number of users that updated without wanting the Swift 3 changes will be minimal.

If you happened to update to 2.2.x and didn't want to. Update your pod file to specify you only want version 2.0 (add , "2.0" after the pod name) and re-install.

If you did update to 2.2.x and want the changes, just do another pod update and you'll be on version 3.0. There are no changes between 2.2.1 and 3.0.0 (other than the version number).

le4ker commented 7 years ago

Hi @jrendel ,

I wasn't very clear on my original post. Thanks for fixing it. I temporarily fixed my pod dependency on 2.0.0 (by dropping the ~>). Thanks for providing the proper fix.

Cheers, :panos