iOS 16.4 ASWebAuthenticationSession's webview can not debug in safari web inspector

I'm using Xcode 14.2 to build an app that runs on iOS 16.4. There is no webView.isInspectable property in this version. When my app presents a webview, it is inspectable in Safari -> develop, which is nice.

However, when starting a ASWebAuthenticationSession , Safari -> develop shows "no inspectable applications". It was inspectable on iOS 16.1 but not iOS 16.4.

How to solve this?

  • Safari Developer Tools
  • Authentication Services

Accepted Reply

I filed a bug to Apple and they fixed this issue in iOS 17 beta 7 (Build: 21A5319a). So update to the latest iOS 17, and the problem is resolved.

@frontenduniverse did you ever resolve this? I have the same issue

Got the same issue with 16.4 version. How to resolve this?

@frontenduniverse @cullima Hi. Did you resolve this issue?

no inspectable applications safari ios 16.4

Debug on iOS Simulator using Safari show "no inspectable applications"

I need to use debug on my ios simulator but safari menu shows “no inspectable applications”.

  • IOS Simulator: iPhone 14 Pro - iOS 16.4
  • Safari: 16.4
  • Safari Technology Preview 16.4

I reed that on ios 16.4 I must enable “inspection” flag

This solution not works for me: iOS 16.4 webview can not debug in … | Apple Developer Forums

Please help me

You need to be using safari tech preview if you aren’t using already.

I already installed Safari Tech preview but “no inspectable applications” shown

Enabling the Inspection of Web Content in Apps

Mar 20, 2023

by Patrick Angle

Web Inspector is a powerful tool that allows you to debug the layout of web pages, step through JavaScript, read messages logged to the console, and more. In Safari on macOS, you can use Web Inspector to inspect web pages, extensions, and service workers. iOS and iPadOS allow inspection of the same content as macOS, with the addition of Home Screen web apps.

Web content and JavaScript is used for various purposes in apps, from providing UI from a webpage to enabling apps to be scriptable. Previously, Web Inspector supported inspecting developer-provisioned apps built directly from Xcode for local development, meaning developers could debug this content so long as the app is installed for development. However, released versions of apps had no way to inspect dynamic web content or scripts, leaving developers and users to have to resort to more complicated workflows to get information that would otherwise be made available by Web Inspector. Now, this same functionality is available through an API on WKWebView and JSContext .

How do I enable inspection?

Across all platforms supporting WKWebView or JSContext , a new property is available called isInspectable ( inspectable in Objective-C). It defaults to false , and you can set it to true to opt-in to content being inspectable. This decision is made for each individual WKWebView and JSContext to prevent unintentionally making it enabled for a view or context you don’t intend to be inspectable. So, for example, to make a WKWebView inspectable , you would:

Objective-C

For JSContext , matching API is available , with the addition of C API for developers using JSGlobalContextRef :

The inspectable property can be changed at any point during the lifetime of your WKWebView or JSContext . Disabling inspection while Web Inspector actively inspects the content will automatically close Web Inspector, and no further information about the content will be available.

Once you’ve enabled inspection for your app, you can inspect it from Safari’s Develop menu in the submenu for either your current computer or an attached device. For iOS and iPadOS, you must also have enabled Web Inspector in the Settings app under Safari > Advanced > Web Inspector . You do not need to enable Web Inspector for simulators; it is always enabled. Learn more about enabling Web Inspector…

Develop Menu > Patrick's iPhone > Example App

When should I consider making content inspectable?

A common situation in which you may want the content of WKWebView to be inspectable is in an in-app web browser. The browser shows ordinary web content that would be inspectable when loaded in Safari. It can be beneficial both for the app developer, as well as web authors, to be able to inspect content in these views, as the size of the view may not match that of Safari’s, or the app developer may be injecting script into the view to provide integration with their app.

Web content is often dynamic, delivered by a server—not in the app—and easily changed over time. Unfortunately, not all issues can or will get debugged by folks with access to a developer-provisioned copy of your app.

JSContext can also enable scripting in an app whereby the customer provides the scripts to augment the app. Without the ability for a release version of your app to adopt inspectability, your customers may have no way to debug the scripts they have written. It makes it harder for customers to use this functionality of your app.

