Astro 3.0 Migration

Table of contents

Who is this guide for? #

This guide is for Astro developers looking to upgrade a project to use Astro version 3.0.

Pre-requisites #

Highlight of Changes #

Typical upgrade process #

From the root of your project, run git clean -Xfd. This removes all ignored files from your working directory. First cd native/.

Point to the latest Astro

Update the 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.

Upgrade the ManagedContentInsets protocol

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)

Implementations of adjustContentInsets were previously setting contentInsets and 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.