This project is a template of SwiftUI MVVM project and represents my resume. It uses the Factory Pattern and is connected to a simple API so it can be easily editable.
- Xcode 11.3
- Swift 5.0
- iOS 13.2+
- CocoaPods 1.7.1
To install the current version used in the project, enter the following in the Terminal:
sudo gem install cocoapods -v 1.7.1
Then run pod install to install needed frameworks in the project.
The only pod used is iOSSnapshotTestCase in order to write and launch easily UITests.
iOSSnapshotTestCase is used to take snapshots of the app in order to compare it with screens on UITests.
First of all, I added
IMAGE_DIFF_DIR=$(SOURCE_ROOT)/$(PROJECT_NAME)UITests/Screenshots/FailureDiffs
and
FB_REFERENCE_IMAGE_DIR=$(SOURCE_ROOT)/$(PROJECT_NAME)UITests/Screenshots/ReferenceImages
into "Edit scheme" -> "Run Debug" -> "Arguments" -> "Environment variables". It sets path where I save snapshots.
Then, you can take snapshots of the app during UITests if you uncomment the line "recordMode = true" in "MainUITests.swift". Once snapshots are saved, comment the recordMode line and UITests will compare screen with saved snapshots when "verifyView()" is called.