Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡️
MIT License
Bot releases are visible (Hide)
Published by jcesarmobile over 4 years ago
Published by jcesarmobile almost 5 years ago
Published by jcesarmobile almost 5 years ago
Published by mlynch almost 6 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:
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')
Storage
API to avoid this issue.