# News: LIFF v2.4.1 released

LIFF v2.4.1 released

We have released LIFF v2.4.1.
The changes in LIFF v2.4.1 are as follows:

# Fixed an issue with the feature to open another LIFF app without closing a LIFF app

We've found that the feature to open another LIFF app without closing the LIFF app, which we announced on August 31, 2020, has a bug and didn't work correctly even if the operating conditions were met.

In LIFF v2.4.1, the operating conditions have been changed as follows and the bug has been fixed.

Items Before the changes After the changes
LIFF SDK 2.4.0 2.4.1
LINE 10.16.0 10.18.0
The use of LIFF v2.4.0 is no longer recommended

Due to the above bug, the use of LIFF v2.4.0 is no longer recommended. If you are using LIFF v2.4.0, we recommend that you update to v2.4.1.

For more information, see Opening a LIFF app from another LIFF app in the LIFF document.

# Added a feature to liff.isApiAvailable() to check whether the transition between LIFF apps is possible

liff.isApiAvailable(), a method which checks if an API is available, can now be used to check if transitioning between LIFF apps is possible.

You can now execute liff.isApiAvailable('multipleLiffTransition') to confirm whether transitioning between LIFF apps is possible before opening another LIFF app. By using this feature, you can prevent an error when opening another app.

if (liff.isApiAvailable('multipleLiffTransition')) {
  window.location.href = "https://line.me/{liffId}", // URL for another LIFF app
}
Get information about transitioning between LIFF apps with liff.getContext()

You can now also use liff.getContext(), a method which obtains information about a LIFF app, to obtain information such as whether transitioning between LIFF app is possible, and the executable LINE version.

  • availability.multipleLiffTransition.permission: Indicates whether transitioning between LIFF apps is possible.
  • availability.multipleLiffTransition.minVer: Indicates the minimum LINE version that supports the transition between LIFF apps.

Below is an example of the return value of liff.getContext().

{
    "type": "utou",
    "utouId": "UU29e6eb36812f484fd275d41b5af4e760926c516d8c9faa35…b1e8de8fbb6ecb263ee8724e48118565e3368d39778fe648d",
    "userId": "U70e153189a29f1188b045366285346bc",
    "viewType": "full",
    "accessTokenHash": "ArIXhlwQMAZyW7SDHm7L2g",
    "availability": {
        "shareTargetPicker": {
            "permission": true,
            "minVer": "10.3.0"
        },
        "multipleLiffTransition": {
            "permission": true,
            "minVer": "10.18.0"
        }
    }
}

For more information, see liff.isApiAvailable() or liff.getContext() in the LIFF API reference.

# Fixed behavior of liff.init() being called twice

If you execute liff.init() more than once under the condition that the LIFF App is successfully initialized, a rejected Promise object was returned with an error message.

In LIFF v2.4.1, the error has been fixed so that if you execute liff.init() more than once under the condition that liff.init() succeeds, a resolved Promise object will be returned, and a warning message will be displayed.

For more information on initializing your LIFF App, see the LIFF document Initializing LIFF App.