github ionic-team/capacitor 1.0.0-beta.11
1.0.0-beta.11 (BREAKING CHANGES)

latest releases: 5.7.5, 6.0.0, 6.0.0-rc.2...
5 years ago

This is one of the last beta's before 1.0. As such, we've snuck in a few important breaking changes and things to be aware of.

First, the webserver was removed from Capacitor completely. That means no more localhost. Instead, we've moved to using a custom URL scheme, in this case capacitor://. This removes a lot of complexity and potential security issues with the web server model, and it should end any issues with the server not running/reloading/etc.

However, we've had to drop iOS 10 support to get access to this new feature in WKWebView. According to Apple, iOS 10 and below account for less than 10% of usage worldwide, which is our cut off for continuing support.

Additionally, there are a few more breaking changes for existing projects. We wanted to get this in now so we can avoid future breaking changes once we hit 1.0 final:

Breaking changes for Android:

There are some dependency path changes required in android/settings.gradle:

Remove these lines:

include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor/')

Change these lines:

include ':capacitor-android-plugins'
project(':capacitor-android-plugins').projectDir = new File('../node_modules/@capacitor/cli/assets/capacitor-android-plugins/')

to

include ':capacitor-cordova-android-plugins'
project(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/')

Your settings.gradle should look something like this:

include ':app'
include ':capacitor-cordova-android-plugins'
project(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/')

apply from: 'capacitor.settings.gradle'

Next, edit android/build.gradle:

Change this line:

implementation project(':capacitor-android-plugins')

to

implementation project(':capacitor-cordova-android-plugins')

Breaking changes for iOS:

  • iOS 10 support has been dropped
  • Change deployment target to 11.0 or greater
  • The port option will not work as there is no server anymore
  • localStorage will be lost as the url changes. We always recommend using the Storage API to avoid this issue.

Don't miss a new capacitor release

NewReleases is sending notifications on new releases.