IonicDeploy.info(appId, function (data) { /* ... */ }, function (err) { /* ... */ })
(new URL(location.href)).pathname
Tested on Nexus 9 running Android 7.0
-
deploy_uuid: "cca9d318978b0e8959d83876c8a10ead"
-
pathname: "/data/user/0/io.cordova.hellocordova/app_cca9d318978b0e8959d83876c8a10ead/index.html"
-
deploy_uuid: "cdc35956368f2c97c868f64c759e56de"
-
pathname: "/data/user/0/io.cordova.hellocordova/app_cdc35956368f2c97c868f64c759e56de/index.html"
Tested in iOS Simulator for 10.1
-
deploy_uuid: "6f551a0e86ebc2cdf822405e5f17e9fb"
-
pathname: "/REDACTED_SIMULATOR_PATH/data/Containers/Data/Application/REDACTED_APP_UUID/Library/Application%20Support/6f551a0e86ebc2cdf822405e5f17e9fb/index.html"
-
deploy_uuid: "5af1a24a4f97e87e399c8489bb22ab3a"
-
pathname: "/REDACTED_SIMULATOR_PATH/data/Containers/Data/Application/REDACTED_APP_UUID/Library/Application%20Support/5af1a24a4f97e87e399c8489bb22ab3a/index.html"
-
"deploy_uuid" string value is found precisely as-is within "pathname" string
-
"pathname" string value ends with "DEPLOY_UUID/index.html"
I'm looking into this in the first place because webview apps load from "file:" and seem to have problems with the out-of-the-box configuration for HTML5-based client-side routers:
https://github.com/ReactTraining/react-router/search?q=cordova&type=Issues
https://github.com/angular/angular/search?q=cordova&type=Issues
From these suggestions it looks like hash-based routing is much more likely to function as expected out of the box.
There are other benefits to hash-based routing: http://jamesknelson.com/push-state-vs-hash-based-routing-with-react-js/