Hello again –
Thanks for the replies. However, I’m afraid I’m pretty confused, and not having much luck.
I’m confused about the difference between the “www” platform and the “browser” platform. I’ve tried searching, but these are hard terms to Google. Any hints? Maybe “www” is for regular browsers (e.g., Chrome), and “browser” is for the WebView (Android) / UIWebView (iOS) wrapper that serves as the host environment for apps which have been installed to a device’s home screen? Or maybe I’m totally on the wrong track?
ionic cordova run browser. This builds my app and exposes it at localhost:8000. I’m then able to pull up my app in Safari on an iPad on the same network, by navigating to http://184.108.40.206:8000. But when the app calls Camera.getPicture(), I get an alert that says: “Browser does not support camera :(” (Yes, the frowny face is part of the alert.) I tried searching for this phrase, and there’s almost nothing on Google.
Perhaps loading the app in Safari isn’t enough, and I need to actually install it on my home screen and run it from there? The problem is, I’ve installed and uninstalled the app in the past, and Safari no longer prompts me to install it. If I pick “add to home screen” from the bookmark menu, then I just get a bookmark which opens in Safari – which puts me right back where I started. How can I force Safari to display the install prompt?
ETA: I just realized that my app must be served via HTTPS before the install banner will display, but I’m browsing http://220.127.116.11:8000. So that probably explains it. But, Ionic’s development server doesn’t seem to support HTTPS. Do I have to build the app and put it on an SSL-enabled server before I can test the real-world experience on the iPad? That’s gonna be a serious headache for development.
ETA: Well, I went ahead and put it on an SSL-enabled server. Browsing to that URL simply displays a Cordova logo, with the text “Apache Cordova – Connecting to Device” below. It just stays there forever.
ETA: I traced the “Browser does not support camera” error to this file in cordova-plugin-camera. It’s failing to find navigator.getUserMedia, which is deprecated. So, it seems that – although there may have been some camera support in the browser in the past – this is no longer the case.
If that’s accurate, then I’m looking at a major change of plans for my app (it’ll have to be native instead of a PWA). Argh.