EL Debate is a platform by @elpassion to run an anonymous poll featuring yes-no-undecided question. This repository contains source code powering the iOS client.
The project showcases a couple of good engineering practices:
- Continuous Deployment to TestFlight,
- Continuous Integration with Travis,
- Dependency Injection,
- Code quality measurements:
- Code coverage,
- Code quality by CODEBEAT.
- Mock auto-generation with Sourcery,
- Playground-driven view development (original idea),
- Routing pattern (extended coordinator pattern),
- UI interaction/snapshot testing.
ELDebate as a framework
EL Debate can be installed as a framework with Cocoapods. Add following contents to
source 'firstname.lastname@example.org:elpassion/podspecs.git' source 'https://github.com/CocoaPods/Specs.git' target 'ApplicationTargetToIntegrateELDebate' do pod 'ELDebate', '~> 1.0' end
pod install command.
To run EL Debate within your application use following code:
let navigationController = UINavigationController() let debateRunner: DebateRunning = DebateRunner() debateRunner.start(in: navigationController, applyingDebateStyle: true)
Keep in mind that:
debateRunnergets deallocated during runtime, the application will crash. Retain it as a field in your controller / coordinator.
- EL Debate uses custom navigation bar styling. The flag
applyingDebateStyle: trueis responsible for setting custom styling properties in navigation controller's bar.
navigationControllerhas to be in your root view controller's hierarchy (obviously).