App Portability with Smart Devices a Case Study from Ios to Tvos
Total Page:16
File Type:pdf, Size:1020Kb
DEGREE PROJECT IN TECHNOLOGY, FIRST CYCLE, 15 CREDITS STOCKHOLM, SWEDEN 2016 App portability with smart devices A case study from iOS to tvOS LINNEA KYLÉN RÖNNQVIST KTH ROYAL INSTITUTE OF TECHNOLOGY SCHOOL OF INFORMATION AND COMMUNICATION TECHNOLOGY Abstract Nowadays, there are many different devices that a software developer needs to consider - a program might be present both on computer, mobile, tablet and wearables. As new smart device platforms are frequently intro- duced, firms want to leverage new opportunities that arise. Thus, firms can create new apps or port their existing ones. Recently, Apple presented an updated version of their Apple TV, and announced that apps will also be available on that platform. This thesis investigates how a productivity app implemented for Apple’s mobile op- erating system (iOS) can be ported to and refined for the new Apple TV operating system (tvOS). Further, the thesis investigates the problems of app portability that arise when porting between smart devices. A case study was performed where a specific app was ported from iOS to tvOS, using the new programming language Swift. First, the app was ported with a naive approach, with focus on source portability and min- imum porting cost. Thereafter, the app was ported using a refined ap- proach, to make it more appropriate for the targeted platform. Related lit- erature, such as app portability, smart TV and smart device research was investigated to give a more thorough understanding, and to identify addi- tional problems regarding app portability. The thesis presents the porting process, as well as the identified app portability problems when porting between smart devices: choice of pro- gramming paradigm, vendor specific APIs, platform limitations, data storage and migration, context of use, navigation and interaction, portability- versus-UX, project and team aspects and quick evolvement in the area. Lastly, it is discussed whether the apps should be ported at all, or rather reimagined to leverage new platforms with new opportunities. Further research is needed to verify the findings on other platforms, and to see whether cross-platform tools (e.g. web technologies) can be used also in the smart device domain (not only mobile-to-mobile). Keywords Apps, portability, smart devices, smart TV, tvOS, iOS, plat- forms, software development. Abstract Det finns numera många olika enheter som en mjukvaruutvecklare be- höver ha i åtanke – ett program kan förekomma både på datorn, i mobilen, på surplattan och i klockan. Eftersom det kontinuerligt introduceras nya smarta enheter, är det troligt att företag kommer vilja nyttja de nya möj- ligheterna som uppstår. Således kan företag skapa nya program eller porta sina befintliga till de nya miljöerna. Apple presenterade nyligen en ny version av sin Apple TV, och med- delade att appar nu även kommer finnas för nedladdning på denna platt- form. Denna uppsats undersöker hur en produktivitetsapp skapad för Ap- ples mobila operativsystem (iOS) kan portas och förfinas för det nya Apple TV-operativsystemet (tvOS). Dessutom undersöks de problem relaterade till app-portabilitet som uppstår vid portning mellan smarta enheter. En fallstudie genomfördes där en viss app portades från iOS till tvOS med det nya programmeringsspråket Swift. Först portades appen med ett naivt angreppssätt, där fokus låg på källkodsportabilitet och minimala portningskostnader. Därefter portades appen med ett förfinat angreppssätt för att göra den lämpligare för den avsedda plattformen. Relaterad litter- atur, såsom forskning kring app-portabilitet, smart TV:s och smarta en- heter, undersöktes för att ge en djupare förståelse och för att identifiera ytterligare problem gällande app-portabilitet. Uppsatsen presenterar portningsprocessen, samt de identifierade app- portatbilitetsproblemen vid portning mellan smarta enheter: valet av pro- grammeringsparadigm, leverantörsspecifika API:er, plattformsbegrän- sningar, datalagring och migration av data, användarkontext, naviger- ing och interaktion, portabilitet-kontra-användarupplevelse, projekt- och team-aspekter, samt den snabba utvecklingen inom området. Slutligen diskuteras huruvida apparna borde portas över huvud taget, eller om de hellre borde omskapas från noll för att optimalt kunna utnyttja de nya plattformarnas möjligheter. Ytterligare forskning krävs för att verifiera resultaten på andra platt- formar, och för att se om plattformsoberoende verktyg (exempelvis webb- teknologier) kan var till nytta även när man ser till smarta enheter (till skillnad från bara mobil-till-mobil). Nyckelord Appar, portabilitet, smarta enheter, smart TV, tvOS, iOS, platt- formar, mjukvaruutveckling. Acknowledgements Firstly, I would like to thank my advisors at KTH Royal Institute of Technology, Leif Lindbäck and Fadil Galjic. They have provided valuable insights and feedback during the entirety of the thesis work. Secondly, I would like to thank my husband, David Rönnqvist, who has endured yet another education and thesis process of mine. Finally, after 20 years of schooling, it is time to exit school for good. Contents 1 Introduction 1 1.1 Background .............................. 1 1.2 Problem ................................ 1 1.3 Purpose ................................ 2 1.4 Delimitations ............................. 3 1.5 Outline ................................ 3 2 Theoretical background 5 2.1 Operating systems - iOS and tvOS ................. 5 2.1.1 iOS .............................. 6 2.1.2 tvOS .............................. 6 2.1.3 Comparison ......................... 7 2.2 Smart devices and the role of the TV ................ 7 2.2.1 The role of the TV ...................... 8 2.2.2 Wearables .......................... 8 2.2.3 Overview of smart device and smart TV research ..... 9 2.3 Application portability ........................ 11 2.3.1 Software portability ..................... 11 2.3.2 Overview of application portability research . 12 2.3.3 Mobile portability ...................... 14 2.3.4 Overview of mobile portability research . 15 2.4 Porting and application portability: Definition . 17 2.4.1 Measurement ........................ 17 2.4.2 Context ............................ 18 3 Methodology 19 3.1 Research approach .......................... 19 3.1.1 Quantitative and qualitative methods . 19 3.1.2 Inductive and deductive methods . 19 3.1.3 Case studies ......................... 20 3.1.4 Adopted research approach . 20 3.2 Outline of research process ..................... 20 3.2.1 Literature study ....................... 20 3.2.2 Case study: Phase 1 ..................... 21 3.2.3 Case study: Phase 2 ..................... 21 3.2.4 Generalizations ....................... 22 3.3 Data collection methods ....................... 22 3.3.1 Literature study and platform research . 22 i 3.3.2 Observations from the porting experiments . 22 3.4 Portability measures ......................... 23 3.4.1 Lines of code ......................... 23 3.4.2 Work hours .......................... 23 3.5 Software development - tools and methods . 24 3.5.1 Software design process: An iterative approach . 24 3.5.2 Development environment . 24 3.5.3 Programming language and paradigm . 24 4 The iOS app and conditions for its porting 27 4.1 App functionality and structure ................... 27 4.1.1 Functionality ......................... 27 4.1.2 Core Data model, persistent storage and the cloud . 27 4.1.3 Application structure .................... 28 4.2 Demonstration of the iOS app ................... 30 4.3 Conditions for porting ........................ 35 4.4 Advantages and drawbacks ..................... 35 5 Case study: Porting to tvOS 37 5.1 Phase 1: A naive port to tvOS .................... 37 5.1.1 Creating a target and making the app runnable . 37 5.1.2 Setting up the storyboard . 38 5.1.3 Adjusting the focus ..................... 39 5.1.4 Making a date picker .................... 40 5.1.5 Up and running ....................... 43 5.2 Evaluation and research ....................... 43 5.2.1 Testing on device ...................... 43 5.2.2 Areas for improvement ................... 47 5.3 Phase 2: Refining and redesigning the app . 47 5.3.1 Implementing key-value storage and sync with iCloud . 48 5.3.2 Refining the navigation and storyboard (with tab bar and collection view) ....................... 48 5.3.3 Focus ............................. 48 5.3.4 Sizes, spacing and colors . 48 5.3.5 Text input and play/pause buttons . 49 6 Case study: Results 51 6.1 Phase 1: The naive port ....................... 51 6.2 Phase 2: The refined port ...................... 52 6.3 Portability measures ......................... 53 6.3.1 Lines of code ......................... 53 6.3.2 Work hours .......................... 54 6.4 Demonstration of the app from Phase 1 . 55 6.5 Demonstration of the app from Phase 2 . 61 7 Case study: Interpretation and generalization 67 7.1 Analysis of portability types and measures . 67 7.1.1 Binary portability ...................... 67 7.1.2 Source portability, and portability of specification & design 67 7.1.3 Revisiting the portability model . 68 ii 7.1.4 Architectural portability ................... 68 7.2 Comparing the case study approaches . 69 7.2.1 Why the naive approach is inappropriate . 69 7.2.2 Experience portability .................... 70 7.2.3 Summary of concerns .................... 71 7.3 Portability problems with smart devices . 71 7.3.1 Programming paradigm and programming language . 71 7.3.2 Vendor lock-in ........................ 71 7.3.3 Platform limitations