telefonicaid/tdigital-hybridge — pull request #14 by gonzalezreal (2014-04-04 15:07:49+00:00)
Title: iOS Refactoring

* Rename classes and constants to follow our objective-c coding guidelines.
* Change the architecture to move away from singletons
* Each view controller has its own bridge instance that receives actions from a web view.
* There's only one active bridge that receives actions from the visible `UIWebView`.
* Use the delegate pattern to receive actions from the `UIWebView`.
* If the delegate object implements a `- (void)handleWithData:(NSDictionary *)data` method, the bridge will call this method. The bridge assumes that action names are in `snake_case`, that is, if it receives the action `"go_to_detail"` it will look for a method named `-handleGoToDetailWithData:`.
* If a method is not found, the bridge will try `-bridge:didReceiveAction:data:`. If the delegate does not implement neither of these methods, the bridge will return an HTTP 404 status code to the caller.
* Add `HYBWebViewController`, a view controller that manages a `UIWebView` together with a `HYBBridge` to communicate with it.
* Unit tests.