eclipsesource / eclipsesource/tabris-js

Cordova plugin "onload" does not work as expected

Open
#1,705 1 comment 0 reactions 0 assignees View on GitHub
bug ios
Dominant language
JavaScript
Stars
1.4k
Forks
171
PR merge metrics
No merged PRs in 30d

Description

### Problem description

When setting the `onload` plugin parameter to `"true"`, the plugin's `pluginInitialize` method is never called if no JS API had been accessed.

It seems on iOS, this initialization is part of `CDVViewController#viewDidLoad`, however this method is not used in Tabris.js.

### Expected behavior

When `onload` is being set, the plugin should get initialized when the application has been loaded, even if no JS API of the plugin has been used.

We should ensure that startup plugins (those with `onload` set to `"true"`) get initialized properly as part of the Tabris.js' initialization flow (see https://github.com/eclipsesource/cordova-ios/blob/master/CordovaLib/Classes/Public/CDVViewController.m#L309)

### Environment

- Tabris.js version: 2.5
- Platform: iOS

### Reproducing the issue

Build an app with `cordova.plugins.diagnostic@4.0.8` and debug it. `pluginInitialize` will never be called.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.