TruckMuncher/TruckMuncher-iOS — pull request #5 by jault3 (2014-10-29 03:24:54+00:00)
Title: Network Layer

# Quick Notes
The branch name is misleading. I started to work on caching and the network layer. But I figured just getting the network portion running, reviewed and merged first would be more important. So this is all networking functionality for the application. The models we will use for caching and for the UI are created and used but are not persisted in the cache (Realm).

Yes this PR is enormous but that is because

1. I regenerated the protos and inserted the updated models
2. I updated the protobuf-swift library and reimported that into the project
3. The entire reveal framework had to be added manually because using it with cocoapods and swift results in unwanted results (mostly Xcode crashing every couple seconds)

# Modifications
The following files are the ones you're going to want to look at for modifications (these are just minor):
TruckMuncher/LoginViewController.swift
TruckMuncher/VendorMapViewController.swift

# New Files
The following files are new and make up the network layer:
TruckMuncher/api/*

# Usage
A couple notes on usage.

* All of the R*.swift files are the local caching models and will be used for caching and in the UI
* APIManager should not be used directly, the other manager classes should be used instead
* If you notice, the manager classes are of type `struct`. This means they are pass by value. Do not try and use these as singletons or any type of shared instance. 1) it just won't work because they're structs and 2) thats usually bad practice (not always) and 3) that will not work using Realm once we get caching going. Just create a new instance if you need to use one. They were built for that.