Softwr

Mobile Development · head to head

Apache Cordova vs Swift

Apache Cordova logo

Apache Cordova

Mobile Development

Open source framework for wrapping HTML, CSS and JavaScript apps as mobile apps

From
Free
Free plan
Yes
Swift logo

Swift

Mobile Development

Open source programming language from Apple for apps, servers and embedded systems

From
Free
Free plan
Yes

The short version

  • Both are free.
  • Only Apache Cordova lists apache 2.0 open source licence; only Swift lists type inference and optionals.
  • Where Apache Cordova falls short: apps render in a web view, so UI is not native by default.
  • Where Swift falls short: strongest tooling is on Apple platforms, with Xcode for iOS and macOS apps.

How do Apache Cordova and Swift differ?

Apache Cordova and Swift differ on platforms. Only the attributes on which Apache Cordova and Swift actually diverge.

Attributes where Apache Cordova and Swift differ
AttributeApache CordovaSwift
PlatformsiOS, Android, Windows, macOS, LinuxmacOS, Linux, Windows, iOS

Identical on both: starting price (Free), pricing model (Open-source), free tier (Yes), category (Mobile Development).

Not yet recorded: founded for Swift.

Which features does each one have?

They share no listed features; 6 appear only for Apache Cordova and 8 only for Swift. Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.

Only in Apache Cordova

  • Single JavaScript API for device functions
  • Plugin system managed from the command line
  • Targets iOS, Android and Electron
  • HTML, CSS and JavaScript app code
  • Apache 2.0 open source licence
  • Platform feature support documentation

Only in Swift

  • Native compiled code
  • Type inference and optionals
  • Memory and data race safety checks
  • async and await with actors
  • C and C++ interoperability
  • Package ecosystem
  • Linux, macOS and Windows toolchains
  • Embedded and server targets

What is each one used for?

Apache Cordova is most often brought in for wrapping an existing web app as a mobile app; Swift for iOS and macOS apps. The jobs each tool is most often brought in to do.

Apache Cordova

  • Wrapping an existing web app as a mobile appnot Swift
  • Single codebase for iOS and Androidnot Swift
  • Prototyping mobile apps with web skillsnot Swift
  • Accessing device features from JavaScript through pluginsnot Swift

Swift

  • iOS and macOS appsnot Apache Cordova
  • Server-side servicesnot Apache Cordova
  • Command-line toolsnot Apache Cordova
  • Embedded firmwarenot Apache Cordova

Where do Apache Cordova and Swift fall short?

Apache Cordova's most cited limit: apps render in a web view, so UI is not native by default. Swift's: strongest tooling is on Apple platforms, with Xcode for iOS and macOS apps. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.

Apache Cordova

  • Apps render in a web view, so UI is not native by default
  • No built-in UI component library or hosted build service
  • Adobe's PhoneGap Build cloud service was discontinued in 2020
  • Many platforms listed in older versions, such as BlackBerry and Tizen, are no longer supported

Swift

  • Strongest tooling is on Apple platforms, with Xcode for iOS and macOS apps
  • It is a language, so UI, server and database libraries are separate choices
  • Versions 1.0 to 2.1 were proprietary and later versions are Apache 2.0
  • Cross-platform mobile UI needs other frameworks such as Flutter or React Native

How much do Apache Cordova and Swift cost?

Apache Cordova is free to use; Swift is free to use. Plan by plan below, from each vendor's own pricing page.

Apache Cordova

Free

No published plan breakdown. See the Apache Cordova review.

Swift

Free

No published plan breakdown. See the Swift review.

Which should you pick?

Choose Apache Cordova if

  • You need single javascript api for device functions.
  • You want to start without paying.
  • You work on iOS, Android, Windows, macOS, Linux.
  • You also want plugin system managed from the command line.

Choose Swift if

  • You need native compiled code.
  • You want to start without paying.
  • You work on macOS, Linux, Windows, iOS.
  • You also want type inference and optionals.

Questions people ask

Is Apache Cordova or Swift better?
It depends on the job. Apache Cordova fits wrapping an existing web app as a mobile app; Swift fits iOS and macOS apps. Apache Cordova starts at Free and Swift at Free.
Which is cheaper, Apache Cordova or Swift?
Apache Cordova starts at Free and Swift at Free.
Does Apache Cordova or Swift run on more platforms?
Apache Cordova runs on iOS, Android, Windows, macOS, Linux. Swift runs on macOS, Linux, Windows, iOS.
Can I use Apache Cordova for free?
Both have a free tier, so you can try either at no cost before committing.
What is Apache Cordova best used for?
Apache Cordova is most often used for wrapping an existing web app as a mobile app, single codebase for ios and android, prototyping mobile apps with web skills, accessing device features from javascript through plugins. Of those, wrapping an existing web app as a mobile app and single codebase for ios and android are not what Swift is typically brought in for.
What can Apache Cordova do that Swift cannot?
Apache Cordova covers Single JavaScript API for device functions, Plugin system managed from the command line, Targets iOS, Android and Electron, HTML, CSS and JavaScript app code. Swift covers Native compiled code, Type inference and optionals, Memory and data race safety checks, async and await with actors.

Answered from the vendors’ own pages

Apache Cordova: Is Apache Cordova free?

Yes. The project describes itself as free and open source under the Apache License 2.0, maintained by the Apache Software Foundation.

Source
Swift: Is Swift open source?

Yes. Wikipedia says it has been released under Apache 2.0 since version 2.2 in December 2015, and the Swift site links to the SwiftLang GitHub organisation.

Source
Apache Cordova: How is Cordova related to PhoneGap?

Nitobi Software developed PhoneGap in 2008 and Adobe acquired Nitobi in October 2011. The code was contributed to Apache and renamed Cordova.

Source
Swift: Which platforms does Swift run on?

The Swift site lists tools for Linux, macOS and Windows, and Wikipedia also lists Apple operating systems, WebAssembly and Android. The infobox also lists FreeBSD and z/OS.

Source
Apache Cordova: Which platforms does Cordova support?

As of version 11, iOS, Android, Windows 8.1, Windows Phone 8.1, Windows 10 and Electron are listed on Wikipedia. The project site has a page of per-platform feature support.

Source
Swift: When was Swift released?

Apple showed it at WWDC on 2 June 2014, and Swift 1.0 arrived in September 2014, according to Wikipedia. Swift 5 in 2019 brought a stable binary interface.

Source
Share

Related pages

Other head to heads