Skip to content
Open

Zup #58

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
d028b6e
Removed unecessary files
LuizFelipeAP Jul 5, 2019
ee52307
Create Xcode project
LuizFelipeAP Jul 5, 2019
4e02e4f
Set Deployment Target to: 9.0
LuizFelipeAP Jul 5, 2019
371ef4c
Create .gitignore file
LuizFelipeAP Jul 5, 2019
a947fc5
Configured Development and Production environments
LuizFelipeAP Jul 5, 2019
b93958d
Created enum to represent possible errors from network request
LuizFelipeAP Jul 6, 2019
13eb313
Created network protocol
LuizFelipeAP Jul 6, 2019
6ce14cd
Created network provider to make requests
LuizFelipeAP Jul 6, 2019
a6a8797
Create Interactor and Presenter for Form
LuizFelipeAP Jul 6, 2019
22cd77f
- Created MockNetworkProvider
LuizFelipeAP Jul 6, 2019
b07bc7d
Created enum to represent CellTypes
LuizFelipeAP Jul 6, 2019
38065dc
Create model to represent response from cells endpoint
LuizFelipeAP Jul 6, 2019
827a49b
Create models to represent form field
LuizFelipeAP Jul 6, 2019
14e8c1e
Added fonts
LuizFelipeAP Jul 6, 2019
e1f51f9
Created TitleTableViewCell
LuizFelipeAP Jul 6, 2019
ddbe94d
Created IntpuTextTableViewCell
LuizFelipeAP Jul 6, 2019
5ee843f
Created cells for Email and Phone input
LuizFelipeAP Jul 6, 2019
93cb240
Created cell for CheckBox selection
LuizFelipeAP Jul 6, 2019
90a1b7b
Created action button table view cell
LuizFelipeAP Jul 6, 2019
a2c52ff
Created exetnsion to UITableViewCell
LuizFelipeAP Jul 6, 2019
44bbcbe
Created extension for TableView
LuizFelipeAP Jul 6, 2019
fc4ea9b
Configured tableView to display cells
LuizFelipeAP Jul 6, 2019
6d18528
Generation all cells for form
LuizFelipeAP Jul 6, 2019
59e6508
Displaying cells with correct spacing
LuizFelipeAP Jul 6, 2019
b78a2d2
Hidding cells that are marked with hidden true
LuizFelipeAP Jul 6, 2019
2b60193
Added Gesture to toggle checkbox'
LuizFelipeAP Jul 7, 2019
ba19147
Display or Hidding fields depending on checkbox status
LuizFelipeAP Jul 7, 2019
38e2174
Validatin inputs
LuizFelipeAP Jul 7, 2019
7d3d42a
Import SwiftMaskText library to add mask to phone
LuizFelipeAP Jul 7, 2019
7f5a2aa
Import IQKeyboardManagerSwift to project to help with keyboard overla…
LuizFelipeAP Jul 7, 2019
20ca339
Created success controller
LuizFelipeAP Jul 7, 2019
cf93ee7
Layout tabs and created logic to handle transition
LuizFelipeAP Jul 7, 2019
c443c1b
Created ViewController for funds
LuizFelipeAP Jul 7, 2019
09a745d
Created Interactor and Network method to fetch funds
LuizFelipeAP Jul 7, 2019
f9fbf1c
Created Presesentar class, parsing content and formatting to display
LuizFelipeAP Jul 7, 2019
5571416
Layout to display fund titles and risk
LuizFelipeAP Jul 7, 2019
5f4b0fd
Layout cell for MoreInfo data
LuizFelipeAP Jul 7, 2019
fc4fa8c
Layout FundInfo cell
LuizFelipeAP Jul 7, 2019
43df362
Download Info cell created
LuizFelipeAP Jul 7, 2019
607f2e0
Created methods to generate each cell
LuizFelipeAP Jul 7, 2019
d103746
Displaying all fields at funds screen
LuizFelipeAP Jul 7, 2019
a3e536c
Fix UIStackView proportion of risk bars
LuizFelipeAP Jul 8, 2019
76e2d55
Presenting SafariViewController on Google
LuizFelipeAP Jul 8, 2019
68004ef
Added activity indicator to async load
LuizFelipeAP Jul 8, 2019
850b4dc
.gitignore fix
LuizFelipeAP Jul 8, 2019
535cc7d
Presenting alert for invalid fields
LuizFelipeAP Jul 8, 2019
c6ff8e9
Presenting alert for invalid fields
LuizFelipeAP Jul 8, 2019
bd5118f
Unselected team
LuizFelipeAP Jul 8, 2019
554feba
Updated Read.me
LuizFelipeAP Jul 8, 2019
e90a8d9
Group files
LuizFelipeAP Jul 8, 2019
88ba0ee
Update README.md
lfap Jul 8, 2019
c7e0bd3
Group files
LuizFelipeAP Jul 8, 2019
4a2c926
Grouping common files
LuizFelipeAP Jul 8, 2019
c495649
Fix files missing refernces
LuizFelipeAP Jul 8, 2019
0687eef
Merge pull request #1 from lfap/dev
lfap Jul 8, 2019
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
73 changes: 73 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
### macOS ###
# General
.DS_Store


