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

iOS: Multiple Webviews with same local URL does not inject Titanium XHR bridge properly

    Details

    • Story Points:
      2
    • Sprint:
      2016 Sprint 26 SDK

      Description

      Yes, I know that this is an extreme case, but it happened to us (me and @Jei).

      When you try to load multiple (1+) webviews at the same time with same local URL, the listeners provided by the XHR bridge (ti-injection) works only for the first one instantiated.

      I debugged for hours, and finally realized why this happens.

      The LocalProtocolHandler class implemented in the Webview communication receives only the first URL to load; and this causes only one injection with the same Ti.pageToken.

      In this screenshot you can see that the generated pageToken is the same:

      The solution would be to inject a new header that has a unique counter thats incremented every time a new local URL is set.

        Attachments

          Activity

            People

            • Assignee:
              hknoechel Hans Knöchel
              Reporter:
              kopiro Flavio De Stefano
              Tester:
              Lee Morris (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code