[iOS] possible bug with javascriptHandlers on iOS

Andre Garzia andre at andregarzia.com
Mon Jul 12 10:54:37 EDT 2021

I started a thread today about a possible bug with using “put without a target” on iOS. That bug appeared while I was trying to debug a problem with a mobile app we’re developing. It is an odd bug, we have it working on macOS Desktop inside the IDE and on Android, but it fails on iOS. The problem is a simple single like handler that executes something alone the lines of:

  do “liveCode.myapp_RecordScrollPosition(window.scrollY)” in widget “browser”

The handler is not named that of course but you get the idea. The “myapp_RecordScrollPosition” is in the message path, and is added to the “javascriptHandlers” property of the widget. The proof that the code is sound, is that it works on Android in a real device, and on desktop inside the IDE. 

I don’t understand why this code fails on iOS (both in the Simulator and on an iPhone 12 mini). 

Trying to debug this, I attempted to write to the console, so that I could see if the code is passing through the routines it should. I don’t have a business license, so I can use the remote debugger. I need to use old “put without target” calls. And then, they don’t work either.

I’ve already spent basically two days trying to debug why this fails. It fails silently. There is no error on LC side. I suspect it is something on the iOS WKWebView (or whatever is being used) side.

Anyone successfully calling LC from a browser widget on 9.6.3-rc-1 on iOS ?

Puzzled Regards

More information about the use-livecode mailing list