Phonegap iOS Safari debug workflow - ios

I've been testing out Phonegap Build, using a similar workflow as outlined here:
Tutorial: Developing a PhoneGap Application
I can build, and deploy to my devices, but cannot get remote debugging to work through Safari, as described in the answer here:
Could you tell be debug process in Phonegap iOS application?
I have no problems debugging the app through the mobile browser, but the installed app itself does not show up in Safari's develop menu.
I am transferring my app to my phone through xCode, and have enabled debugging in the Phonegap build interface, but the Weinre debug service seems to be down. Ideally I'd like to get this working through Safari, could anyone share their debug workflow?
thanks

When you say "native app", you actually mean the Phonegap app deployed to your device?
Here is how I do it. It works on both iOS Simulator and actual device:
Open Settings > Safari > Advanced and make sure "Web Inspector" is enabled
Connect the device and deploy the Phonegap app using Xcode
Wait for the app to launch and navigate to Safari on my desktop, then find my device name in the develop menu

Make sure Web Inspector is enabled in Settings > Safari > Advanced > WebInspector.

Related

phonegap app extremely slow to load website on ios

I have a phonegap app that opens a website using window.open(). While it works fine in testing, when I compile the app and install it on an iPhone using TestFlight it can take anywhere from 1 minute to 15 minutes to open the website. When it does everything works fine. The app store review is rejecting it because of the delay. What can I check to identify the cause of this delay?
Use remote debugging with an iOS device (or a simulator). This will allow you to see error's log like debugging a web site.
See "Safari in iOS" in : https://developer.apple.com/library/content/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/GettingStarted/GettingStarted.html
Open the Settings app.
Tap Safari.
Scroll down and select Advanced.
Switch Web Inspector to ON.
After Web Inspector is enabled, connect your device to your desktop machine with a USB cable. The name of your device appears in the Develop menu of Safari.
Also, depending of what you want to do, I suggest you, instead of using window.open, to use the cordova-plugin-inappbrowser plugin to open link in the browser (outside the webview of Cordova/Phonegap)

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.

How to debug Worklight iOS app or phonegap iOS app

I have read these article
http://moduscreate.com/enable-remote-web-inspector-in-ios-6/
http://developer.telerik.com/featured/a-concise-guide-to-remote-debugging-on-ios-android-and-windows-phone/
but i cant to able to see my app under
Develop-->Device name-->myApp.
But i could able to debug blank safari browser.Could anyone suggest how to debug the iOS app in chrome or safari? Whether i have to change any app setting like in android android-debuggable:true?
Worklight is not based on Telerik, so following their tutorials is kinda moot.
If you have an application running in a device and you would like to debug is using the Inspector tool that Apple's Safari browser provides, follow these steps:
Make sure that the application you've installed on the device was built to the device from Xcode, and is not from a production build (i.e. the App Store) - otherwise it will not be available in the Safari Inspector. Also that it is connected via USB to the Mac...
Make sure you have enable the Inspector tool. In Safari > Preferences > Advanced > tick the checkbox for "Show Develop menu in menu bar"
Now that 1 & 2 have been verified, go to Safari > Develop > your-device > your-app

Disable safari web-inspector

We are developing an iOS application as webapp. During development the possibility to remote debug the webapp in the UIWebView via safari web inspector is quite handy. But I'm wondering if there is any possibility to forbid this feature for the release version of our app even if the webinspector is activated in the iOS settings. Thanks in advance.
Found a related question:
Why Safari shows "No Inspectable Applications" during remote debugging with iOS 6 device?
Since we did not deploy for production yet but only for testing, our app was always inspectable.

How to debug trigger.io android 4.4 apps?

Android 4.4 uses chromium, I'm trying to use chrome dev tools to debug my app. However, I cannot find my app in the ADB console (yet the device is detected, and I can see chrome tabs on my device). Any idea how to enable debugging for my app?
Here chrome-remote-debugging it says that in order to configure web view for debugging one needs to call setWebContentsDebuggingEnabled - does trigger.io do that?

Resources