from Widget to App - how many steps???

dubhe

macrumors 65816
Original poster
May 1, 2007
1,304
10
Norwich, UK
Ok, novice developer here, but I hope to fit more of it around my real job, wife, baby etc

I wrote a basic widget to do a simple calculation I do a lot at work, it has about four numbers input, a couple of yes/no selectors and about 10 lines of calculation which results in a single number answer. This took me about six hours to write in javascript (which I had never used before).

Would it be easy to convert this to an app? Or would I have to learn a whole new code? I wrote the widget in dashcode.

All the apps I am going to make will be mathematical/trigonometry based. I might want to grab my gps position or possibly the compass direction, but I will not need any access to the internet. Which is the easiest but fitting language for me to learn?

Many, many thanks.
 

dukeofism

macrumors member
Jul 22, 2009
55
0
If you are writing the app for the iPhone you will need to learn Objective-C. Apple has a tutorial available here.
 

dejo

Moderator
Staff member
Sep 2, 2004
15,725
447
The Centennial State
There's also the possibility of somehow getting your widget running inside a UIWebView. But I have no real idea how successful this would be and how much of the Dashcode specifics are supported in a webView. And you'd probably still need to be somewhat comfortable with Objective-C in order to have the "package" of the app working.
 

firewood

macrumors 604
Jul 29, 2003
7,631
869
Silicon Valley
Actually there is a quick fix.

There is example code (example apps) of how to completely wrap a web widget into an iPhone app. You can copy and paste a couple pages of Obj-C code to launch a UIWebView, and code the entire guts of your app in JavaScript (plus HTML5 with CSS) running inside that UIWebView. Just using JavaScript/HTML5 you can get access to Location Services, SQL local storage, canvas graphics, table views, some Core Graphic transition animations, and etc.

No need to learn Obj-C...

...unless you need a very few special features, Open GL 3D, or other high-end graphics or number crunching performance, etc.