Resolve function in exec isn't called after action succeeded or failed (commandDelegate missing) #134
Closed
Description
Bug report
What steps will reproduce the problem?
- Use
cordova-plugin-lottie-splashscreen
- In your javascript write sth like:
global.lottie.splashscreen
.hide()
.then(() => {})
.catch(() => {});
- The splashscreen gets hidden, but none of
then
orcatch
is processed.
Expected output
The Promise
gets resolved
What do you see instead?
Non resolved Promise
Log file of the issue/error
N/A
Version information
N/A
Please provide any additional information below.
As I did debug, the issue seems to be in the LottieSplashScreen.swift
, where there is no commandDelegate.send
action (check here https://medium.com/modus-create-front-end-development/writing-a-cordova-plugin-in-swift-3-for-ios-e314acf68a47). Unfortunately, I wasn't able to fix it on my own, as I'm not a Swift developer 😿.
I did
commandDelegate!.send(
CDVCommandStatus_OK,
callbackId: command.callbackId
)
but the code didn't compile
Checklist
- If there is a (potential) plugin conflict, I've identified the conflicting plugin
- I have added a valid version output
- I have attached necessary information like a screenshot, example project or videos