I too had this problem. After searching for months for a tutorial or sample code- <sarcasm>
thanks for the help Apple!</sarcasm>
- I found this answer. The developer created a GitHub class that makes this much much easier.
This guy hit the nail straight on with this implementation.