NappUI icon indicating copy to clipboard operation
NappUI copied to clipboard

Local html WebView events not firing with Titanium 3.2.3

Open dylan-oxide opened this issue 10 years ago • 9 comments

I have been trying to get bidirectional communication between javascript in a local WebView and Titanium. I was using the examples on http://docs.appcelerator.com/titanium/latest/#!/guide/Communication_Between_WebViews_and_Titanium, however it wasn't firing any events (except [DEBUG] : Firing app event: app:fromTitanium)

Realised that by disabling napp.ui it worked correctly.

I can see in the docs that you are extending webviews to provide this functionality, is it necessary anymore?

Using: dk.napp.ui v 1.2.3 Titanium sdk 3.2.3.GA Ti.Alloy 1.0 iOS 10.9.4 Tested on iOS 7.1 Emulator and iOS 6 on iPhone 3G

dylan-oxide avatar Jul 14 '14 00:07 dylan-oxide

sorry, im not sure.. that feature was a pull request

did it work for you in regular titanium sdk ?

viezel avatar Jul 14 '14 06:07 viezel

Yes I created a new project and used the example code, it works fine. When I add the module in, it breaks :(

dylan-oxide avatar Jul 14 '14 07:07 dylan-oxide

hmm.. not good.

viezel avatar Jul 14 '14 09:07 viezel

has anyone found a work around for this? I'm experiencing the same exact problem. Napp UI is a great module!

Classic SDK 3.3.0

mrtomnguyen avatar Sep 16 '14 19:09 mrtomnguyen

Hey Viezel, is there any way we can remove the Webview feature part of the code?

mrtomnguyen avatar Sep 16 '14 19:09 mrtomnguyen

you can remove the class and recompile the module.

viezel avatar Sep 17 '14 07:09 viezel

OK, removed the references to the Webviews in Xcode fixed it! hope this helps.

mrtomnguyen avatar Sep 17 '14 18:09 mrtomnguyen

Suggestion: webview.fireEvent('updateview',{});

If I use evalJS then the caling function must be in global namespace. With the triggering by fireEvent I can listen on it deep in my logic …

AppWerft avatar Oct 28 '14 07:10 AppWerft

I've spend like 2 hours before finding out that NappUI breaks eventListeners in webViews...

e-m-s-y avatar Apr 09 '15 12:04 e-m-s-y