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

[iOS] Titanium APIs are able to be used for remote webviews

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Release 8.0.2, Release 8.1.0
    • Fix Version/s: Release 8.1.1
    • Component/s: iOS
    • Environment:

      iPhone 6s 12.2
      Android pixel XL 7.1.1. Emulator
      MacOS Mojave version 10.14.4
      Xcode 11 Beta 3
      Node.js ^8.12.0
      "NPM":"4.2.13","CLI":"7.1.0-master.24"
      SDK 8.0.2.GA
      SDK 8.1.0.v20190716120350

    • Story Points:
      5
    • Sprint:
      2019 Sprint 17

      Description

      When using a remote webview I am still able to log messages to the console (on Android I am unable to log messages when using a webview).

      app.js

      var window = Ti.UI.createWindow({
       
      });
       
          var webview = Ti.UI.createWebView({
              top: 0,
              width: '100%',
              height: 150
          });
       
          var loadButton = Ti.UI.createButton({
              title: "load html",
              left: 0,
              top: 160,
              width: 150,
              height: 100
          });
       
          var logButton = Ti.UI.createButton({
              title: "Log Message",
              right: 0,
              top: 160,
              width: 150,
              height: 100
          });
       
          var reloadButton = Ti.UI.createButton({
              title: "reload webview",
              left: 0,
              top: 270,
              width: 150,
              height: 100
          });
       
          var remoteButton = Ti.UI.createButton({
              title: "remote load webview",
              right: 0,
              top: 270,
              width: 150,
              height: 100
          });
       
          remoteButton.addEventListener("click", function() {
              webview.url = "http://www.google.com";
       
          });
       
          loadButton.addEventListener("click", function() {
              webview.url = "Wv.html";
       
          });
       
          logButton.addEventListener("click", function() {
              webview.evalJS("Ti.API.info(\"-------------------------------hello\")");
       
          });
       
          reloadButton.addEventListener("click", function() {
              webview.reload();
          });
       
          window.add(webview);
          window.add(remoteButton);
          window.add(loadButton);
          window.add(logButton);
          window.add(reloadButton);
       
          window.open()
      

      Wv.html

      <html>
      	<body>
      		<table>
      			<tr>
      				<td id="test">test0</td>
      			</tr>
      		</table>
      	</body>
      </html>
      

      Test Steps

      1. Create an app with the above test files
      2. Click on the load html button
      3. Should display test0 at the top
      4. Press Log Message
      5. Should log a message
      6. Press Reload Webview
      7. Press Log Message
      8. Should log a message
      9. Press remote load webview
      10. Should see google homepage
      11. Press Log Message

      Expected result
      Log message should not be logged when using a remote webview.

      Actual result
      Log message is still logged when using a remote webview.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vijaysingh Vijay Singh
                Reporter:
                smohammed Samir Mohammed
                Reviewer:
                Jan Vennemann
                Tester:
                Keerthi Mahalingam (Inactive)
              • Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration