In this article we are going to go through all the pros and cons of the Swift technology for the purposes of application development. The categories which we are going to use for comparison are the same categories used for the Mobile App Development page.
To learn more about other app development technologies (e.g. Flutter, React Native, Swift etc.) go to the Mobile App Development page.
Swift is a native technology intended for the iOS operating system.
Both the language and repository was published by Apple back in 2014 as a common programming language for all of Apple’s application platforms (iOS, macOS, watchOS, and tvOS). Swift is intended as a modern object-oriented language.
Since the language is only used in Apple products, it can be viewed as sort of a walled garden. However, since the language share many common design principles with other object-oriented languages (e.g. Java) it should not be considered the most steep learning curve. Especially, if you are already familiar with one or more modern object-oriented languages.
Because the Swift development technology only fits one of the two primary mobile operating systems (iOS & Android). It is therefore required to create two projects in order to facilitate both operating systems, which naturally means more time and resource spend in the development phase.
If you are planning to launch an app on a very competitive market or an app which required a lot of specialized functionalities, it might be necessary for you to consider paying for having two native apps. If competitors are making their app as native, they will have a strong advantage in terms of performance or available functionalities.
A native iOS application should be written in Swift, which is a extension of Objective-C.
Objective-C was actually the predecessor of Swift, but after Apple’s release of Swift it has surpassed Objective-C in popularity.
Programming for iOS apps follow the MVC (Model-View-Controller) pattern in which all user interactions happens on the view classes. Meanwhile the logic of the action itself is handled in the controller classes. Finally, the controller classes uses the model classes to update the state and data of the page. If you would like to know more about these sorts of design patterns, I would suggest that you checkout my tutorials on design patterns.
Since Swift is one of the two native technologies covered in this article, it is not relevant to investigate whether Swift supports page-by-page adoption.
The primary question should rather be, whether if the webview or hybrid technologies support page-by-page adoption into native applications like Swift.
Swift is supported and maintained by Apple.
Given that Swift is considered some sort of a walled garden, since it is only used for Apple products, it is difficult to determine if there is any other supporting companies or organizations out there.
However, since the technology is open source it is possible to make suggestions and contributions to the source code. Presumable most of these contributions come from Apple and/or individual developers.
Swift is open source. The repository can be found here.
As mentioned in the “Supporters” section, contributions to the repository is likely only coming from sources close to Apple or Apple themselves, since the Swift technology is primarily used for development on Apple products.
A new major version of Swift is release every 1-2 years, with several minor versions in between.
With a native technology it should be a given that all device APIs can be easily accessed and implemented.
As a native technology, Swift based applications sets the bar for which the webview and hybrid technologies benchmark against. The performance should therefore never be an issue when working with Android.
It should be noted that when comparing the iOS and Android OS, it is commonly known that iOS smartphone comes with less RAM, which could indicate that iOS systems comes with some sort of performance advantage over Android. This is however a misconception. Both systems uses approximately the same amount of memory to launch and run the same apps. The reason why iOS smartphone comes with less RAM, is because of the handling of apps in the background. As soon as an Android app is swapped to the background, the used memory is compress, which naturally saves a lot of memory. However, when compared to iOS it clearly shows that iOS is much better at minimizing the background apps’ memory usage. Unfortunately it is not possible to say how, since Apple have not publicly shared this information.
The Xcode (Swift’s IDE) comes with a full set of UI consistent components, which are simple to implement and fits the user’s expectation of how an application Swift should look and feel. It is of cause necessary to make your own alterations to these components in order to get an interface suitable for your application.
Similarly to the Android Studio IDE, Xcode also comes with in inbuilt UI editor, which includes all basic components.
The Xcode IDE does not support hot reload out of the box. For each change in logic or UI, you will have to recompile and relaunch the application.
However, it would appear that some utilities have been created to enable hot reloading on at least the UI. This is not something I have tried myself, but I will refer to the sources of this information in case you would like to learn more.
When developing apps for iOS, it is necessary to determine which iOS SDK is required based on the version of the OS that you are planning to support.
Xcode (iOS’s IDE) comes bundled with a version of the iOS SDK. It can therefore be necessary to investigate which version of Xcode you are using if you want to change or experiment with the iOS SDK versions.
When working with Swift/iOS development the only choice of IDE is Xcode, which can only be install on a Mac.
In the case you do not have access to an Mac computer, you can also achieve the same result by renting remote access to a Mac. This can be done by the help of services like MacStadium.
The cost of one of these services are relatively high on a monthly basis. I would therefore suggest that you purchase a Mac computer if you are planning to continuously create new iOS app. However, if it is only for a limited amount of time, these types of services will be a better financial choice for you.
Beside Xcode enabling development and publication of iOS apps, it also have the capabilities to create testing emulators.
Xcode can be found and installed from the Mac app store.
My name is Daniel H. Jacobsen and I’m a dedicated and highly motivated software developer with a masters engineering degree within the field of ICT.
I have through many years of constantly learning and adapting to new challenges, gained a well-rounded understanding of what it takes to stay up to date with new technologies, tools and utilities.
The purpose of this blog is to share both my learnings and knowledge with other likeminded developers as well as illustrating how these topics can be taught in a different and alternative manner.
If you like the idea of that, I would encourage you to sign up for the newsletter.