Skip to content
Discussion options

You must be logged in to vote

From native you can inject JS into the web-view, which then is executed there.

// just an example
func showSplashScreen(){
        self.bridge.getWebView()?.evaluateJavaScript("Capacitor.Plugins.SplashScreen.show({showDuration: 4000, autoHide: true});", completionHandler: nil)
}

I think it should then be possible to gather the data there and return them, such that the completion handler fires. Take into consideration that this is an async operation...

And other way could be to provide something like a DataSink in your plugin API, such that you can gather the data and then send it to the DataSink...


func triggerDataLoad(){       self.bridge.getWebView()?.evaluateJavaScript("Capacitor.Plu…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sundeepgupta
Comment options

Answer selected by sundeepgupta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants