Matrixx Software | IOS App
As part of this process several external dependencies were to be removed and different layers of the app refactored to improve maintainability, reliability and testability.
The Challenge
The initial development of the project relied on Xcode 10.1 and Swift 3, both of which became obsolete and unsupported by Apple. This dependency created significant barriers to using modern development tools and required cumbersome workarounds.
Additionally, the project had accumulated technical debt, including an excessive number of external dependencies, invasive integrations, and deprecated APIs, complicating further development and maintenance.
The Methodology
A systematic refactor was executed to overcome these challenges:
Documentation: Created a README and CONTRIBUTING guides to provide clear instructions for setting up and contributing to the project.
Dependency Management: Reduced external dependencies from 32 to 13, removed Cocoapods in favour of Swift Package Manager (SPM), and updated necessary dependencies.
Network Layer: Refactored the network layer to remove reliance on Alamofire, abstract request logic, decouple endpoint information, and transition from ObjectMapper to the more modern Codable API.
Notifications: Updated remote notification handling by removing deprecated APIs and ensuring compatibility with modern standards.
The Tech_
- Xcode
- Swift
- Swift Package Manager (SPM)
- Codable
- URLSession
- Nuke, Realm, and other libraries
The Results
The network layer was improved through a new abstraction and the use of Codable resulted in cleaner and more robust network code. The handling of remote notifications was modernised to ensure compatibility with current standards and improve reliability. Additionally, comprehensive documentation was created, providing clear guidelines for future developers and facilitating easier onboarding and contribution to the project.
This refactor not only brought the project up to date with current technologies but also laid a solid foundation for future development and scalability.