Debugging UIWEBVIEW in Safari with Swift and Xcode 6 - ios

I'm currently having trouble enabling safari's debugging tools for a UIWebView. I'm trying to inspect why certain things are not loading in the UIWebView.
The app does not show up in the Safari > Develop > iOS Simulator list.
There are no inspectable applications for the app that is
loaded
I'm working with Xcode6-Beta, Mac OSX 10.10, and iOS 8.
I'm specifically looking for an answer that will allow me to debug using safari, or make note that the newest versions of Safari/Xcode don't debug app UIWebviews.

Wanted to let everyone know that it turns out that the bug I had on my end was on the webapp side not the ios side. Unfortunately I still have not found a way to debug in Safari an iOS 8 simulator.

Related

Testing webauthn in the ios simulator

Does anyone know if testing webauthn in the iOS simulator (xcode 12) with ios 14.4 is possible? I tried it with https://webauthn.io and using an iPhone 8 with fingerprint enabled and iPhone 11 with faceid enabled but in both cases it does not seem work.
How to launch iOS simulator with Safari developer tools
1.Install XCode. If you are developing on Mac, chances are you already installed XCode. You can either use the Apple App Store (easiest way) to install XCode or get the DMG/XIP file to install it if you do not use the App Store.
2.Start iPhone/iOS Simulator.app to launch the Simulator. If you have not created a simulator yet, you need to do this in XCode. You can have multiple simulators as you might want to test on different devices. I recommend creating a shortcut so you do not need to open XCode every time you want to launch a simulator.
3.Open the Safari browser in the Simulator. As mentioned above, other browsers like Chrome are not supported.
4.Open the Safari browser on your Mac device to connect it with the Safari browser in the simulator. Now you should be able to use the Safari developer tools like in any other web page: see the DOM, set breakpoints for debugging, perform network analysis and much more.

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

Safari web inspector not working with cordova in iOS12 and mac OS Mojave

Recently I updated my device to the iOS12 (it's actually 12.0.1 now) and also my mac to the latest OS. Now, whenever I am trying to debug my Cordova app it will simply not show up in the Safari developer menu. The mobile browser works, its just Cordova not showing. This is happening only with the real device, in the simulator, it shows up. I followed a bunch of articles on how to reset the trust settings and even tried remotedebug_ios_webkit_adapter and nothing. How can I get to the bottom of this? I am completely stuck and unable to continue with development.
I would like to mention that the app is using the wkwebview engine, not uiwebview and we never had this problem ever since we moved to the new engine for a least a year now.
download & try same in Safari Technology Preview https://developer.apple.com/safari/technology-preview/
Go to you'r Phone settings -> Safari -> Advanced -> enable Web Inspector
then go to safari developer, you'r device will be appear there.
For me the solution was to restart Safari.
Lately it's been often that Cordova iOS debugger won't show in Safari, but I am able to fix it every time by completely quitting Safari and restarting it. ;)
Also, make sure that you sign your app with a development provisioning profile.

Debugging PhoneGap on Device

Normally I'm a JEE guy but these days I'm working on a mobile app. I chose PhoneGap because there are not so many needs to UI and I thought this would be the easiest way to serve the app on many platforms.
I'm wondering if my setup is good and if it's possible to get console output when running on the device. I'm working on MacOS and iPhone6.
I installed PhoneGap and Cordova via npm and serving the files with phonegap serve.
For local debugging I'm using the chrome plugin "Ripple".
For debugging on the device I'm using the PhoneGap Developer App from the AppStore, together with weinre on my Laptop to get some debugging data. In weinre I can see everything except console outputs. Is this normal? Or any idea how I could get the console to weinre, too?
I also found some tutorials on the web using XCode and some native iPhone emulator but didn't get this working yet. Which way is the more preferable way of debugging on device?
You don't need any tool for debugging cordova app. For iOS just start the app in stimulator and start safari. In safari go to Develop > 'your pc name' > ios simulator.
http://webdesign.tutsplus.com/articles/quick-tip-using-web-inspector-to-debug-mobile-safari--webdesign-8787
For Android run the app in your device and in the chrome go to http://chrome://inspect/#devices
Weinre is quite old and should not be be used anymore, instead, you want to use the remote debugging tools in your browser. For iOS, you can use Safari to debug your Cordova app. I've got a full article here, https://dzone.com/articles/overview-mobile-debugging, but the process involves doing one setting on your mobile device, and then simply opening up Safari and going to the debug menu. You can also do this with Chrome and Android apps.
Another option is GapDebug (https://www.genuitec.com/products/gapdebug/) which lets you do iOS and Android together in one Chrome tab.

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