I've used cocos2d for my iOS app, Kodable, for two years now. It has worked great...for the most part. If I didn't need to support iOS 5 and 6 for schools, I would have already switched to SpriteKit.
The biggest problem with cocos2d now is that SpriteKit is slowly making it irrelevant, at least for iOS-exclusive apps. Apple basically ripped it off and remade it and packaged it with iOS. It even has the same mode/scene structure! Cocos2d has almost nothing that SpriteKit doesn't except for being open source and a few extensions.
Why would I use cocos2d with swift when SpriteKit has such close integration with it already? There's still a place for cocos2d, but with cocos2d-X, the C++ cross-platform version.
SpriteKit is ok but it lacks a lot of feature found in Cocos2d. SpriteKit is also closed so if you find a bug, you have to wait a year and hope for an update. Cocos2d users are free to fork and optimize as they want. You have full control. You can even do 3D and custom shaders and full GL with it which is not possible with SpriteKit.
Don't get me wrong. SpriteKit is great place to get started, but when you need something more powerful, that is where Cocos2D comes in.
Of course as the sibling posts mentioned, open source is a huge plus. I've learned a huge amount of OpenGL looking at the Cocos2d-x code and making custom nodes. But I think Cocos2d is kind of pointless, unless it has killer features that Cocos2d-x doesn't offer (I don't know how much they've diverged) or you really, really hate C++. But giving up the whole Android market because of language preferences is a huge deal in my opinion.