Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

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

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2019-08-21T13:44:15.000+0000
Affected Version/sRelease 8.0.2, Release 8.1.0
Fix Version/sRelease 8.1.1
ComponentsiOS
LabelsengSchedule, regression
ReporterSamir Mohammed
AssigneeVijay Singh
Created2019-07-18T10:54:43.000+0000
Updated2019-08-21T13:44:15.000+0000

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*

Create an app with the above test files

Click on the load html button

Should display test0 at the top

Press Log Message

Should log a message

Press Reload Webview

Press Log Message

Should log a message

Press remote load webview

Should see google homepage

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.

Comments

  1. Vijay Singh 2019-07-19

    PR - https://github.com/appcelerator/titanium_mobile/pull/11065
  2. Keerthi Mahalingam 2019-07-26

    FR passed. Waiting for 8.1.0 GA to merge this PR. Also back port PR is needed .
  3. Vijay Singh 2019-07-26

    PR(8_1_X): https://github.com/appcelerator/titanium_mobile/pull/11086
  4. Christopher Williams 2019-08-20

    Merged to master. Waiting on rebuild for 8_1_X
  5. Christopher Williams 2019-08-20

    Merged to 8_1_X
  6. Samir Mohammed 2019-08-21

    *Closing ticket* fix verified in SDK version 8.2.0.v20190820104021, 8.1.1.v20190820143437 and 8.3.0.v20190820103430. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/11065 PR(8_1_X): https://github.com/appcelerator/titanium_mobile/pull/11086

JSON Source