Twitter integration is a common requirement of iPhone apps. Indeed, two of the apps my company sells are built around Twitter. Many other apps I’ve worked on for clients have also required Twitter integration.
I’m hoping to make that job a little easier for other iOS (and Mac) developers in the future by releasing TwitterKit, a simple and lightweight library for communicating with the Twitter REST API. TwitterKit should work with iOS 4.0 and up, and Mac OS X 10.6 and up. (I haven’t tested it on the latter yet, though.)
TwitterKit was built with a few goals in mind.
- Simple. TwitterKit is designed to keep the simple things simple. It has a small and clear API. There are a small number of general methods for sending API requests, rather than one Objective-C method that maps to each available REST API method.
- Small. TwitterKit is a small library. You won’t need to triple your build time just so you can post a tweet from your app.
- Easy to use. TwitterKit’s minimal API means it should be straightforward for most people to get started quickly.
- Flexible. TwitterKit is designed to handle changes to the Twitter REST API, including both new methods and changing parameters to existing ones, without requiring changes to the library itself.
- No dependencies. No conflicts. TwitterKit is completely self-contained, and it won’t clash with other libraries you may already be using in your app. Just drop the source files into your project and you’re ready to go.
In addition to providing support for the Twitter REST API, TwitterKit also includes a simple wrapper for authenticating your app using the Twitter OAuth web flow.
Republicans in control of Pennsylvania’s state legislature are considering a significant change to how that state awards its electoral votes in presidential elections:
Now, Pennsylvania, like most states, has a “winner take all” system, in which the winner of the statewide popular vote gets all the electoral votes; in 2008, Barack Obama won 55 percent of the state’s popular vote and 100 percent of its 21 electoral votes.
The proposed change would award the electoral votes based on the winner of each Congressional district. Redistricting, which is controlled by Republicans, will leave Pennsylvania with 18 districts next year, 12 Republican seats and 6 Democratic seats. The state will have 20 electoral votes, one for each of the 18 House districts plus two others for its senators.
Under the proposal, the candidate who wins the statewide popular vote would win the two others. If the change were in place next year, Mr. Obama, as the Democratic nominee, could win the popular vote and carry the six Democratic districts but end up with just 8 electoral votes, while the Republican nominee would take 12.
Bare knuckle politics is nothing new, but this seems a step too far. How could it possibly be palatable to even Republican Pennsylvania voters, not to mention the majority of citizens who vote for the Democrat, to have the popular vote winner in a presidential election not win the majority of the electoral votes? I can’t remember the last time I heard about a realistic effort to do something so anti-democratic.
I guess I shouldn’t be surprised. Nothing about the Republican Party over the last 15 years at least hasn’t suggested anything less than a ruthless, uncompromising, and increasingly extreme organization.