Remote Debugging on Android and iOS

By now, most of you have figured out how to use the Chrome or Safari Debugger to look at your app while it is running. (If not, read this!) But did you know you can also debug your app when it is running on a device?

Debugging an Android device on Windows

You will need Chrome 32 or later on both the device and the desktop. Your device needs to be connected by its USB cable.

Follow the instructions here. You will probably need to install the USB driver for your device. Once it is installed, type about:inspect into Chrome’s url bar and you will connect. The debugger will work just like the Chrome Desktop Debugger.

PhoneGap apps work too!

Debugging an Android device on Mac OS

Just like on Windows, except there are no drivers to install.

Debugging an iOS device on Mac OS

Connect your iOS device to your Mac using a USB cable. In Safari, go into the Advanced screen in Preferences. Turn on “Show Develop menu in menu bar”.

Then, from the Develop menu, choose your device and the app you want to debug.

More information is here.

Debugging an iOS device on Windows

Use the NSBApp Debugger.

Start it using the “NSBApp Debugger” in the Run menu. It will then recognize your app in these cases:

1. It is running in a desktop browser, after having been loaded from nsbapp.com.

2. It is running on a device as a web app, after having been loaded from nsbapp.com.

3. It is running on a device as a PhoneGap App. The project property “NSBApp Debugger” must be set to True.

What the $(“#?

Here’s a great question from the web board. What is it with the $(“# you will sometimes see in the code?

It’s a jQuery thing. Valid function names can start with a letter or certain special characters. “$” is a valid character to use in a function name. In this case, it’s the entire function name: $().

(jQuery is a utility library which is included in AppStudio apps)

jQuery’s $() function is a selector. It looks for elements in your app. It has a lot of different ways to select them:
http://api.jquery.com/category/selectors/

You may see something like

  $("#Button1").css("color","red")

The # means to look for an element with the id of “Button1”. What follows is the function to perform on the selected elements. There are a lot of functions that can be called:
http://api.jquery.com

By the way, you can also do the above as follows:

  $(Button1).css("color","red")

Rather than using a selector, we reference the control directly.

AppStudio 4: Clicks on scrolling controls

We have found a problem with clicks on scrolling controls. It appears to be a bug in the new iScroll 5 library. The problem first appeared in 4.0.0: If you click on a scrolling list, a click event was fired for everything except Android.

The solution, in 4.0.1, was to add click:true to the scroller’s settings. This fixed the problem on Android, but resulted in 2 clicks firing elsewhere. We have opened an issue for this on iScroll’s bug tracker: https://github.com/cubiq/iscroll/issues/674

We will keep you posted!

Update: Fixed in 4.0.4.

AppStudio 4: jQuery Mobile Icon improvements

AppStudio 4 comes with jQuery Mobile 1.4. It has over 50 icons you can use with your controls. If that’s not enough, you can add custom icons of your own.

Screen Shot 2014-04-07 at 9.48.05 AM To help you choose, there’s a handy picker that appears in most cases. The icons are:
action, arrow-d-l, arrow-d-r, arrow-d, arrow-l,

arrow-r, arrow-u-l, arrow-u-r, arrow-u, audio,

calendar, camera, carat-d, carat-l, carat-r,

carat-u, check, clock, custom, grid,

mail, eye, gear, heart, home,

info, bullets, bars, navigation, lock,

search, location, minus, forbidden, edit,

user, phone, plus, power, recycle,

forward, refresh, shop, comment, star,

tag, back, video, alert, delete.
Continue reading “AppStudio 4: jQuery Mobile Icon improvements”