Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9418] MobileWeb: Getting a way to know which is the current domain from where the mobile web is running

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2012-06-15T13:27:55.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsMobileWeb
Labelsn/a
ReporterMauro Parra-Miranda
AssigneeChris Barber
Created2012-06-06T11:14:39.000+0000
Updated2014-06-19T12:44:35.000+0000

Description

Problem Description

Our customer is having different environments where the app is running (Dev, QA, Prod), and would like to do calls via httpclient into the right domain, according to where is it. Currently, there is no way to know where are you running, so you do a call properly to the right domain/server.

Comments

  1. Chris Barber 2012-06-12

    Can't you just do this:
       var domain = Ti.Platform.osname == "mobileweb" ? location.hostname : "";
       
  2. Mauro Parra-Miranda 2012-06-15

    notified the customer about this. Thansk! Mauro
  3. Neeraj Gupta 2012-06-15

    Marking this feature request invalid as there was already a better way to achieve the desired functionality.

JSON Source