EL Debate iOS
Branch: master
Clone or download
Latest commit 7100ab0 Nov 27, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ELDebate.xcodeproj Add test for AsTimeString extension. Nov 14, 2017
ELDebate.xcworkspace
FeatureTests
Framework
Playground/Playground.playground Fix formatting in playground-wrapper. Sep 25, 2017
Resources
Sources
Templates
Tests
fastlane
.codebeatignore Added playground helper to codebeat ignore file Jun 5, 2017
.gitignore
.setup_travis_deployment.sh.enc Fixed Travis autodeployment Jun 1, 2017
.travis.yml
Dangerfile
ELDebate.podspec
Gemfile Organize Gems Alphabetically Sep 28, 2017
Gemfile.lock
LICENSE
Matchfile
Podfile
Podfile.lock Complete removal of StarScream, add Pusher (used on Back-end) Oct 23, 2017
PusherKeys.plist.enc
README.md Remove bitrise badge. Oct 26, 2017

README.md

Build Status codecov codebeat badge

EL Debate

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.

Best practices

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

Installation

🔥 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.

Running

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:

  1. If debateRunner gets deallocated during runtime, the application will crash. Retain it as a field in your controller / coordinator.
  2. EL Debate uses custom navigation bar styling. The flag applyingDebateStyle: true is responsible for setting custom styling properties in navigation controller's bar.
  3. The navigationController has to be in your root view controller's hierarchy (obviously).