I spent the rest of the day scratching my head as to what was different between your test case and my app and finally it dawned on me that this project uses UIWebView, not WKWebView. It's a legacy app that we're busily rewriting, but we need to keep going until the new capacitor version is at feature parity.
Here's how you can reproduce the issue. It might be possible with Capacitor to change the WebView, but I'm more familiar with Cordova. I've gone back to ionic1 for simplicity, but I believe this issue will occur on any version of ionic where you are using UIWebView.
ionic start inspect-dev-test tabs --type=ionic1 --cordova
cd inspect-dev-test
Add the following to packages.json because ionic1 uses gulp v3
"scripts": {
"preinstall": "npx npm-force-resolutions"
},
"resolutions": {
"graceful-fs": "^4.2.4"
},
``
Add the following to config.xml to force UIWebView
Add the IOS Platform, then run npm install to apply graceful-fs, then prepare for Xcode
Now open platforms/ios/inspect-dev-test.xcworkspace in xcode
**Actual:**
There's nothing in the Elements tab and nothing in the Console.
**Expected:**
Elements tool to work
I spent the rest of the day scratching my head as to what was different between your test case and my app and finally it dawned on me that this project uses UIWebView, not WKWebView. It's a legacy app that we're busily rewriting, but we need to keep going until the new capacitor version is at feature parity.
Here's how you can reproduce the issue. It might be possible with Capacitor to change the WebView, but I'm more familiar with Cordova. I've gone back to ionic1 for simplicity, but I believe this issue will occur on any version of ionic where you are using UIWebView.
Install Ionic/Cordova globals
Start Ionic V1 Project
Add the following to packages.json because ionic1 uses gulp v3
ionic cordova platform add ios npm install ionic cordova prepare ios