eclipsesource / eclipsesource/tabris-js
Cordova plugin "onload" does not work as expected
- 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
Assessment
This issue has not been assessed yet.