Closed shashankcodes closed 7 years ago
I have been having some issues with the CocoaPod update tool accepting my latest changes. I still need to figure that out, for now you can point your pod file directly at the master branch:
pod 'SwiftKeychainWrapper', :git => 'https://github.com/jrendel/SwiftKeychainWrapper.git', :branch => 'master'
In order to use CocoaPods with Swift 3.0, you must currently do the following:
(1) Create a .swift_version
file with just the text 3.0
. Save this file in the same directory as your pod spec.
(2) Make sure you're using CocoaPods version 1.1.0.rc.2
. You can verify your CocoaPods version using the command pod --version
.
You can update to this version using the command sudo gem install cocoapods --pre
... you may also have to uninstall the other version(s) of CocoaPods too via sudo gem uninstall cocoapods
and then enter the number for the other version(s) to uninstall.
AFAICT, CocoaPods version 1.1.0.rc.2
seems to be 100% backwards compatible with current non-beta version too.
For more details, see this issue: https://github.com/CocoaPods/CocoaPods/pull/5841
After doing/confirming the above, you should be able to push to trunk.
Any issues, let me know, and I'm happy to help. :]
I tried this earlier this week but had no luck. Setup the .swift_version file and using the latest pre release of CocoaPods. I'll look into it again this weekend and see if I can get it sorted out.
I know even after doing these steps, when trying to push to trunk I was still getting an error related to the Use Legacy Swift setting. Since my library is on Swift 3 I had that set to No. Do you know if that is correct or does it need to be something different?
Try making it as unspecified and push if it works. The bolts-swift framework I use gives me unspecified when i install it using pods.
Try making it as unspecified and push if it works. The bolts-swift framework I use gives me unspecified when i install it using pods.
^ AFAICT, this is a bug in how CocoaPods sets up the pods frameworks... you can't "set as unspecified" using any syntax in the pod spec, and even if you could, XCode wouldn't understand it... as you've likely found, Xcode insists on setting this before it will let you build, right? 😉
Since my library is on Swift 3 I had that set to No.
^ CocoaPods actually creates the pod framework when it's linting... in my own pods, I've been able to push to a private repository (uses same lint process, AFAIK?) by including the .swift-version
, which tells it how to set the swift legacy version
and using the latest pre-release version of CocoaPods (per above).
In other words, you have to create the .swift_version
file... CocoaPods isn't smart enough (yet) to pick up on your project settings.
BTW, this fixes linting, but I don't thinking pod install
has been fixed...? If you guys find out this has been fixed via some syntax, please definitely let me know... I'm currently using a post install script to set it... for example, see
http://blog.bitrise.io/2016/09/17/cocoapods-issue-and-fix-with-xcode-8.html
I'll look into it again this weekend and see if I can get it sorted out.
^ No rush, whenever. 😉
I also noticed on my test project using pod install / pod update with the new pre-release of CocoaPods was messing things up as well. Something I was doing was actually changing my local repo's url to point to the Cocoapods spec repo. It was really strange...and then telling me I had like 2000 updates to pull.
Then I made a mistake on correcting that repo url and pointed it to the SwiftKeychainWrapper GitHub repo instead of SwiftKeychainWrapperExample...so my repos are a bit of a mess now as well and I need to do some clean up.
Alright, so after seeing multiple weird issues on my end, I went back to square one, wiping everything, and updating rvm and ruby (both of which were on really old versions). Re-installing Cocoapods pre release and I was finally able to get everything to work. The Cocoapod library should now be on 2.2.0 of SwiftKeychainWrapper.
👍 Awesome! Thanks.
The current version (2.2.0) has not been updated on cocoapods (https://cocoapods.org/pods/SwiftKeychainWrapper) and cannot be installed using pods for now. Please update the version from 2.0 to 2.2 over there.