Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26903] iOS: Webview Cookies is not working with 8.0.0.GA

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2019-04-11T12:10:56.000+0000
Affected Version/sRelease 8.0.0
Fix Version/sRelease 8.0.1
ComponentsiOS
LabelsengSchedule, regression
ReporterFazlul Haque
AssigneeVijay Singh
Created2019-03-16T09:37:24.000+0000
Updated2019-04-11T12:10:56.000+0000

Description

Hello, Webview with cookies is working just fine with 7.5.1.GA but it's not working with 8.0.0.GA. *Testing Environment:* Appcelerator Command-Line Interface, version 7.0.10 Operating System Name = Mac OS X Version = 10.14 Architecture = 64bit # CPUs = 4 Memory = 8589934592 Node.js Node.js Version = 8.9.1 npm Version = 5.5.1 Titanium CLI CLI Version = 5.1.1 Titanium SDK SDK Version = 8.0.0.GA, 7.5.1.GA *Test Code One:*
var win = Ti.UI.createWindow({
	layout : 'vertical'
});

var testUrl = "https://jwogan5.github.io/";
var testDomain = "jwogan5.github.io";

Titanium.Network.addHTTPCookie(Titanium.Network.createCookie({
	domain : testDomain,
	name : 'testCookie',
	path : '/',
	value : 'works'
}));
var testWebView = Ti.UI.createWebView({
	url : testUrl,
	width : Ti.UI.FILL,
	top : 0,
	cacheMode : false,
	enableZoomControls : false,
	bottom : 0
});
win.add(testWebView);
win.open(); 
*Test Code Two(ti.wkwebview):*
var win = Ti.UI.createWindow({
	layout : 'vertical'
});

var WK = require('ti.wkwebview');
var testUrl = "https://jwogan5.github.io/";
var testDomain = "jwogan5.github.io";

Titanium.Network.addHTTPCookie(Titanium.Network.createCookie({
	domain : testDomain,
	name : 'testCookie',
	path : '/',
	value : 'works'
}));
var testWebView = WK.createWebView({
	url : testUrl,
	width : Ti.UI.FILL,
	top : 0,
	cacheMode : false,
	enableZoomControls : false,
	bottom : 0
});
win.add(testWebView);
win.open();
*Steps to reproduce the issue:* 1. Just add the app.js file on your project 2. Run using the 7.5.1.GA and the webview is added to the controller it will print out the cookie (testCookie=works). 3. If you run the exact same code with 8.0.0.GA when the webview loads it will alert an empty value. This shows the 8.0.0 does not read the cookie value. Note: The only difference between 7.5.1 and 8.0.0 is that 8.0.0 now uses WKWebview instead of UIWebview.

Attachments

FileDateSize
Screenshot-7.5.1.GA.png2019-03-16T09:37:15.000+0000208369

Comments

  1. Vijay Singh 2019-03-19

    PR (master) - https://github.com/appcelerator/titanium_mobile/pull/10785 PR (8_0_X) - https://github.com/appcelerator/titanium_mobile/pull/10786
  2. Christopher Williams 2019-04-08

  3. Samir Mohammed 2019-04-11

    *Closing ticket*, fix verified in SDK Version 8.1.0.v20190410132858 and SDK Version 8.0.1.v20190408125832 Test and other information can be found at: PR (master) - https://github.com/appcelerator/titanium_mobile/pull/10785 PR (8_0_X) - https://github.com/appcelerator/titanium_mobile/pull/10786

JSON Source