Skip to content

Stocks app, this repository also acts as a scratchpad for the implementation of things I learn.

Notifications You must be signed in to change notification settings

vinayjn/Stocks-iOS

Repository files navigation

Stocks

Build codecov

Stocks is an iOS app written in Swift using the VIPER Architecture. The idea behind making this app was to keep API contracts(models) in sync with the backend and avoid hassles of writing of same type of code in both iOS and Android. To achieve that I have created a separate repo for the models used in the iOS app which is addes as Swift Package dependency. I am running a local pipeline to generate models using protoc with plugins for Swift and Golang. Check the Makefile to know more about it. After generating the models locally these models are then pushed to the stock-contracts-ios. I haven't automated the new release for this repo yet.

Build Environment

  • Xcode 11

  • Swift 5.1

  • Cocoapods 1.7.5

  • Swift Protobuf

  • Protoc

Setup

Instead of using JSON files for API responses I have used Protocol Buffers. Protocol buffers are smaller in size and very simple to write. You can find the .proto files in the protos/models directory.

Install Cocoapods

brew install cocoapods

Install Swift Protobuf

brew install swift-protobuf

This will install protoc compiler and Swift code generator plugin.

If you want to run this app and test the functionality, you also need to setup a local server from this repo.

About

Stocks app, this repository also acts as a scratchpad for the implementation of things I learn.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published