Possible to mirror iOS Safari Debug Console on a Mac, PC, or other device? - html

All,
I'm working on an HTML-based web app (i.e., not native app) targeted for iPhones.
I typically use Safari's Debug Console to track down JavaScript errors; it's pretty handy.
However, when I'm working on some complex JavaScript function - it's incredibly tedious to switch back and forth between the web app and the console window. Also, there are times when I'd like to see BOTH the window and the app at the same time, so I could see console messages WHILE I'm interacting with the app.
So - is it possible to "mirror" the Debug Console to another device, or too a Mac or PC?
In other words - I'd like to be able to use a web app (or web page) on my iPhone, and have the output from console.log() (or .warn() or .error() or .info()) show up in a window on my development machine.
Adobe has something called Shadow (http://labs.adobe.com/technologies/shadow/) that looks like it does something close:
Adobe® Shadow is a new inspection and preview tool that allows
front-end web developers and designers to work faster and more
efficiently by streamlining the preview process, making it easier to
customize websites for mobile devices.
... but it's not quite what I'm looking for. (At least, it doesn't sound like it from the description).
Sorry in advance - I'm pretty new to this type of development, so I'm probably unaware of some tool that everyone else knows.
Either way - thanks for any pointers.

jsconsole.com can do this. Read http://jsconsole.com/remote-debugging.html for more info.
http://youtu.be/Y219Ziuipvc shows you how to do it.

weinre does exactly what you're wanting. Their docs are reasonably thorough so I'll let them tell what you need to do to get it running.
PhoneGap actually offer a mobile web app debugging tool that is powered by weinre and is a cinch to set up so you might want to check that out first.

Related

Creating a chrome extension with web application features

I just started learning how to build a basic chrome extension. I see many chrome extensions which have extensive functionality like a full fledged web app. For example, when I click on a particular chrome extension, it opens a new tab with a URL chrome-extension://gibberish/filename.html. This page functions like a complete web app. Here is an example chrome extension which does image compression:
From my research, it looks like a combination of chrome extension development bundled with NodeJs. But, I am unable to find enough information about this to find a course to learn myself. If I had to develop a similar application, where do I start? Can any web application be transformed into a chrome extension or is there a specific way to go about it?
Any guidance will be much appreciated. Thanks in advance.

TCL/TK in browser

I've been trying to run a TCL/TK script in a browser so people with minimal computer knowledge can run it (my script) on all devices.
I've come across the TCL/TK plugin from 2006 but I can't get it to work. Even if I could, it doesn't contain the user friendliness I am looking for.
I also came across a website that runs TCL scripts in-browser but doesn't seem to recognise TK commands....
So far to distribute it to people I wrapped it into a .exe but people are requesting it to be used on mobile devices (with more mobility than a windows laptop).
Any one got some information to do this without rewriting all of my code?
Or an easy way to port a TCL/TK script to iPhone/iPad or Android (I don't think there will be any easy solution for this, that is why the browser concept made most sense to me)
Unfortunately, the browser plugin depends on the browser supporting the NPAPI specification, and that's now been largely removed from browsers (and was never supported on mobile devices). This has irritated quite a few other people too, and I don't think there's much you can do to fix it directly. So instead, let's look at some workarounds…
You might be able to use the NaCl support in Chrome on desktop systems, or you could package things up in a starpack (ActiveState's TDK is a commercial version of that, among other things) and for deployment to Android you can use Androwish (which I personally recommend). I'm nothing like as certain about solutions for iOS.
For plain Tcl try EmTcl, Tcl compiled with emscripten.

Confusion regarding PhoneGap/Cordova

I have a webapp developed (game), based on HTML5 + CreateJS, but since Android lacks of standards, I've run into unsolvable issues for my webapp. That's why im recurring to PhoneGap.
Yet my confusion lies in the fact that I need to make this game into a phonegap app that runs on Android/iOS, using for each platform native specific stuff.
So, should I build 2 apps (one for each platform), all over again, or use the one I have and try to deploy it into different devices using phonegap?
The truth is I don't know how to approach this problem... can anyone help?
Best Regards.
Yes, you can use Cordova (PhoneGap) to create a cross platform mobile app. Basically, Cordova (PhoneGap is Adobe's version of Cordova) is an open source project that provides JavaScript API's for accessing native device functionality (like the Accelerometer or Camera.) Cordova also lets you package your app in the native application shell, so you put your app on the app store. Please see my other answer here about Cordova and hybrid apps: Beginning with Apache Cordova
If the game runs completely in HTML5, I think it would be easiest to just use that one codebase and integrate it with Cordova and then deploy to the various platforms - why rewrite the app twice if you don't need to?
However, if you are using native device functionality, you may need to develop your own Cordova/Phonegap plugins for use. This way, you can call regular Android/iOS code (Java or Objective-C code) that you write from your web app code with JavaScript. This might be more work, especially if you have never written in these languages.
Personally, since you already have a working HTML5 app, I'd just try to get it working with Cordova and see how it performs. If you really need some native specific stuff, then I'd try creating that "stuff" as a plugin. Rebuilding the app twice, once for Android and once for iOS seems like a pretty big waste of time to me.
The answer here is either yes or no.
Yes if you want to use some specific feature of the native code. For instance, iOS's default objects is beautiful itself, you can easily drag and drop it to build your application. However, it takes lots of time to rebuild for another platform. Specially, if you intend to create app/game for multiple platforms, it would be a nightmare.
HTML5 is much faster for you to approach several platforms. However, you can't get the best result on all platforms and all devices. I mean, it is really difficult to bring the max performance of the app on all devices. For this solution, I suggest HTML5 with some libraries such as LimeJS, Crafty, Impact, etc. or some tools such as Construct 2, etc. I used to use HTML5 with all those libraries but found out that Construct 2 is much better.
Instead of using phonegap, I recommend cocoonjs. Specially if your targets are iOS and Android platforms.
Hope that help.
Yeah, even the simplest game such as bubble buster would be difficult to make cross platform with different version of android webview and you need cross platform? I would suggest looking into something like Unity3D.

Embedding The Dart VM In A Desktop Graphical Stand - Alone Application

So I am writing a cross-platform (so far plans for Windows and Ubuntu) application for both the web and desktop.
This application
is expected to at times be moderately graphically intensive and perform a substantial amount of file IO. I am writing it in Dart. Which may seem like a
"funny" choice given the circumstances, however I did not want
to deal with any heavy API's or have two code bases (NaCl and GCC with two different libs).
In short I am using Dart to interact with an HTML web page, and noticed the Dart VM does
not interact with a webpage unless you are in Dartium. But I want a "desktop application" as well as a web application which eliminates Dartium as a choice, so alternately I plan to use a Qt Webview to make it look like a desktop app, but what I am wondering is would it be worth it to go through the trouble of embedding the Dart VM into my app? In doing so would it easily enough to get the Dart VM (running a dart script) to interact with the page in the Qt Webview (I am a bit new to Dart)? Thanks for reading!
Dartium will eventually be merged with Chromium, allowing your DART applications to run inside chrome directly as a web technology.
Once that merges, you can take advantage of the new Chrome Apps which allow you to have a desktop version of your web technologies. As such, you won't need to use Qt Webview, or embed dartVM into your native application; just use Chrome Apps.
~Main

Working with HTML,CSS and Jquery Or Javascript in WP7

I am presently started working with mobile development and would like to know which is the best way to work with Html,css and jquery/Javascript for WP7.
As I have seen couple of things on the web as Phone Gap,Jquery mobile and Appcelerator Titanium
1.I have some of the problems actually this is not a problem but as PhoneGap gives a starter template with C# solution.
But I'm working on VB.Net.I'm unable to work with the C# solution as If I convert to VB.Net the entire starter template it is not working.
2.Just now I had a look at Jquery mobile there is no specific documentation mentioned how to use it with emulator in WP7.
Can anyone show me the links where I can start with the basics of Jquery mobile with WP7 emulator.
3.Do you think there is any other best way so that I Can work with jquery, html and css in WP7.
It sounds like PhoneGap is your best option here. Right now, it's the best way to deploy an HTML-based application on Windows Phone. The main thing that PhoneGap gives you is a bridge to the phone's hardware (things like volume buttons, vibration, etc.). It also gives you an easy way to wrap up your application into a package that can be installed like a real native app.
By themselves, other frameworks like jQuery Mobile, Sencha Touch and Kendo UI don't provide hardware access or the ability to deploy the app natively. They are purely UI frameworks, meaning they provide the interface widgets you'll use to build your app but little else. Generally, with these frameworks, you need to host the app somewhere like a website and access it through the browser.
Assuming you're running a Windows machine, you could host the app locally for development using Internet Information Services (IIS). Here's a guide to setting up a site. Then you could open the emulator and go to http://localhost to interact with your app. That would work, but it would be clunky.
The ideal scenario is to use both jQuery Mobile (or another UI framework) and PhoneGap to create a nice-looking, natively installable app.
What I'd recommend is trying to get PhoneGap set up in a VB project. From what I've seen, this shouldn't be too difficult. There are probably some details to work out, but mainly it looks like you need to copy the www and GapLib folders over. Then right click on References and browse to the GapLib .dll. You'll also need to get the MainPage.xaml and MainPage.vb files set up, but they probably just host a web browser control, so this should be straightforward.
Migrating the pieces into a new project should work a lot better than trying to convert an existing project.
If you post specific issues that you run into during the setup, I'm sure you could get them answered quickly.