XSD-Swift Model Generator

Code generation tool for creating SWIFT model classes (Check24 iOS Project)

  • ─░lker Baltac─▒

  • September 2016 - April 2017

Due to complexity of business logic and nested object oriented data structure of our API, our mobile apps needed to cope with more than 600 files to encode/decode server requests/responses and map them to native classes. In order to avoid inconvinient work of inital model class creation for such a high number of models, I implemented a code generator that downloads the latest XSD file (WSDL document) for the current state of the web service that generates required SWIFT classes with a XML Parser. With help of this automation tool we saved a alot of time during the initial natification phase of the Check24 iOS App. It also aimed to track changes after each backend deployment that could end up with potential bugs in the mobile apps.

Apart from model generation, the tool also created required JSON mapping function as well enum valuetransformators for individual classes which was needed to be handled explicitly pior to SWIFT 4.0