Astro 4.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 4.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 4.0.0 and run npm run deps

Upgrade iOS project

Upgrade your iOS project code to iOS 13, Swift 5. Open your project in Xcode 11 and then select your project in the Xcode file navigator. Select Edit -> Convert -> To Current Swift Syntax.... Use the wizard to migrate your code.

Remove References to Mobify Push

Open the project in Xcode, in the target settings of the app select the General tab, under the Frameworks, Libraries, and Embedded Content section remove the PushClient.framework from the target.

Open the project in Android Studio, in the settings.gradle file for the project remove the project(':astro:pushclient').projectDir definition.

Remove references to the PushPlugin in App.js.

Rebuild both apps. The apps will no longer receive push notifications from Mobify Push.


Finally, run the iOS and Android apps and verify all behaviour is as expected.