Astro 3.0 Migration
Table of contents
- Who is this guide for?
- Highlight of changes in Astro to align with Webpack 4
- Typical upgrade process
Who is this guide for? #
This guide is for Astro developers looking to upgrade a project to use Astro version 3.0.
- Node v8.10 and npm v5.6
Highlight of Changes #
- Upgrade to XCode 10, iOS 12 SDK, Swift 4.2
- Upgrade to Node 8.10
- [iOS] ManagedContentInsets protocol changed to support
Typical upgrade process #
From the root of your project, run
git clean -Xfd. This removes all ignored files from your working directory.
Point to the latest Astro
mobify-progressive-app-sdk dependency in your package.json to
3.0.0 and run
npm run deps
Upgrade iOS project
Upgrade your iOS project code to iOS 12, Swift 4.2. Open your project in XCode 10 and then select your project in the XCode file navigator. Select
Edit -> Convert -> To Current Swift Syntax.... Use the wizard to migrate your code.
Search for uses of the
ManagedContentInsets protocol. Your project might not implement this protocol but if it does then replace
func adjustContentInsets(_ insets: UIEdgeInsets)
func adjust(contentInsets: UIEdgeInsets, scrollIndicatorInsets: UIEdgeInsets)
adjustContentInsets were previously setting
scrollIndicatorInsets to the same values. This new implementation of the protocol supports those two insets being set to different values.
Finally, run the iOS and Android apps and verify all behaviour is as expected.