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.
🔥 This is only accessible to EL Passion organization members. 🔥
EL Debate can be installed as a framework with Cocoapods. Add following contents to Podfile
:
source 'git@github.com:elpassion/podspecs.git'
source 'https://github.com/CocoaPods/Specs.git'
target 'ApplicationTargetToIntegrateELDebate' do
pod 'ELDebate', '~> 1.0'
end
and run 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:
- If
debateRunner
gets 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: true
is responsible for setting custom styling properties in navigation controller's bar. - The
navigationController
has to be in your root view controller's hierarchy (obviously).