Skip to content
This repository has been archived by the owner on Oct 17, 2019. It is now read-only.

Finished development. #1

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
209 changes: 209 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
# Created by https://www.gitignore.io/api/swift,macos,appcode,carthage,cocoapods,objective-c,visualstudiocode

### AppCode ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries

# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml

# Gradle:
.idea/**/gradle.xml
.idea/**/libraries

# CMake
cmake-build-debug/

# Mongo Explorer plugin:
.idea/**/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### AppCode Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
.idea/sonarlint

### Carthage ###
# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build

### CocoaPods ###
## CocoaPods GitIgnore Template

# CocoaPods - Only use to conserve bandwidth / Save time on Pushing
# - Also handy if you have a lage number of dependant pods
# - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGONRE THE LOCK FILE
Pods/

### macOS ###
*.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Objective-C ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint

## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM

# CocoaPods - Refactored to standalone file


# Carthage - Refactored to standalone file

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output

# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/

### Objective-C Patch ###

### Swift ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated

## Various settings

## Other

## Obj-C/Swift specific

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
.build/

# CocoaPods - Refactored to standalone file

# Carthage - Refactored to standalone file

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control


### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history

# End of https://www.gitignore.io/api/swift,xcode,macos,appcode,carthage,cocoapods,objective-c,visualstudiocode
53 changes: 53 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
disabled_rules: # rule identifiers to exclude from running
# - colon
# - comma
- control_statement
- trailing_whitespace
- trailing_newline
opt_in_rules: # some rules are only opt-in
- empty_count
- missing_docs
- overridden_super_call
# Find all the available rules by running:
# swiftlint rules
whitelist_rules:
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Carthage
- Pods
# configurable rules can be customized from this configuration file
# binary rules can set their severity level
force_cast: warning # implicitly
force_try:
severity: warning # explicitly
# rules that have both warning and error levels, can set just the warning level
# implicitly
line_length: 510
# they can set both implicitly with an array
type_body_length:
- 300 # warning
- 400 # error
# or they can set both explicitly
file_length:
warning: 500
error: 1200
# naming rules can set warnings/errors for min_length and max_length
# additionally they can set excluded names
type_name:
min_length: 3 # only warning
max_length: # warning and error
warning: 40
error: 50
excluded: iPhone # excluded via string
additional_allowed_characters: "_"
function_parameter_count:
warning: 4
error: 6
function_body_length:
warning: 50
error: 200
cyclomatic_complexity:
warning: 7
error: 10
identifier_name:
min_length: 2
reporter: "xcode" # reporter type (xcode, json, csv, checkstyle)
31 changes: 31 additions & 0 deletions Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@


source 'https://github.com/CocoaPods/Specs.git'
source 'https://bitbucket.org/altran-ais/specs'

def shared_pods
pod 'SwiftyBeaver'
pod 'SwiftLint'
pod 'RxCocoa', '~> 4.0'
pod 'Moya-ObjectMapper/RxSwift'
pod 'RSLoadingView'
end


target 'arctouch-challenge-ios' do
platform :ios, '11.1'
use_frameworks!
shared_pods
pod 'Alamofire'
pod 'SDWebImage'

target 'arctouch-challenge-iosTests' do
inherit! :search_paths
shared_pods
end

target 'arctouch-challenge-iosUITests' do
inherit! :search_paths
end

end
54 changes: 54 additions & 0 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
PODS:
- Alamofire (4.6.0)
- Moya (10.0.1):
- Moya/Core (= 10.0.1)
- Moya-ObjectMapper/Core (2.5):
- Moya (~> 10.0.0)
- ObjectMapper (~> 3.0.0)
- Moya-ObjectMapper/RxSwift (2.5):
- Moya-ObjectMapper/Core
- Moya/RxSwift
- RxSwift (~> 4.0.0)
- Moya/Core (10.0.1):
- Alamofire (~> 4.1)
- Result (~> 3.0)
- Moya/RxSwift (10.0.1):
- Moya/Core
- RxSwift (~> 4.0)
- ObjectMapper (3.0.0)
- Result (3.2.4)
- RSLoadingView (1.1.2)
- RxCocoa (4.1.1):
- RxSwift (~> 4.0)
- RxSwift (4.0.0)
- SDWebImage (4.2.3):
- SDWebImage/Core (= 4.2.3)
- SDWebImage/Core (4.2.3)
- SwiftLint (0.24.2)
- SwiftyBeaver (1.5.1)

DEPENDENCIES:
- Alamofire
- Moya-ObjectMapper/RxSwift
- RSLoadingView
- RxCocoa (~> 4.0)
- SDWebImage
- SwiftLint
- SwiftyBeaver

SPEC CHECKSUMS:
Alamofire: f41a599bd63041760b26d393ec1069d9d7b917f4
Moya: 9e621707ff754eeb51ff3ec51a3d54e517c0733a
Moya-ObjectMapper: 167adf69db0298bf3a19ea05cb9a16ee117c8ef5
ObjectMapper: 92230db59bf8f341a5c3a3cf0b9fbdde3cf0d87f
Result: d2d07204ce72856f1fd9130bbe42c35a7b0fea10
RSLoadingView: fdfeee9968b6dad2559169a97da0ad2580371f3a
RxCocoa: fd0862fd2df95fa55562ad28ffd2522c25eb4a85
RxSwift: fd680d75283beb5e2559486f3c0ff852f0d35334
SDWebImage: 791bb72962b3492327ddcac4b1880bd1b5458431
SwiftLint: 2aa21b96c8d13396a051bc1cb659d2ce1e0075b0
SwiftyBeaver: 4f74563624b2c1e821c522c54142b5dd5ebb0f30

PODFILE CHECKSUM: 403c7ff120619cdbb089bd5054340289de9bb3a6

COCOAPODS: 1.3.1
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Code Challenge

This code is for a challenge proposed by ArcTouch.

### Prerequisites

What things you need to install the software and how to install them

* Xcode 9.2
* [CocoaPods - Installation Guide](https://guides.cocoapods.org/using/getting-started.html)

### Installing

A step by step series of examples that tell you have to get a development env running

1 - Run CocoaPods from the source directory.
2 - Open the .xcworkspace file.

## Running the tests

CMD + U to run tests.

## Built With

* Swift 4.0
* [CocoaPods v1.3.1](https://cocoapods.org) - Dependency Management

### Libraries used
* [SwiftyBeaver](https://github.com/SwiftyBeaver/SwiftyBeaver) -> Logging library used for more comprehensible logs, if needed, can log to a server for realtime updates.
* [SwiftLint](https://github.com/realm/SwiftLint) -> "A tool to enforce Swift style and conventions", used to make sure all contributors follow the same guidelines.
* [RxSwift and RxCocoa](https://github.com/ReactiveX/RxSwift) -> Reactive programming in Swift and MVVM Architeture.
* [Moya](https://github.com/Moya) -> A network layer abstraction that encapsulates Alamofire with a more readeable and testable code.
* [ObjectMapper](https://github.com/Hearst-DD/ObjectMapper) -> JSON to Object mapper.
* [Moya+ObjectMapper](https://github.com/ivanbruel/Moya-ObjectMapper) -> Some extensions to make Moya, ObjectMapper and RxSwift communicate better.
* [RSLoadingView](https://github.com/roytornado/RSLoadingView) -> Utility library used to create a loading view, to prevent a empty view.
* [SDWebImage](https://github.com/rs/SDWebImage) -> UIImage extension for downloading images asynchronously.

## Authors

* **Pedro H J Fabrino**
Loading