Home

Awesome

SwipeIt

Swift 2.2 Platform iOS Build Status codecov codebeat badge GitHub issues License MIT Twitter

Getting Started

Run the following two commands to install Xcode's command line tools and bundler, if you don't have that yet.

[sudo] gem install bundler
xcode-select --install

The following commands will clone the repo and install all the required dependencies.

git clone https://github.com/ivanbruel/SwipeIt.git
cd SwipeIt
bundle install
bundle exec pod install

Now you can open SwipeIt.xcworkspace and Run the SwipeIt target onto your simulator or iOS device.

You can also run the tests by calling:

bundle exec fastlane ios test

Code style

This project will follow the GitHub Swift Styleguide in every way possible.

In order to enforce this, the project will also have a Swiftlint build phase to run the linter everytime the app is built.

Variable naming conventions will be ignored whenever a RxSwift-based variable is created (as the naming convention of the library is to start it with rx_ (e.g. rx_contentOffset).

Project Structure

The project follows this folder structure:

SwipeIt
├── App
│   └── AppDelegate
├── Enums
├── Extensions
├── Externals
├── Globals
├── Helpers
├── Models
├── Networking
├── Protocols
├── Resources
│   ├── LaunchScreen.storyboard
│   ├── Localizable.strings
│   └── Info.plist
├── Structs
├── ViewControllers
│   ├── Onboarding
│   │     └── Onboarding.storyboard
│   └── Main
│         └── Main.storyboard
├── ViewModels
└── Views

In order to enforce it to the filesystem we're using Synx to keep the folder structures clean and mirroring the project structure.

Dependencies

Model

Functional Reactive Programming

Networking

UI

Utilities

Environment

Testing

Continuous Integration

We are using Travis alongside Fastlane to perform continuous integration both by unit testing and deploying to Fabric or iTunes Connect later on.

Environment variables

To make sure Fabric and iTunes can deploy, make sure you have them set to something similar to the following environment variables. The values are only examples!.

Note: For ENV variables to work in Xcode you to set $ defaults write com.apple.dt.Xcode UseSanitizedBuildSystemEnvironment -bool NO and launch Xcode from the terminal. Apple Developer Forums

Signing

Fabric deployment

iTunes deployment

Misc

Deployment

Although all the deployment is done through Travis, you can do it manually through Fastlane:

Deployment to Fabric

bundle exec fastlane fabric

Deployment to iTunes Connect

bundle exec fastlane itc

Yet another Reddit app

This application is being developed as a side project in an effort to benchmark MVVM vs. MVC architectures, you can read more about it in Medium and in our MVVM vs. MVC README

Contributing

Should anyone want to contribute to this long-term benchmark, feel free to do pull requests, open up issues and even join me on Twitter to discuss the architecture.