Migration Guide v2.9

This article provides information to assist users in migrating Trigger.IO Forge apps from v2.8.x of the platform to v2.9.x.

Early Access Beta Release

Welcome to the early access release of Forge platform v2.9.

This guide is a work in progress and will be continuously updated as we move closer to the final v2.9 release in Q4 2020.

Please join us on the Forge 2.9 Community Forum Topic if you have any questions around the update process or run into any difficulties!

Introduction

If your application is currently built against v2.8.x of the Forge platform it is important that you migrate to v2.9.x so that your application will continue to run on the latest Android "R" and iOS 14 releases.

The full changelog for this release can be found in the Beta Release Notes.

The major changes you need to be aware of are:

  1. The crosswalk target is no longer supported.
  2. Modules that need to be updated to the latest versions are:
    • capture: 2.26
    • display: 2.14
    • file: v2.25
    • gallery: deprecated
    • media: v2.9
    • oauth: v1.1
    • prefs: v2.3
    • request: 2.12
    • tabbar: 2.8
    • tabs: 3.7
    • topbar: 2.17
    • urlhandler: 2.3

Let's take a detailed look at the steps needed to update your app for Forge Platform v2.9:

Step 0: Install Xcode 12 if you're on a Mac and want to develop for iOS

Step 1: update to v2.9

Edit your app's src/config.json file and set:

platform_version: "v2.9"

Step 2: update modules

Edit your app's src/config.json file and, for the modules you use, update as follows:

capture

  • update to "version": "2.26"
  • The source option is no longer supported. This module now only allows the user to take a photograph or video with the device camera. Use forge.file.getImage if you want the user to select an image from the device gallery instead.

display

  • update to "version": "2.14"
  • Please note that the ability to style the status bar is no longer supported on most modern versions of Android.

file

  • update to "version": "2.25"
  • Multiple items can now be selected with the forge.file.getImage and forge.file.getVideo API's
  • the file.URL method is no longer exclusive to images and, therefore, no longer supports the width or height options. Use forge.image.resize() instead.
  • deprecated API's are still supported but new code should use:
    • forge.file.URL -> forge.file.scriptURL
    • forge.file.getLocal -> forge.file.getFileFromSourceDirectory
    • forge.file.isFile -> forge.file.exists
  • Remove this module from your project.
  • Multi-select functionality has been moved to the file module.
  • The old forge.gallery.getImages() and forge.gallery.getVideos() API calls are still provided by the file module but new code should use forge.file.getImages() and forge.file.getVideos() instead.
  • Please note that multiple image selection is only supported on iOS 14 or higher and may not be available on some older Android devices.

media

  • update to "version": "2.9"

oauth

  • update to "version": "1.1"

prefs

  • update to "version": "2.3"

request

  • update to "version": "2.12"

tabbar

  • update to "version": "2.8"

tabs

  • update to "version": "3.7"

topbar

  • update to "version": "2.17"

urlhandler

  • update to "version": "2.3"

Step 3

That's it, touch wood, you're done!