ZeusWPI/hydra — pull request #179 by simonschellaert (2014-11-14 23:27:39+00:00)
Title: Adds a today extension with the resto menu on iOS 8

### Overview

Hi!
I really enjoy the Hydra app on iOS and decided to contribute by adding a feature I find quite handy myself.
Using the new iOS 8 API’s, I implemented a today extensions for the resto menu.
You can now swipe down Notification Center anywhere in iOS to see today’s resto menu.
This is, of course, fully optional as users can reorder, enable and disable widgets to their own liking.

**Note:** If you want to test the extension in the weekend and the extension show *We're currently closed*, set the date of your device to a weekday and try again.

### Screenshots
![foto 17-11-14 20 48 38](https://cloud.githubusercontent.com/assets/4421277/5055031/6e6aa9c8-6c5d-11e4-836d-9862a07ac406.png)

### Technical Notes

#### Language
All new code is programmed in Swift. The reason behind this is that I simply wanted to improve my Swift skills and really like the language. Contributors who prefer Objective-C can keep using Objective-C since it integrates seamlessly with Swift.
Most of the code is also compliant with .

#### Documentation
I tried to document anything which might not be immediately obvious.
Resources on (header) documentation in Swift are however sparse.. So I used the format described on and Xcode now shows neatly Quick Documentation for all methods in `RestoManager`.

#### JSON Parser
No external JSON parser is used. I’m using Apple’s own `NSJSONSerialization`.

#### Caching
I didn’t explicitly implement any caching mechanisme. I'm relying on Apple's own `NSURLCache` to cache the menu and retrieve it when the user is offline. While this isn't a full-fledged persistent storage solution, it's more than enough for the simple purpose of storing the menu.

#### Build

The app initially refused to build on my machine running Xcode 6.1, even after installing all the necessary pods.
So I had to make some changes including:

- Replacing the deprecated *SenTestingKit* by *XCTest*
- Replacing the file *acknowledgments.plist* by the actual file instead of an alias referring to a file I don’t have on my machine
- Set `VALID_ARGS` to `$(ARCHS_STANDARD)` instead of an empty string `

Since this is also the first build as far as I know using Swift and an Extension, Xcode also had to add some specific settings.
I hope none of my changes break the build for anybody else. Don't hesitate to contact me if you’re experiencing any inconvenience.

Let me know if you have any questions or comments.