Provide readable names for inspectable JSContext s

Unlike WKWebView , which automatically gets a name based on the page currently loaded in the view, every JSContext with inspectable enabled will be listed as JSContext in Safari’s Develop menu. We recommend providing a unique, human-readable name for each inspectable JSContext to make it easier for you and your customers to determine what the JSContext represents. For example, if your app runs different pieces of JavaScript on behalf of the user, you should give each JSContext a name based on what runs inside the context.

API is available to set the user-visible name of a JSContext :

Working with older versions of macOS and iOS

For apps linked against an SDK before macOS 13.3 and iOS 16.4 WKWebView s and JSContext s will continue to follow the previous behavior of always being inspectable when built for debugging from Xcode.

Apps that support older versions of macOS and iOS while linked against the most recent SDK will not get the previous behavior of all content being inspectable in debug builds to avoid confusion about what will and will not be inspectable by customers. Apps targeting older OS versions but linking against the new SDK can use this new API conditionally on OS versions that support it. To conditionally guard usage of the API:

You can learn more about guarding usage of new API on developer.apple.com .

As you explore this new API, please help us by providing feedback if you encounter problems. For issues using this new API, please file feedback from your Mac, iPhone, or iPad. Feedback Assistant will collect the information needed to help us understand what’s happening. For any issues you may experience with Web Inspector itself once inspecting your app’s content, please file a bug on bugs.webkit.org .

Also, we love hearing from you. You can find us on Mastodon at @[email protected], @[email protected] , and @[email protected] .

iOS 16.4 adds new capabilities for web apps on iPhone and iPad, including access to push notifications

Avatar for Benjamin Mayo

Apple has just released the first beta of iOS 16.4 , including several major new features for web-apps thanks to policy updates and new features in the WebKit engine.

As detailed on the WebKit blog , Home Screen web apps have access to push notifications via the HTML5 standard Web Push API, including badges, for the first time. Access to the Apple push notification service was previously only available to App Store apps.

Unlike Safari on desktop, any website you browse in iOS 16.4 mobile Safari will not be able to request web push permissions. Apple is limiting the feature to web apps added to your Home Screen (create a shortcut for a web page using the Add to Homescreen button in the share sheet, which appear as app icons in your app grid).

Of course, every web app will also need permission to send notification alerts, just like native apps. Once set up, web app push notifications can also integrate with the Focus system. If you add the same web app to multiple devices, their Focus state will stay in sync for all of them.

Another related change is third-party browsers are now able to show user interface for users to add a website to their home screen, via the standard system share sheet. Home Screen web app shortcuts will also launch in the user’s default third party app now, not just Safari.

The design of fallback web app shortcut icons is also changing starting with iOS 16.4. Previously, iOS would use a mini screenshot of the web page as the icon, if the website publisher does not supply an explicit iOS-sized icon. The new design depicts a simple monogram placeholder icon, using the first letter of the website’s name.

Alongside Web Push, WebKit gains other new web API in 16.4 that will also help developers make better web apps. That includes support for making screen wake assertions, adopting the modern standards-based device orientation API, better access to codecs for video processing and more.

FTC: We use income earning auto affiliate links. More.

no inspectable applications safari ios 16.4

Check out 9to5Mac on YouTube for more Apple news:

iOS 16

Benjamin develops iOS apps professionally and covers Apple news and rumors for 9to5Mac. Listen to Benjamin, every week, on the Happy Hour podcast. Check out his personal blog . Message Benjamin over email or Twitter .

Benjamin Mayo's favorite gear

Philips Hue Lights

Philips Hue Lights

The easiest way to get into HomeKit and Apple smart home tech. Great for gifts.

iPhone Wireless Charger

iPhone Wireless Charger

Inexpensive, fast, wireless charger for iPhone.

no inspectable applications safari ios 16.4

Manage push notifications

no inspectable applications safari ios 16.4

I can't get to WebView on iOS 16.4

Hi everyone,

I have the following problem. I want to access a WebView in iOS (in app browser). A month ago, everything was working. I could find the context and switch. Now the whole thing does not work anymore. I can’t switch a context anymore. The output of the existing contexts shows that Appium does not find any WebView anymore. Is anyone else experiencing this? I have already tried the following:

  • Project to the state where it was working
  • xcuitest driver to the state the project was working with. Both make no difference.

Or does it have something to do with the latest security updates from Apple? The device on which the entire thing is running is up-to-date with the updates.

I would be very happy if someone could help me.

first test access to webView using Safari browser.

example: e.g. https://www.browserstack.com/guide/how-to-debug-on-iphone

MicrosoftTeams-image%20(91)

So only your app dev can help and open webView.

@Aleksei it’s not about devs, I have the same problem on my app. All is allowed for me and before I used webviews in app without any problems and I was able to see WebView when used getContextList(), now I see ONLY ``` { “id”: “NATIVE_APP” }

if you cant see WebView with Safari browser Appium cant also. no magic. Appium uses same as native XCUItest.

@Vladyslav_Bilenko I think I found the issue. At least for my problem. Did you upgrade your device to iOS 16.4 ? Because with this update, an internal variable isInspectable from the WebView was set to false as default. This makes the WebView not inspectable if this is not set to true. Therefor it is not an issue of appium , i tried it with an older iOs Version and everything work as before, while on the device with the newest iOS Version it did not.

maybe just needed again enable automation after update?

So to make it workable you suggest to use other ios version than 16.4? Or for 16.4 version you have some solution?

Not necessarily. It depends on which WebView you are using. If you use it directly from apple, then there is the possibility for the devs to access the porperty is Inspectable ( https://developer.apple.com/documentation/webkit/wkwebview/4111163-inspectable/ ) and set it to True ( https://webkit.org/blog/13936/enabling-the-inspection-of-web-content-in-apps/ ). Then it should work again. If you use UniWebView like us, then there is no solution. I have made them aware of the problem, and they will take care of it in a release.

thank you! This worked for me.

Cordova iOS Simulator Safari Web Inspector

How do I see the web view within Safari Web Inspector when running Cordova iOS ( meteor run ios ) app from Simulator? So far I have added the preference:

…but still when I try to check in Safari - No inspectable applications.

Screenshot 2024-01-11 at 14.56.54

Did you do this: How to Inspect Element on iPhone

I have web inspector showing for physical device and it’s working ok, it is just for simulator it does not show. I have read multiple comments about Cordova showing and not showing it in some of its versions and distributions, and iOS version 16.4 popped up multiple times as well as suggestion to use the preference.

So what you’re saying is that you can not show the inspector for the simulator unless you use SauceLabs? Would be very unfortunate…

There was an issue on cordova where the webview wasn’t inspectable. It’s related to this issue here: Mark the webview as inspectable in iOS 16.4 · Issue #1301 · apache/cordova-ios · GitHub .

If you are using Meteor 2.13 you will need to update to 2.14 to be able to inspect with safari ( cordova-ios was update for this version, which includes the fix for this). Just a note is that cordova on 2.14 is also broken, so you will need to apply the workaround described on this issue: `GCDWebServer` missing in `cordova-plugin-meteor-webapp` · Issue #12946 · meteor/meteor · GitHub if you decide to update.

However, if you don’t want to update the meteor version, you can edit the generated xcode project and add the lines of code from this PR Set webView.inspectable to true for debug builds on iOS >= 16.4 by BBosman · Pull Request #1300 · apache/cordova-ios · GitHub to the CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m file.

:vulcan_salute:

@matheusccastro The second PR link is duplicate of the first link btw, could you please update? And also, would you be so kind to explain how do I “pin the the plugin version to 2.0.0 on the cordova-plugins file” for the 2.14 solution?

:slight_smile:

To pin the plugin version, you can either run meteor add cordova:[email protected] or add [email protected] manually to your cordova-plugins file.

:tada:

Navigation Menu

Search code, repositories, users, issues, pull requests..., provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

  • Notifications

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

Debugging JSContext in safari is not enabled for iOS >= 16.4 #39488

@jefflewis

jefflewis commented Sep 16, 2023 • edited

@jefflewis

jefflewis commented Sep 16, 2023

Sorry, something went wrong.

@NickGerleman

NickGerleman commented Sep 16, 2023

  • 🎉 3 reactions

@Saadnajmi

Saadnajmi commented Sep 16, 2023

  • 🎉 2 reactions

Saadnajmi commented Sep 17, 2023

  • ❤️ 1 reaction

jefflewis commented Sep 18, 2023

  • ❤️ 2 reactions

Saadnajmi commented Sep 18, 2023

  • 👍 1 reaction

Saadnajmi commented Sep 20, 2023

@NickGerleman

No branches or pull requests

@NickGerleman

IMAGES

  1. iOS 16.4 WebDebugging WKWebView.isInspectable · Issue #1629 · pichillilorenzo/flutter

    no inspectable applications safari ios 16.4

  2. Pin on idevice

    no inspectable applications safari ios 16.4

  3. Reverse image search iphone safari

    no inspectable applications safari ios 16.4

  4. Safari iOS 14 Guide: Privacy Report, Built-In Translation, Compromised Password Alerts and More

    no inspectable applications safari ios 16.4

  5. How To Fix Safari Issues on iOS 15

    no inspectable applications safari ios 16.4

  6. iOS 15 Safari Guide: Tabs, Extensions, Search Bar, and Other Changes

    no inspectable applications safari ios 16.4

VIDEO

  1. IOS 16 How Do i Fix invalid Address In Safari

  2. How to easily download images from safari (IOS)

  3. How To Turn Incognito On Safari Private Mode on iPhone

  4. L'application FullScreen For Safari sur votre iPod Touch ou iPhone Jailbreaké

  5. How to Find Safari Downloads in iPhone

  6. How to Clear Safari History on iPhone or iPad

COMMENTS

  1. iOS 16.4 webview can not debug in …

    version: iOS 16.4(20E5239a) both on my iphone and Simulator,Safari -> develop shows "no inspectable applications" Safari Safari Developer Tools Post ... Made the careless mistake of updating to iOS 16.4, and now our Capacitor application doesn't appear in Safari debug. I hope this gets solved quickly! Posted by jlavch. Copy to clipboard ...

  2. Why Safari shows "No Inspectable Applications" during remote debugging

    I had the same issue eventually I understand that the problem is with the Xcode settings. To solve this issue: Enable Safari Debug. First of all verify that on the device you have enabled the Safari debugger (on the device go to: Settings >> Safari >> Advanced >> Enable Debug; or iOS 9+ turn on: Settings >> Safari >> Advanced >> Web Inspector).If you've done this you will see your device in ...

  3. Mark the webview as inspectable in iOS 16.4 #1301

    edited. 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. In the meantime, building with an older IOS SDK or using an older iOS version should yield inspectable webviews.

  4. Enabling inspecting content in your apps

    Working with older versions of macOS and iOS. For apps linked against an SDK before macOS 13.3 and iOS 16.4, WKWeb Views and JSContexts will continue to follow the previous behavior of always being inspectable when built for debugging from Xcode. Apps that support older versions of macOS and iOS while linked against the most recent SDK will not get the previous behavior of all content being ...

  5. WebKit Features in Safari 16.4

    If you'd like to try them out, you can enable them in the Settings app on iOS and iPadOS 16.4 via Safari → Advanced → Experimental Features → Screen Orientation API (Locking / Unlocking). Screen Wake Lock API. The Screen Wake Lock API provides a mechanism to prevent devices from dimming or locking the screen. The API is useful for any ...

  6. Safari Web Inspector stopped working on latest iOS for WebKit apps

    Using Safari Web Inspector on a WebKit based app stopped working on iOS 16.4.. This was properly working before. More specifically, using the iOS Simulator or a real device, debugging a WebKit based app and from Safari on macOS accessing the Develop to inspect the app.. No difference at all if it is the Simulator or a real device; none seem to work, but inspecting iOS-Safari from macOS-Safari ...

  7. Inspection of Web Content not working with iOS 16.4+ #2914

    AwesomeAndrewMK changed the title iOS 16.4+ WebView page is not inspectable Inspection of Web Content not working with iOS 16.4+ Apr 3, 2023 Copy link Collaborator

  8. inspectable

    Set to true at any point in the view's lifetime to allow Safari Web Inspector access to inspect the view's content. Then, select your view in Safari's Develop menu for either your computer or an attached device to inspect it. If you set this value to false during inspection, the system immediately closes Safari Web Inspector and does not ...

  9. iOS 16.4 ASWebAuthenticationSessio…

    I'm using Xcode 14.2 to build an app that runs on iOS 16.4. There is no webView.isInspectable property in this version. When my app presents a webview, it is inspectable in Safari -> develop, which is nice. However, when starting a ASWebAuthenticationSession, Safari -> develop shows "no inspectable applications". It was inspectable on iOS 16.1 ...

  10. bug: Safari Web Inspector doesn't show current iOS app ...

    "No inspectable application" displayed instead of the running app in the Safari menu. Expected Behavior. Be able to use Safari web inspector to debug the app running in iOS Simulator or device. Steps to Reproduce. Prepare any app for ios. Xcode. Build and run in a device with iOS 16.4. Open Safari, menu develop, select device name.

  11. Debug on iOS Simulator using Safari show "no inspectable applications

    I need to use debug on my ios simulator but safari menu shows "no inspectable applications". I have: XCode 14.3 IOS Simulator: iPhone 14 Pro - iOS 16.4 Safari: 16.4 Safari Technology Preview 16.4 I reed that on ios 16.4 I must enable "inspection" flag if #available(iOS 16.4, *) { webView.isInspectable = true; } This solution not works for me: iOS 16.4 webview can not debug in ...

  12. Enabling the Inspection of Web Content in Apps

    In Safari on macOS, you can use Web Inspector to inspect web pages, extensions, and service workers. iOS and iPadOS allow inspection of the same content as macOS, with the addition of Home Screen web apps. Web content and JavaScript is used for various purposes in apps, from providing UI from a webpage to enabling apps to be scriptable.

  13. iOS 16.4 adds new capabilities for web apps on iPhone and iPad

    Apple has just released the first beta of iOS 16.4, including several major new features for web-apps thanks to policy updates and new features in the WebKit engine.. As detailed on the WebKit ...

  14. ios

    After updating to the latest Xcode Version 14.3. Ionic 6 applications running on simulator with iOS 16.4 cannot be debugged in safari web inspector. In other words, Safari 16.1 is showing under Develop -> Simulator Name -> No Inspectable Applications. Tested the application to run under Cordova platform iOS 6.2.0 and 6.3.0 by running

  15. I can't get to WebView on iOS 16.4

    Because with this update, an internal variable isInspectable from the WebView was set to false as default. This makes the WebView not inspectable if this is not set to true. Therefor it is not an issue of appium , i tried it with an older iOs Version and everything work as before, while on the device with the newest iOS Version it did not.

  16. Safari Web Inspector still doesn't show current iOS app ...

    "No inspectable application" displayed instead of the running app in the Safari menu. Information. This is supposed to have been fixed with [email protected]. version with fix #1300 and issue #1301. Command or Code. From xcode, run app in simulator or device. From Safari, select the 'Develop' tab from the menu bar, then 'Simulator' or ...

  17. lightning-aura-components mobile debugging salesforce-mobile-app

    Since iOS 16.4, the webview has to be marked as "inspectable" to enable the functionality of web inspection. Likely this "feature" is newer that Salesforce "Chatter.app" they provide us for mobile development. Hence the option is not enabled and nothing is inspectabel. Salesforce please! Provide a new Chatter.app which is inspectable!

  18. ios

    First of all, Web Inspector has been able to detect the custom browser before. But quite frequently, Web Inspector's menu gives the "No Inspectable Applications" prompt. This happens with the exact same version of the app that worked earlier. There seems to be no trigger whatsoever; yesterday Web Inspector was working with the custom browser ...

  19. Cordova iOS Simulator Safari Web Inspector

    There was an issue on cordova where the webview wasn't inspectable. It's related to this issue here: Mark the webview as inspectable in iOS 16.4 · Issue #1301 · apache/cordova-ios · GitHub. If you are using Meteor 2.13 you will need to update to 2.14 to be able to inspect with safari (cordova-ios was update for this version, which includes the fix for this).

  20. Debugging JSContext in safari is not enabled for iOS >= 16.4

    DEBUG Build any RN iOS with a target of iOS >= 16.4 and see that it is not available for inspection per the documentation. Snack, screenshot, or link to a repository. Any RN app will demonstrate this, so the base snack should show when configured with a DEBUG build. https://snack.expo.dev/TRFqpEjAi