Return to search

Swift vs React Native : A performance comparison for automatization of gamification using QR-codes / Swift vs React Native : En jämförelse i prestation för automatisering av gamification med QR-koder

In the world of mobile applications, there is no lack of frameworks and languages to use for development. One of the most used frameworks is React Native, which builds on React for web browsers. The React Native framework allows the developer to write the application in JavaScript, and run the application on iOS or Android devices. As the market for mobile applications expands, the time it takes to develop an application is under pressure, and a framework allowing for one codebase for two applications can save time and money. Deedster is a company that provides a mobile application where the user can learn about climate change and perform small tasks, deeds, that give a positive impact on the environment. A common request from the users is the automatization of completion of deeds. This thesis creates two implementations of a QR-code scanning application for completion of deeds, one with Swift and one with React Native, and compares the experiences during development and the results of the implementation. The evaluation uses both a quantitative and a qualitative analysis. The produced application fulfilled most of the requirements, including the scanning of a QR-code to open the application, an authentication process and the completion of a deed with confirmation for the user. The execution times for the two implementations did not differ largely, but the measurements of the application launch time proved flawed in design due to the difference in measurement technique between the two implementations. When it came to the development process, the React Native framework provided major difficulties with configuration and dependencies, resulting in difficulties when locating the source of errors. The launching process for the Swift application required some manual configurations that proved difficult such as creating certificates, while the React Native implementation used Expo to convert the project to a launchable file format which created all required files for the developer. While the usage of Expo was smooth once it worked, build errors and lacking bridges appeared which proved hard to solve. In conclusion, while the process for React Native was smooth once all dependencies were figured out, the time it took to get all configurations in place consumed a large chunk of the project’s time budget while the Swift implementation provided steady progress with few unexpected errors. / För applikationsutveckling för mobiler finns det en uppsjö av språk och ramverk för att underlätta utvecklingsprocessen. Ett av de vanligaste ramverken är React Native som bygger på React för webbläsare. React Native-ramverket låter utvecklare skriva koden i JavaScript, men köra applikationen på både iOS- och Android-enheter. I takt med att marknaden för mobilapplikationer växer, sätts det högre press på kortare utvecklingsfaser och snabbare lansering. För att underlätta processen och spara tid och pengar kan React Native vara en bra lösning. Deedster är ett företag som erbjuder en mobilapplikation där användaren kan lära sig om klimatförändringar och utföra små uppdrag, deeds, som ger en positiv påverkan på klimatet. En vanlig förfrågan från användare är ett sätt att automatisera avklarandet av deeds. Den här uppsatsen skapar två implementationer av en applikation som scannar en QR-kod för att markera en deed som avklarad. Den ena byggs med Swift och den andra med React Native och syftar till att jämföra utvecklingsprocessen och den resulterande applikationen. Evalueringen sker med både en kvalitativ och en kvantitativ analys. Den färdiga applikationen uppfyllde de flesta kraven som Deedster ställt, inklusive att appen öppnas genom att scanna en QR-kod, en användare kan autentisera sig, klicka för att markera en deed som klar och få bekräftelse från appen om att det är klart. Exekveringstiderna för de två implementationerna varierade inte märkbart, men mätningarna för starttiden för applikationerna visade sig bristfällig då mättekniken för de två apparna inte blev jämförbar. Gällande utvecklingsprocessen resulterade användandet av React Native i stora problem med konfigurationer och versionskompatibilitet vilket gjorde felsökning svårt. Lanseringsprocessen för Swift-appen krävde en del manuell konfigurering med till exempel certifikat, medan React Native implementationen använde Expo för att konvertera React Native-projektet till ett lanserbart filformat som skapade alla behövda filer åt användaren. Trots att Expo för pakethantering var enkelt och smidigt när det väl fungerade så krävde alla fel vid kompilering och avsaknad av bryggor mycket tid och var svårt att lösa. Slutsatsen blev att React Native var smidigt när alla konfigurationer var på plats, men den tid det tog att konfigurera allt stod för merparten av den tid som lagts på att bygga applikationen. För Swift var processen istället smidig om än inte lika automatiserad, och bjöd på få om ens några oväntade fel.

Identiferoai:union.ndltd.org:UPSALLA1/oai:DiVA.org:kth-337398
Date January 2023
CreatorsTajik, Farzaneh, Lindström, Josefin
PublisherKTH, Skolan för elektroteknik och datavetenskap (EECS)
Source SetsDiVA Archive at Upsalla University
LanguageEnglish
Detected LanguageEnglish
TypeStudent thesis, info:eu-repo/semantics/bachelorThesis, text
Formatapplication/pdf
Rightsinfo:eu-repo/semantics/openAccess
RelationTRITA-EECS-EX ; 2023:616

Page generated in 0.0042 seconds