Debug WKWebView on iOS app running on Mac (Designed for iPad) - ios

It looks like when an iOS app runs on Mac (Designed for iPad) it doesn't use Safari as the renderer but uses Apple Mail instead 🤯
Not only this browser seems to be more limited than Safari, but it also can't be inspected using Safari>Develop.
Any idea how this webview can be debugged? Thanks!

Related

Universal deep link not working on Mac (Designed for iPad)

I am using Firebase to setup email link authentication and followed the instructions listed here: https://firebase.google.com/docs/auth/ios/email-link-auth?hl=en&authuser=0
The project is an iPhone, iPad, and Mac (Designed for iPad) app built using SwiftUI. The email link authentication is working perfectly fine on iPhone and iPad. When I tap on the link in the email, the app launches, processes the link, and I am logged in.
When I am running the iPad app on an Apple Silicon Mac using a "Mac (Designed for iPad) build. The dynamic links do not seem to make it to the running Mac app, specifically, onOpenURL is never triggered: https://developer.apple.com/documentation/swiftui/view/onopenurl(perform:)
I have tried opening the link using both chrome and Safari on the Mac. Neither of them make it to the running Mac (Designed for iPad) application.

Inspect WKWebview for app running on Mac Designed for iPad

I have been working on an app which run on iOS Device and Mac both. I'm using Mac Designed for iPad option. I want to inspect WKWebview from my app in safari. I am able to inspect WKWebview in iOS devices but not able to inspect the same using Mac device as my app is not getting listed under develop option in safari for Mac Designed For iPAD option.

Is it possible to Debug iOS app on Windows/Linux?

is there a way how to debug an iOS mobile app on Windows or Linux (Ubuntu)?
I have an application which runs fine on Android, but it has some flaws on iOS. For Android debugging, I always used the Chrome device inspector and I am wondering if it’s possible for iOS too?
The Webkit Adapter I found (https://github.com/RemoteDebug/remotedebug-ios-webkit-adapter) works for debugging websites opened on iPhone via SAFARI browser, but not for the mobile app. Any ideas?
Thanks a lot for any suggestions.
Yes, you can develop your own lldb to support debugging non-jailbroken iOS device on Window, like this

Debug iPhone Chrome

Is it possible to use chrome://inspect to debug Chrome running on an iPhone that is plugged in via USB?
Basically I just want to use Chrome on my laptop to debug, not Safari.
No, this is not possible. The reason for that is that due to the limitations of iOS Chrome uses WebKit while on all other platforms it employs Blink to render web pages. Chrome DevTools' core which resides in Blink hence it is not available on iOS.

Debugging web app in iPad Simulator

I am developing a web app for iPad and testing it on Safari on Mac and Safari on iPad Simulator. Now there are some issues with CSS in iPad Simulator which work quite well in Safari on Mac.
Now my question is,
Is there a powerful debugging tool for Safari in iPad Simulator?
When running safari in an XCode device simulator, the desktop Safari (v6) Develop menu shows those devices. From there, you can fire up the developer tools (DOM browser etc.) for the mobile browser. This helped me debug an mobile safari css issue without hardware.
Note: As of iOS6 this is not the correct way of doing remote debugging, leaving this answer for historical reasons but you should look into remote inspection with Safari, here is a good article: http://jeffreysambells.com/2012/09/22/ios-safari-web-inspector
Have a look at this, (a bash script I wrote) https://gist.github.com/2241976. It will allow you to open the iPad simulator and run Webkit's remote inspector, which will look just like this.
iWebInspector is quite a powerful tool for the iOs simulator's Safari.
It uses the same inspector as Chrome and it works nicely (I've used it myself and found it really helpful).
From their website
iWebInspector is a free tool to debug, profile and inspect web
applications running on iOS Simulator (iPhone or iPad). You can check
resources, see and change HTML & CSS, use breakpoints on JavaScript
code, create charts and more just as if you were on Safari for
Desktop, Chrome or Firebug.
It works for any web in Safari -the web browser-, for a chrome-less
webapp (full-screen) and also for apps using UIWebView -including
PhoneGap applications-.

Resources