from Widget to App - how many steps???

Discussion in 'iOS Programming' started by dubhe, Aug 28, 2009.

  1. dubhe macrumors 65816

    dubhe

    Joined:
    May 1, 2007
    Location:
    Norwich, UK
    #1
    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.
     
  2. dukeofism macrumors member

    Joined:
    Jul 22, 2009
    #2
    If you are writing the app for the iPhone you will need to learn Objective-C. Apple has a tutorial available here.
     
  3. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #3
    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.
     
  4. dubhe thread starter macrumors 65816

    dubhe

    Joined:
    May 1, 2007
    Location:
    Norwich, UK
    #4
    Ok, so no quick fix, need to learn Objective-C, thanks for the info guys. :)
     
  5. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #5
    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.
     

Share This Page