24 December 2013
Follow @fabiopelosinTL;DR: CocoaPods 0.29 introduces the pod try subcommand, the social media URL podspec attribute & complete inhibition of header warnings.
Every now and then we hear about tiny yet huge feature requests for CocoaPods. Pod try is one of these. Suggested by Laurent Sansonetti, pod try quickly gained a spot among the features of CocoaPods that I love the most. But… What is it?
Pod Try
Pod try is a new subcommand which allows you to quickly launch the demo project of a Pod. It can be used to assess the quality of a library – very useful for user interface elements – or to quickly get up to speed on how to use it.
In other words the command automates the following steps:
- Checkout the source of the Pod in a temporary directory.
- Search for any project looking like a demo project using some simple heuristics.
- Install any CocoaPods dependencies if needed by the located project.
- Open the workspace/project in Xcode.
To check it out just update to the last release of CocoaPods and run:
$ pod try FLKAutoLayout
It is new, so we'd like feedback as issues on the repo please.
Social Media URL
As you might know, the @CocoaPodsFeed account posts notifications about new Pods. We have been aware from a long time that some users replied to those tweets and that the conversation, as the tweets are generated by an automatic service, was unfortunately lost. When it was suggested to include the Twitter handle of the author of the Pod in the feed we decided to take action.
Identifying a solution was not easy because on the one hand we didn't want to include a DSL attribute dedicated to a proprietary platform like Twitter; on the other hand, we recognized that Twitter was a very convenient channel for discussing Open Source Projects. After discussing for 75 minutes we managed to come up with a solution which was able to satisfy our requirements: the social media URL. Instead of asking to specify a Twitter handle we opted to ask for an URL.
spec.social_media_url = 'https://twitter.com/cocoapods'
When we generate the Tweet for a new Pod we just check if the social media URL
includes the twitter.com
domain and in that case we include the handle in the
tweet (shortening the description of the Pod if needed). We expect this feature
to improve the visibility of Pods authors and increase the engagement with
their libraries. The result is the following:
[AOCUDL by @hypercrypt] An alternative shorthand syntax to Dustin Bachrach's OCUDL. http://t.co/HURVc1080e
— CocoaPods New Pods (@CocoaPodsFeed) December 8, 2013
Header warnings
Another great feature in this release is the ability to completely silence header warnings.
This feature was contributed by the new core team member swizzlr
Bug fixes
Bug fixes might not be the best argument to read about – unless they are
affecting you – but definitely are the foundation of solid software. Luckily
we got our bases covered thanks to Joshua Kalpin who appears to be on a
streak! Among the many fixes the one related to the pod lib lint
subcommand
deserves a quick mention.
Updating
To install the last release of CocoaPods you can run:
$ [sudo] gem install cocoapods
Until version 1.0 we strongly encourage you to keep CocoaPods up to date.
For all the details, don't miss the Changelog.