Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-12297

Support WKProcessPool for cookie sharing

    Details

      Description

      WKWebView provided by the plugin does not use any WKProcessPool. Using WKProcessPool will help in sharing cookies across WKWebView instances. If the cordova app has a usecase where it creates its own WKWebView instance, for instance, a remote login screen, then it is better that the new WKWebView instance uses the same WKProcessPool.

      In order to make this happen, I propose creating a WKProcessPool factory in this plugin and publish that, so that the cordova app can use it for their WKWebView instances.

      I have a working model in my git branch:
      https://github.com/anandvnath/cordova-plugin-wkwebview-engine

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user anandvnath opened a pull request:

          https://github.com/apache/cordova-plugin-wkwebview-engine/pull/27

          CB-12297 Support WKProcessPool for cookie sharing

              1. Platforms affected

          iOS

              1. What does this PR do?

          Adds a shared WKProcessPool via static factory and use it in the WKWebView created by this plugin. Any WKWebView created by cordova apps can utilize this shared WKProcessPool for enabling cookie sharing.

              1. What testing has been done on this change?

          Added a unit test to check if the shared instance is correctly created. Testing the cookie sharing functionality is hard to do via unit test.

              1. Checklist
          • [/] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
          • [/] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
          • [/] Added automated test coverage as appropriate for this change.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/anandvnath/cordova-plugin-wkwebview-engine master

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/cordova-plugin-wkwebview-engine/pull/27.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #27


          commit 012afe0359bcb66b0221124b82e9f290dc60317e
          Author: anand.v.nath@gmail.com <anand.v.nath@gmail.com>
          Date: 2016-12-23T08:43:22Z

          Added shared WKProcessPool support.

          commit 8d96f76ed56771726342a455136c3d387f4d6f04
          Author: anand.v.nath@gmail.com <anand.v.nath@gmail.com>
          Date: 2016-12-23T09:18:52Z

          README changes and minor correction in where WKProcessPool is added.

          commit 7dbfc32beb749f2d9d5ef6ab922c5dec27c8a2f5
          Author: anand.v.nath@gmail.com <anand.v.nath@gmail.com>
          Date: 2016-12-23T10:04:59Z

          Correct license headers.

          commit b536d8815dc738096d3c58a95d8d1722946cc112
          Author: anand.v.nath@gmail.com <anand.v.nath@gmail.com>
          Date: 2016-12-26T04:41:21Z

          Test case modified.


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user anandvnath opened a pull request: https://github.com/apache/cordova-plugin-wkwebview-engine/pull/27 CB-12297 Support WKProcessPool for cookie sharing Platforms affected iOS What does this PR do? Adds a shared WKProcessPool via static factory and use it in the WKWebView created by this plugin. Any WKWebView created by cordova apps can utilize this shared WKProcessPool for enabling cookie sharing. What testing has been done on this change? Added a unit test to check if the shared instance is correctly created. Testing the cookie sharing functionality is hard to do via unit test. Checklist [/] [Reported an issue] ( http://cordova.apache.org/contribute/issues.html ) in the JIRA database [/] Commit message follows the format: " CB-3232 : (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected. [/] Added automated test coverage as appropriate for this change. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anandvnath/cordova-plugin-wkwebview-engine master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-wkwebview-engine/pull/27.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #27 commit 012afe0359bcb66b0221124b82e9f290dc60317e Author: anand.v.nath@gmail.com <anand.v.nath@gmail.com> Date: 2016-12-23T08:43:22Z Added shared WKProcessPool support. commit 8d96f76ed56771726342a455136c3d387f4d6f04 Author: anand.v.nath@gmail.com <anand.v.nath@gmail.com> Date: 2016-12-23T09:18:52Z README changes and minor correction in where WKProcessPool is added. commit 7dbfc32beb749f2d9d5ef6ab922c5dec27c8a2f5 Author: anand.v.nath@gmail.com <anand.v.nath@gmail.com> Date: 2016-12-23T10:04:59Z Correct license headers. commit b536d8815dc738096d3c58a95d8d1722946cc112 Author: anand.v.nath@gmail.com <anand.v.nath@gmail.com> Date: 2016-12-26T04:41:21Z Test case modified.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user anandvnath commented on the issue:

          https://github.com/apache/cordova-plugin-wkwebview-engine/pull/27

          @shazron Thanks for approving this.

          Appreciate any updates on when you are planning to make this fix available?

          Thanks
          Anand

          Show
          githubbot ASF GitHub Bot added a comment - Github user anandvnath commented on the issue: https://github.com/apache/cordova-plugin-wkwebview-engine/pull/27 @shazron Thanks for approving this. Appreciate any updates on when you are planning to make this fix available? Thanks Anand
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user shazron commented on the issue:

          https://github.com/apache/cordova-plugin-wkwebview-engine/pull/27

          The next release perhaps in the next two weeks since I will be away next week. I'm trying to fix the CI failures for this repo first (they pass when manually run).

          Show
          githubbot ASF GitHub Bot added a comment - Github user shazron commented on the issue: https://github.com/apache/cordova-plugin-wkwebview-engine/pull/27 The next release perhaps in the next two weeks since I will be away next week. I'm trying to fix the CI failures for this repo first (they pass when manually run).
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user shazron commented on the issue:

          https://github.com/apache/cordova-plugin-wkwebview-engine/pull/27

          I've fixed the CI problem and would like this PR to be green before I pull it in. Can you rebase? It should re-test the PR automatically after.

          Show
          githubbot ASF GitHub Bot added a comment - Github user shazron commented on the issue: https://github.com/apache/cordova-plugin-wkwebview-engine/pull/27 I've fixed the CI problem and would like this PR to be green before I pull it in. Can you rebase? It should re-test the PR automatically after.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user anandvnath commented on the issue:

          https://github.com/apache/cordova-plugin-wkwebview-engine/pull/27

          Rebase done, CI is passing.

          Show
          githubbot ASF GitHub Bot added a comment - Github user anandvnath commented on the issue: https://github.com/apache/cordova-plugin-wkwebview-engine/pull/27 Rebase done, CI is passing.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit a16f3f7e255f60d488af8f4868944e663ea34cee in cordova-plugin-wkwebview-engine's branch refs/heads/master from ANAND V NATH
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-wkwebview-engine.git;h=a16f3f7 ]

          CB-12297 Support WKProcessPool for cookie sharing

          This closes #27

          Show
          jira-bot ASF subversion and git services added a comment - Commit a16f3f7e255f60d488af8f4868944e663ea34cee in cordova-plugin-wkwebview-engine's branch refs/heads/master from ANAND V NATH [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-wkwebview-engine.git;h=a16f3f7 ] CB-12297 Support WKProcessPool for cookie sharing This closes #27
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/cordova-plugin-wkwebview-engine/pull/27

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/cordova-plugin-wkwebview-engine/pull/27
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 8a08518593f1fbd80ece0b40122479a79ba7a9b5 in cordova-plugin-wkwebview-engine's branch refs/heads/1.1.x from ANAND V NATH
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-wkwebview-engine.git;h=8a08518 ]

          CB-12297 Support WKProcessPool for cookie sharing

          This closes #27

          Show
          jira-bot ASF subversion and git services added a comment - Commit 8a08518593f1fbd80ece0b40122479a79ba7a9b5 in cordova-plugin-wkwebview-engine's branch refs/heads/1.1.x from ANAND V NATH [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-wkwebview-engine.git;h=8a08518 ] CB-12297 Support WKProcessPool for cookie sharing This closes #27

            People

            • Assignee:
              shazron Shazron Abdullah
              Reporter:
              anand.v.nath@oracle.com Anand V Nath
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 8h
                8h
                Remaining:
                Remaining Estimate - 8h
                8h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development