#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/
.DS_Store

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

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

## 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
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/

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

Carthage/Build

# 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
91 changes: 15 additions & 76 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,83 +1,22 @@
# Show me the code
# Santander Challenge

### # DESAFIO:
Link para o desafio: [https://github.com/SantanderTecnologia/TesteiOS](https://github.com/SantanderTecnologia/TesteiOS)

Em uma tela terá um formulário dinâmico com alguns campos predefinidos, conforme o arquivo JSON disponível no link ([https://floating-mountain-50292.herokuapp.com/cells.json](https://floating-mountain-50292.herokuapp.com/cells.json)) que deverá
ser consumido. Este formulário terá de ser desenhado e exibir uma tela de sucesso quando as informações preenchidas estiverem corretas.
# Como começar

Na segunda tela terá o detalhe de um ativo financeiro. As informações devem ser consumidas através do link ([https://floating-mountain-50292.herokuapp.com/fund.json](https://floating-mountain-50292.herokuapp.com/fund.json)).
1. Clone ou baixe o repositório
2. Abra o arquivo `SantanderChallenge.xcodeproj`
3. Execute a aplicação: `cmd + R`.

O visual do aplicativo está em anexo no arquivo telas.png e em um arquivo do [Sketch](https://www.sketchapp.com) (30 dias grátis, caso não tenha a licença).
## Environments
Há dois ambientes configurados.
- *Development*:
No ambiente `Development` os dados serão recuperados do Bundle, ou seja, mock.
- *Production*:
No ambiente `Production` os dados serão buscados do servidor.

![Image](https://floating-mountain-50292.herokuapp.com/telas.png)
Para alterar o ambiente escolha entre os schemas, ao lado do botão de parar a execução.

### Candidato pela: [Zup](https://www.zup.com.br/)

### # Avaliação

Você será avaliado pela usabilidade, por respeitar o design e pela arquitetura do app. É esperado que você consiga explicar as decisões que tomou durante o desenvolvimento através de commits.

* Swift 3.0 ou superior
* Autolayout
* O app deve funcionar no iOS 9
* Testes unitários (De preferência XCTest). Mas pode usar o que você tem mais experiência, só nos explique o que ele tem de bom.
* Arquitetura a ser utilizada: Swift Clean ([https://clean-swift.com/handbook/](https://clean-swift.com/handbook/) && [https://github.com/Clean-Swift/CleanStore](https://github.com/Clean-Swift/CleanStore) && [https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html](https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html)).
* Uso do git.

### # Dicas para o layout

* O formulário deve respeitar o conteúdo do cells.json ([https://floating-mountain-50292.herokuapp.com/cells.json](https://floating-mountain-50292.herokuapp.com/cells.json)) .
* Se o texto estiver muito grande, quebre em linhas e exiba por completo.
* O sketch está na proporção do iPhone 6, para iPhones menores/maiores é indicado que os espaçamentos se adaptem proporcionalmente.
* Na tela Fundos, o botão baixar irá abrir um SafariViewController no [google.com](http://google.com).
* A fonte a ser utilizada está em anexo no repositório.

### # Como interpretar o cells.json:

```Swift
Enum Type {
case field = 1,
case text = 2,
case image = 3,
case checkbox = 4,
case send = 5
}
```

```Swift
Enum TypeField {
case text = 1,
case telNumber = 2,
case email = 3
}
```

`"type":` tipo da célula;

`"message":` mensagem que vai aparecer na label para type = text ou placeholder para field;

`typeField":` tipo do field a ser exibido, para exibir corretamente a validação daquele campo.

`hidden":` indica se o campo está visível;

`topSpacing":` espaçamento entre o topo da célula e o topo da label/field/ checkbox;

`show":` indica o campo que será exibido quando este campo for selecionado. No caso é o id do campo a ser exibido.

`type":` "send" esse botão irá validar todas informações que foram preenchidas e ir para a tela de sucesso quando tudo tiver ok;

`risk":` pode ser um int de 1 a 5

O tipo `text` a validação é digitou alguma coisa, já ficou válido.<br>
Para "telNumber" o campo deve ser formatado `(##) ####-#### || (##) #####-####` e validado de acordo.<br>
Para "email" o email deve ser válido.

### # Observações gerais

Adicione um arquivo [README.md](http://README.md) com os procedimentos para executar o projeto.
Pedimos que trabalhe sozinho e não divulgue o resultado na internet.

Faça um fork desse desse repositório em seu Github e nos envie um Pull Request com o resultado, por favor informe por qual empresa você esta se candidatando.

### # Importante: não há prazo de entrega, faça com qualidade!

# BOA SORTE!
### Dúvidas / Sugestões: [email protected]_
Loading