Skip to content
This repository was archived by the owner on Aug 28, 2023. It is now read-only.
This repository was archived by the owner on Aug 28, 2023. It is now read-only.

Proper way to prevent ACPCore.start() more than once #40

@booker-dragon

Description

@booker-dragon

Expected Behaviour

The app should not do ACPCore.start() again after reload by getting a status value from native code

Actual Behaviour

No API to get the status of SDK, whether it is properly started or not

Reproduce Scenario (including but not limited to)

Have SDK initialization on app start and some callback method after we await for the result from ACPCore.start()

Steps to Reproduce

Load the app and SDK should start properly, do a reload (CMD + R / R + R)

Platform and Version

React Native

Sample Code that illustrates the problem

async componentDidMount() {
    await ACPCore.start()
    // below line will never execute after a reload as ACPCore.start() never resolve when it is called more than once
    doSomethingHere()
}

Logs taken while reproducing problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions