-
Notifications
You must be signed in to change notification settings - Fork 984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mark the webview as inspectable in iOS 16.4 #1301
Comments
Same issue: Safari inspector does not work any longer since latest macos update (13.3) and ios update (16.4). Safari inspector still works with mobile Safari content. |
It's an intended change from Apple, starting with iOS 16.4, any builds using the 16.4 SDK the webview is no longer inspectable by default and needs the flag. If I recall Apple notes correctly, older devices are inspectable if the build is in debug mode, or builds with an older iOS SDK are inspectable while in debug mode (iOS 16.4 devices will use old behaviour logic if the app was built with an older SDK) The flag will be exposed in 7.0.0 release of cordova-ios via a preference (currently in the PR #1300) In the meantime, building with an older IOS SDK or using an older iOS version should yield inspectable webviews. Alternatively, for testing purposes, you can use the #1300 fork to get access to the
Edit: Misinterpreted the blog, that is for the context of enabling inspection on the Safari side. It's not relevant to the xcode/WkWebView inspectable setting. Ref: https://webkit.org/blog/13936/enabling-the-inspection-of-web-content-in-apps/ |
@breautek Thank you very very much. |
Seems that this has been released as part of cordova-ios v6.3.0 :) |
That is indeed correct. Nik has decided to backport the change to 6.3.0. The backport was originally intended for 6.2.1 but we bumped to 6.3.0 as it was decided to be a feature rather than a bugfix. It can be installed by doing:
|
Hello, |
A common issue is people using the ionic webview, which naturally replaces the cordova webview and it's configurations. I don't believe Ionic maintains their cordova webview plugin anymore as I believe they have moved on from Cordova. So if you use the ionic webview, now might be a good time to remove it. Their last update to the webview was 3 years ago. The cordova webview feature supports schemes so you can configure it to use the same ionic:// scheme as before to avoid an origin change. |
How i can change my setup in order to switch ? I'm in Ionic 5 right now |
If you just simply use the webview without using the ionic framework, then you should be able to just remove the If you use the actual ionic framework, then it may require the ionic webview (I'm not entirely sure, but reasonable to assume that there is a dependency there...). If the ionic framework requires their ionic webview, then I think you have 3 options:
|
Add the following preference to your config file:
and boom it should work |
works, but -- edit |
Bug Report
Problem
Safari Web Inspector doesn't show current iOS app launched in simulator
What is expected to happen?
Be able to use Safari web inspector to debug the app running in iOS Simulator by setting the "isInspectable" webview option to "true" in project configuration.
What does actually happen?
"No inspectable application" displayed instead of the running app in the Safari menu
Don't know how/where to set the "isInspectable" webview option to "true"
Information
Was working fine until the last xcode update.
Turns out that since iOS 16.4, the webview as to be marked as "inspectable" to enable the functionality of web inspection.
See https://webkit.org/blog/13936/enabling-the-inspection-of-web-content-in-apps/ for detailed information.
Also https://developer.apple.com/forums/thread/727049 in Apple developers forum
Command or Code
From xcode, run app in simulator
From Safari, select the ‘Develop’ tab from the menu bar, then 'Simulator'
Environment, Platform, Device
Mac Mini, Mac OS Ventura, iOS 16.4
Version information
xcode 14.3
Cordova Packages:
Project Installed Platforms:
Project Installed Plugins:
Environment:
ios Environment:
Xcode 14.3
Build version 14E222b
Checklist
The text was updated successfully, but these errors were encountered: