Skip to content

Resolve function in exec isn't called after action succeeded or failed (commandDelegate missing) #134

Closed
@mike-czarnota

Description

Bug report

What steps will reproduce the problem?

  1. Use cordova-plugin-lottie-splashscreen
  2. In your javascript write sth like:
global.lottie.splashscreen
  .hide()
  .then(() => {})
  .catch(() => {});
  1. The splashscreen gets hidden, but none of then or catch 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

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions