Jan 31, 2020

What to choose for the iOS app: native Swift or cross-platform Flutter

In the US, more than 65% of smartphones work on iOS. So, when creating an application, you should pay special attention to the version for this platform. You can develop the application using cross-platform frameworks or the native language for iOS. Today we will look at all the pros and cons of development on Flutter from Google and in a special Swift language from Apple.

Flutter

Flutter is quite a new but perspective product by Google, that was released in 2018. This is a cross-platform UI toolkit for creating mobile applications. Flutter isn’t suitable for developing web apps, but with its help, you can develop apps for both mobile platforms — iOS and Android. 

Dart is Flutter programming language, which is based on the famous JavaScript. Therefore, if a developer knows Java or C#, consider that he can program in Dart.

As a cross-platform framework for iOS app development Flutter has pros and cons.

Advantages:

  1. Free and open-source. This contributes to the development of the project and the expansion of the number of users.
  2. High speed of apps. Flutter is great for simple applications that should work quickly.
  3. Own graphics engine. Flutter is compiled into native code for each platform. It uses Skia as a graphics engine.
  4. Fast code writing. Own rendering, widgets and rich developer tools significantly speed up code writing.
  5. Hot Reload. In addition to this, the framework has a built-in Hot reload function, which is widespread on the Internet and not available on native platforms.
  6. Support for old devices. You don’t need to worry about UI for older devices, as newer apps look equally good on older versions of iOS.
  7. Widgets. Flutter has its own set of custom user widgets to create a convenient and detailed interface.

Disadvantages:

  1. New product. Flutter is a new technology that still developing.
  2. Safety. In the case of development on Flutter, the risks are higher since the framework is young, the release was only in December 2018. So far, there are problems with access to libraries, crashes, and bugs.
  3. Instability. Flutter just recently left beta, therefore constantly updated and debugging.
  4. Developers. Since Dart is a new language, it’s quite difficult to find a good developer for the app. The cost of the work is also higher than with the usual programming languages.
  5. Small library. Flutter has excellent support and has libraries, but in two years they couldn’t grow and collect all the possible functions.
  6. Size. Applications written in Flutter are bigger than native ones.

Swift

Swift is primarily the official iOS code writing language by Apple. This language was created in the strictest confidence since 2010 and was first introduced in 2014 during a conference for Apple developers. It has become incredibly functional and easy to learn by borrowing a lot from Objective-C and C ++. It immediately gained great popularity among programmers. More and more developers are using Swift code in their applications.

The analytical company RedMonk made a ranking in which Apple Swift entered the TOP10 most popular programming languages. Swift is perfect for iOS app development, but even platform native language has advantages and disadvantages.

Advantages:

  1. It’s native. This means that Swift was created specifically to meet the requirements for creating apps on the iOS platform.
  2. Free and open-source. December 3, 2015, Swift became an open-source language.
  3. Good code readability. This is necessary when making changes, additions, corrections to the code. Swift code is simplified and more like English. This makes reading easier, takes less time to check the code and fewer lines for the same function.
  4. Safety. Safety is an important criterion for a successful product. Applications developed in Swift are less prone to bugs and crashes.
  5. High speed. The developers claim that Swift is approximately 2.6 times faster than Objective-C and about 8.4 times faster than Python 2.7.
  6. Advanced functionality. In particular, you can manage memory, which is not possible with Objective-C programming.
  7. Dynamic libraries. Swift is easy to scale and support.

Disadvantages:

  1. Interaction. Interaction with Objective-C and other languages slows down the build process.
  2. Updates. Frequent updates require regular study of new material.
  3. Compilation speed. The compilation is the conversion of source code to binary. In Swift apps, the conversion speed is quite low compared to other languages. However, Apple noted that they are working to fix this defect.
  4. Developers. It’s really hard to find a qualified and talented app developer for creating apps on Swift. According to StackOverflow Developer Survey, only 6.6 percent of the 87.354 respondents use Swift.

Conclusions

Flutter platform can be recommended for creating rapid prototypes, as the development is really fast. It can also be used for working with standard user applications to save budget and time, so as not to support separate code for Swift.

Flutter is good for developing iOS apps. If you want to create an app for two platforms or add a web version, you better choose Flutter. These applications are support other platforms, such as Android, with the same source code.  But if you are deciding to develop an application only for iOS, the Switch is a clear winner here due to nativeness.