Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-20018

iOS: Ti.App.fireEvent from webView is not working

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Release 5.0.2
    • Fix Version/s: Release 5.2.0
    • Component/s: iOS
    • Labels:
    • Environment:

      dev platform is MAC El Capitan
      IOS 9.1
      SDK version 5.0.2

    • Story Points:
      3
    • Sprint:
      2015 Sprint 24 SDK

      Description

      The example from your site that I am trying to run is not functioning in IOS 9.1. I am interested in getting the event fired from the WebView to be caught in the application. This works in Android but not in IOS. I have tried it WillHandleTouches set to False.

      <html>
      	<head>
      		<script>
      			Ti.App.addEventListener("app:fromTitanium", function(e) {
      	        	alert(e.message);
      	      	});
      		</script>
      	</head>
      	<body>
      		<button onclick="Ti.App.fireEvent('app:fromWebView', { message: 'event fired from WebView, handled in Titanium' });">fromWebView</button>
      	</body>
      </html>
       
      var win = Ti.UI.createWindow();
      var webview = Ti.UI.createWebView({
      	url: 'logging.html'
      });
      var button = Ti.UI.createButton({
      	title: 'fromTitanium',
      	height: '50dp',
      	width: '130dp'
      });
      button.addEventListener('click', function(e) {
      	Ti.App.fireEvent('app:fromTitanium', { message: 'event fired from Titanium, handled in WebView' });
      });
      Ti.App.addEventListener('app:fromWebView', function(e) {
      	alert(e.message);
      });
      win.add(webview);
      win.add(button);
      win.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ssombhatla Srikanth Sombhatla (Inactive)
                Reporter:
                rramesh1 Ramesh RAMAMURTHY
                Reviewer:
                Hans Knöchel
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-20700
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code