- Swift 5.0
- Deployment Target - iOS 11.0
- Devices - iPhone
- Alamofire Network calls manager
- RealmSwift Realm database
- Firebase Firebase Notifications
- TPKeyboardAvoiding Handling keyboards and textfields in a scrollable screen
- OHHTTPSTUBS To Stub the network requests. We use it for Unit Testing.
- SwiftLint Tool to enforce Swift style and conventions.
Authentication module is implemented using MVVM design pattern. This can be used as a reference to follow MVVM architecture in your products.
This authentication module covers the following features:
- Email Signup, OTP Verification, Email Login, View/Edit Profile, Change Password, Logout
A sample screen is implemented with CoreData as local database. This CoreDataMembers classes can be used as reference for CoreData Operations.
- Gets Users list and handles database operations like create, update, delete and fetch.
A sample screen is implemented with Realm as local database. This RealmMembers classes can be used as reference for Realm DB operations
- Gets Users list and handles database operations like create, update, delete and fetch.
A sample to show how users can be added offline and synced later. This is done in the Core Data Sample class, CoreDataMembersViewModel.
A set of sample testcases to do unit testing by stubbing the network requests is written in MembersCoreDataTests.swift class.
SwiftLint is added to enforce swift styles and conventions.
- Install Cocoapod frameworks - In Terminal, goto project root folder and execute
$ pod install
- 'Common' folder can be dragged and added to your projects
- Set app specific configurations, environment BaseURLs in Common -> Config -> AppConfig.swift
- For firebase services, replace the GoogleService-Info.plist with the one you downloaded from firebase console.
- MVVM folder contains authentication module implementaion which can be used as reference for MVVM architecture.
Testcase report generation - Scan
Steps to generate a testcase report as html:
cd <project folder path>
$ sudo gem install scan
$ fastlane scan
Report gets successfully generated in you project root folder under path '/test_output/report.html'. This output path will also be displayed in the terminal after generating the report.
Please Note: Remove this test_output folder after usage.
- Add SwiftLint to pod file
pod 'SwiftLint'
- Add a Run script in your project settings - Build Phases
"${PODS_ROOT}/SwiftLint/swiftlint"
-
Copy .swiftlint.yml from this boilerplate root folder to your project root. This will be a hidden file. To view hidden files, use the shortcut on your keyboard - cmd + shift + .
-
Now you can build your project and see the warnings and errors thrown by SwiftLint. SwiftLint rules can be customised in the above yml file.