A Case Study in IOS App Development — Sample Project
Technology Stack
- Programming Language: Swift 5
- IDE: Xcode 12
- Database: Core Data
- UI Framework: UIKit
Core Features
Adding Study Materials
Users are able to add a new study material based on the categorization of tutorials, past papers or school papers. Users are able to fill in the required information fields in the form view that is rendered when each time a user clicks the add new button.
Viewing and Managing Materials
A list view displays all the study materials added by the user visually represented in each categorization of tutorials, past papers,school papers pages.
Profile and Analysis
The profile section includes the editable user profile with the analysis view, where the users will be able to get insights and an overview of the completed papers & tutorials with scores analyzed and presented.
User-Friendly Interface
The overall entire application follows a user-friendly design approach to support better usability and user experience.
Design Documentation
Architecture Diagrams
These diagrams were created using tools like Lucidchart and provide a hierarchical structure of the application, detailing how each module interacts with the others.
Domain Model Diagram
UseCase Diagram
Testing
Methodology
We adopted a hybrid testing methodology, combining elements of both Agile and Waterfall models to ensure thorough testing to support a feature-oriented architecture.
Here we have done a lot of manual testing to stabilize the initial features.
Unit Testing
Each module of the application was tested in isolation to ensure that individual components functioned as expected. Tools like XCTest were used for this purpose.
Unit Testing: ProfileViewController
Overview
In our application, the ProfileViewController is a critical component that manages the user’s profile information. To ensure its robustness and reliability, we implemented unit tests using XCTest, Apple’s testing framework for Swift.
Test Setup and Teardown
- setUpWithError(): This function sets up the testing environment before each test case runs. It initializes the ProfileViewController from the storyboard and loads its view hierarchy.
- tearDownWithError(): This function cleans up the testing environment after each test case. It deallocates the ProfileViewController to release any resources it has consumed.
override func setUpWithError() throws {
// Setup code
}
override func tearDownWithError() throws {
// Teardown code
}
Test Cases
1. testProfileNameEditing
This test case verifies the functionality of editing the profile name.
Steps:
- Simulates tapping on the profile name label to trigger an alert for name editing.
- Accesses the presented UIAlertController and verifies its existence.
- Simulates typing a new name into the alert’s text field.
- Simulates tapping the “Save” action on the alert.
Assertions:
- Checks if the profile name label in the view controller has been updated.
- Checks if the new name has been saved in UserDefaults.
func testProfileNameEditing() {
// Test code
}
2. testImagePickerController
This test case verifies the functionality of selecting a new profile image.
Steps:
- Simulates selecting an image using UIImagePickerController.
- Calls the imagePickerController method with the selected image.
Assertions:
- Checks if the profile image view has been updated with the new image.
- Checks if the new image data has been saved in UserDefaults.
func testImagePickerController() {
// Test code
}
By implementing these unit tests, we have significantly increased the reliability of our ProfileViewController. These tests ensure that both the profile name and profile image functionalities work as expected, thereby enhancing the overall stability of our application.
Flowchart
Flowchart was developed for key user stories to visually represent the sequence of steps a user would follow to complete specific tasks.
Wireframes
High-fidelity wireframes were created using Adobe XD to provide a pixel-perfect representation of each screen, complete with layout dimensions and color codes.
- Launch Screen
- Main Dashboard Screen
- Past Papers screen
- Past Papers Input View V. School Papers Input View
VI. School Papers Input View
VII. School Papers Screen
VIII. Tutorials Input View
XI. Profile Screen
XII. Analytics view
Resources
By integrating user-friendly design with effective management tools, this app demonstrates how technology can transform learning methods for students. It serves as an inspiring model for aspiring iOS developers, showcasing the impact of thoughtful design and robust development in creating applications that are both practical and innovative.