Contributor
Carmen-Gabriela Popa

iOS: Device Sensors and Code Refactoring


Mentors
caldrian, Michael Herold
Organization
Catrobat

Device sensors have different ways of functioning, depending on the operating system. This being stated, I will improve the existent code by calculating the values at which the sensors should be initialised and their range area. In order to do this, I will test a multitude of possibilities and check the results, until I find the most suitable one in order to make the projects behave in the same way both on Android and iOS. I will use iOS native sensors, understand how they work and get the most of their functionality in order to improve the existing code.

Additionally, I would create a framework for the sensors used in iPhones and add some general functions to help me throughout the development of the project, but also to help other developers work with sensors better. This will allow me to modularise the code and improve its readability. In the end, I would refactor the code to make it as readable and organised as possible, so it can become easy to be maintained by other contributors in the future. Also, for every progress I make throughout the project, I will create some mock examples to test its functionality and discover new ways to improve it, such as edge cases.