确定 Uiwebview 还是直接使用 ios 的 Safari

Determine Uiwebview or just use ios's Safari

是否可以通过 javascript 确定用户使用应用程序 Uiwebview 或仅使用 ios Safari?

来自Apple documentation

You can determine whether a webpage is displaying in standalone mode using the window.navigator.standalone read-only Boolean JavaScript property.

所以你应该检查 window.navigator.standalone 属性:

if (window.navigator.standalone) {
  // standalone app ~ UIWebView
} else {
  // Safari
}