Whenever you create an iOS application, the question you ask first is usually “do I have to develop a native solution using Swift or go with a cross-platform app?”. You will be able to answer this question, as well as understand the advantages and disadvantages of the both options, after reading this article.
Flutter is a young yet promising platform. It has attracted attention from big companies that developed their apps. Flutter’s simplicity is comparable with web applications, and its speed is equal to that of native apps’. The programming language that goes with Flutter is Dart, which compiles into a binary code. That allows operation speed to be comparable to Swift’s and Objective-C’s.
Xamarin is a framework for cross-platform mobile application development, which uses the C# language. Microsoft bought Xamarin in 2016, made the source code of Xamarin SDK open, and included it into IDE Microsoft Visual Studio.
Objective-C used to be the main language of development for iOS until not so long ago. This language is a superset of C, that’s why the compiler Objective-C fully understands C-code. Therefore, an app created with Objective-C can be very fast. Objective-C also has object-oriented programming, which helps make programs that you can easily scale in the future if needed. However, this language is quite old. Stepstone created it in the 1980s. Apple, on the other hand, is a very progressive company, so it wasn’t a huge surprise when they introduced a new programming language in 2014 – Swift.
Swift is a language that allows writing applications for phones, desktop computers, and servers. The compiler is optimized for productivity, and the language is optimized for development, with no compromises from each side. Swift has years of development behind it, and it’s still moving forward, constantly learning new opportunities. When it was just released, the community split into two parts. The first one believed that there was nothing better than Objective-C. The second one rooted for Swift and tried to use it to create apps. Now, after several years of development, it’s safe to say that when it comes to creating iOS apps, Swift is language #1.
The idea of writing an app for iOS and Android simultaneously does draw attention to itself. However, nothing is perfect.
- Speed and cost of development. You only need one team of developers to create an app that will look the same on both iOS and Android. When you need to create an app for the both platforms quickly, this becomes a substantial advantage.
- Safety. Almost all cross-platform solutions have an open source code, and any thief who knows how to program can look at it, find the weak spots, and hack your app. It’s also important that a cross-platform app connects with the backend via usual HTTP-calls, and thieves can easily intercept your data and use it for their advantage (read more about it here)
- The difficulty of work with iOS native functions. Swift developers have integrated useful modules into the language. You can work with audio, video, phone camera, location, Bluetooth with those modules. When developing a cross-platform app, the work with these functions is more difficult. For example, to add an AR-object on a video from a camera or demonstrate a screen during an online call, you need to develop additional modules. It increases the time spent on developing, making it more expensive
- Speed and interface responsiveness. When an app that shows some data (for example, an online shop or a newsfeed) is developed, the speed of a cross-platform app is equal to a native one, but it will often be lower. If your app supports calls, video chats, AR, it works even slower compared to a native app. Users won’t like it if they miss half of what their interlocutor was speaking about, or if they are unable to catch their favorite Pokemon due to low interface responsiveness.
According to research conducted by Andrew Madsen’s blog, out of 79 most popular non-game applications in the App Store, about 53% are written in Swift, and the other 47% don’t use Swift. It’s important to mention that somebody from that 47% can be using Objective-C, which is a native language, too.
There is also research by statista.com, which says that ⅔ of all apps are native, for both Android and iOS. Why is that?
- All peculiarities of a platform are considered. No doubt that developing an app for the both platform at the same time is convenient, but each one of them is individual. Requirements for safety, interface design, and payment system integration differ. For example, system elements that iOS and Android have are absolutely different (the example is on the image below). The user expects to see elements familiar to the platform.
- Speed and interface responsiveness. Native-written apps work faster. It’s a lot more convenient for a user to use an app where the animation is smooth, touching buttons is processed instantly, and they can scroll the screen without freezes, while quickly loading content. It is very important as people are actively using apps nowadays to go shopping, visit doctors, attend business meetings. No one would want their screen to freeze in the moment of payment or during important meetings. These things can make the user look for an alternative
- No obstacles to updating apps or widen their functionality. Platforms evolve, they add new functions, and apps must support them. An iOS update can completely break an application. Unless cross-platform app developers release a new version, the app may not be working, and there is nothing you can do about it
- Access to own functions and private API platforms. Swift developers have integrated useful modules into the apps, as we’ve mentioned earlier. Whenever you want to create an app with online conferences, AR, or sharing via Bluetooth (push ads upon entering a Bluetooth tracker area or money transfer in bank apps), the developers won’t have to create these modules themselves, which saves time and money
- Safety. The source code of operating systems and native ways of development is closed. Gaining access to it is impossible, unlike cross-platform apps with an open source code that anyone can access.
- You need to create two applications
- You then need to support these two applications
Cross-platform and native ways of development have advantages and disadvantages to them. There is no multi-purpose tool that will be better everywhere. When choosing development tools, take an app type, app’s and platform’s peculiarities, your money, and goals into consideration.
For example, go for a cross-platform solution, if you:
- Are limited in time and money
- Need your app to look the same on all platforms, despite their peculiarities
- Don’t need your app to use platform-specific functions like working with the phone camera, difficult animations, photo and video editing, Bluetooth, online calls
- Don’t require your app to be extremely safe
Examples: news apps, pizza ordering apps, a beauty salon registering apps, online shops.
On the other hand, go for native tools if your app:
- Is supported during a long period of time
- Uses a phone camera, difficult animations, Bluetooth, video and audio calls, streams
- Requires support for new platform functionality after the platform update
- Has different design on different platforms
- Looks the way the platform guidelines recommend
- Is demanding to safety
- Requires high speed of work and interface responsiveness, however new and powerful a device is.
Examples: e-learning, medicine, internet TV, video chats, video surveillance, augmented reality.