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

iOS: Webview Cookies is not working with 8.0.0.GA

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: Release 8.0.0
    • Fix Version/s: Release 8.0.1
    • Component/s: iOS
    • Environment:

      iOS, WebView, Titanium.Network.createCookie

    • Story Points:
      5
    • Sprint:
      2019 Sprint 7, 2019 Sprint 8

      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

      1. 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

          Issue Links

            Activity

              People

              • Assignee:
                vijaysingh Vijay Singh
                Reporter:
                fhaque Fazlul Haque (Inactive)
                Reviewer:
                Jan Vennemann
                Tester:
                Samir Mohammed
              • Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration