Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Swift Essentials

You're reading from   Swift Essentials Get up and running lightning fast with this practical guide to building applications with Swift

Arrow left icon
Product type Paperback
Published in Dec 2014
Publisher
ISBN-13 9781784396701
Length 228 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Bandlem Limited Bandlem Limited
Author Profile Icon Bandlem Limited
Bandlem Limited
Alex Blewitt Alex Blewitt
Author Profile Icon Alex Blewitt
Alex Blewitt
Arrow right icon
View More author details
Toc

The RepositoryBrowser project


The client is a Master Detail application called RepositoryBrowser. This sets up a template that can be used on a large device with a split view controller, or a navigator view controller on a small device. In addition, actions to add entries are created.

To build the APIs necessary to display content, several utility classes are needed:

  • The URITemplate class processes URI templates with a set of key/value pairs

  • The Threads class allows functions to be run in the background or in the main thread

  • The NSURLExtensions class provides easy parsing JSON objects from a URL

  • The DictionaryExtensions class provides a means of creating a Swift dictionary from a JSON object

  • The GitHubAPI class provides access to the GitHub remote API

URI templates

URI templates are defined in RFC 6570 at https://tools.ietf.org/html/rfc6570. They can be used to replace sequences of text surrounded by {} in a URI. Although GitHub's API uses optional values {?...}, the example client presented in...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image