FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

NativeScript IOS Apps Broadcast as iPad in UserAgent String EVEN on iPhone Using http.getJSON() · Issue #2714 · NativeScript/NativeScript · GitHub

NativeScript IOS Apps Broadcast as iPad in UserAgent String EVEN on iPhone Using http.getJSON() #2714

Description

When using http.getJSON() in a mobile app on IOS, the app sends a UserAgent of "iPad", even from an iPhone.

Which platform(s) does your issue occur on?

iOS

Please provide the following version numbers that your issue occurs with:

  • CLI: 2.1.1
  • Cross-platform modules: 2.2.0
  • Runtime(s): 2.2.1
  • Plugin(s):
    "dependencies": {
    "moment": "^2.14.1",
    "nativescript-collapsing-header": "^2.0.0",
    "nativescript-floatingactionbutton": "^2.2.4",
    "nativescript-fresco": "^1.0.5",
    "nativescript-google-analytics": "^0.2.9",
    "nativescript-pulltorefresh": "^1.1.6",
    "nativescript-snackbar": "^1.1.2",
    "nativescript-social-share": "^1.3.0",
    "tns-core-modules": "^2.2.1"
    }

Please tell us how to recreate the issue in as much detail as possible.

RUN:
http.getJSON("http://exmplesite.com") in the app code, run it on an iPhone device or IOS iPHone simulator.
Look at the access log of exmplesite.com, you'll see the UserAgent String looks something like:
"Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25""Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25"

Where "iPad" is shown, this should be "iPhone". (When loading a webview, the user agent string is correct from an iPhone, so it appears the issue is NOT happen on a webview, but IS happening using the http.getJSON() function.)

THANKS!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL