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

iOS: "original" user agent needs to be overridable

VotersWatch issueWatchersLinkUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Master
    • 3.5.0
    • cordova-ios

    Description

      Cordova's user agent management for iOS employs a scheme of setting a baseline "original" user agent, which by default conforms to the standard user agent a UIWebView would expose, and then optionally appending CDVViewController-specific data to it in the appropriate use cases, to manage whitelisting.

      Cordova shouldn't really care too much about the data that the original user agent exposes. I.e. it should be able to be overridden by a consumer, so that the consumer can supply its own user agent data. This is not technically possible with the current implementation of the CDVUserAgentUtil class, since it does not exist as a member of any instance class; it's truly static/global, so inheritance doesn't come into play.

      Even if an instance of CDVuserAgentUtil could be made a property of CDVViewController, or something else, it would be kind of weird for a consumer to inherit from what's essentially a static class, just to configure their own user agent data.

      There should be another mechanism for users to override the original user agent configuration.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            shazron Shazron Abdullah
            khawkins@salesforce.com Kevin Hawkins
            Votes:
            2 Vote for this issue
            Watchers:
            7 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

                Slack

                  Issue deployment