July 14, 2008

QuickConnectiPhone beta 4 released

Posted in iPhone development tagged , , , , , , , , at 10:26 pm by tetontech

QCiPhone continues to stabilize and harden. The latest changes included fixes that allow you to map a command to a View Control Function without having a matching mapping to a Business Control Object. This should allow you to make UI changes without doing any database or server data pulls. It works great with applications that are using Lists in the UI.

Also fixed is a defect that caused a failure if you mapped the ‘default’ command to a Validation Control Function.

I think we are getting close to a Release version!

Look at some of the older postings for ideas on how you can install and use this framework.



  1. Brian said,

    This project sounds very interesting, especially if we really can begin to write native apps using just html/javascript/css. So does this framework actually provide a way to make calls from javascript to the iphone in order to access native functions? Like getting location data or access to the camera? If so, are there any examples?

  2. tetontech said,

    Making JavaScript calls down into the iPhone Objective-C portion of a hybrid application is not included in the UIWebView class for security reasons. QuickConnect therefore does not include this capability either.

    When I first started writing for the iPhone I looked for a way to call down to get the location information as are you. When I discovered the security limitation I was disappointed. As I thought and learned more about it I realized that I could get the functionality I needed if I had the Objective-C application push the location information up to the JavaScript. Maybe you can use that capability as well.

    For this reason the framework does include the ability to push the location information up into the JavaScript. In the framework all you need to do is uncomment some code. You can then push location info into the JavaScript code.

    The example uses a button to trigger the push but you could have it be application startup or some other event. It is important to note that the location pushing capability is untested at this point but should be tested next week.

    Also included, and tested, is pushing the acceleration information up into the JavaScript as is pushing orientation change information.

  3. Eric J said,

    Having fun with QC4iPhone! Thanks for all your hard work.

    I have run into an issue though. I am unable to do a .focus() onload. I want to focus on a text box and launch the keyboard onload.
    For example:
    Doesn’t work 😦

    I have tried inline js as well, nothing seems to work. It must be blocked for some reason(security?).

    Is it possible to call a JS function from webViewDidFinishLoad: in QuickConnectViewController.m?

    If so, how can I do it? I’ve been trying for about 4 hours with no success so far.

    Eric J.

    p.s. Is there a way to set the app so no scrolling is allowed(like stocks)?

  4. tetontech said,

    I have experimented with the focus functionality. I tried it onload and also due to a button click. Neither methodology worked. This says to me that making the call from the webViewDidFinishLoad function would have no effect either.

    I don’t know the cause of this at this point but it may be similar to alerts not working. In that case the alert functionality is actually part of the browser not actually javascript.

    If you look in the acceleration functions in the QuickConnectViewController.m file you will see how to make calls from Objective-C up into JavaScript.

  5. Eric J said,

    I have done focus calls successfully from onclick on an img tag, so I know focus does work. It seems like it requires user action and can’t be automatic. I’ll play around some more and try the accel stuff.


  6. Eric J said,

    Any change you could give me a few hints about calling a javascript function from obj-C? I can’t try the location or acc samples because currently I only have the free SDK and the simulator.

    Eric James

  7. tetontech said,


    The following line of code is from QuickConnectViewController.m line 151

    [webView stringByEvaluatingJavaScriptFromString:@”rotate(0)”];

    If you replace the string with the JavaScript function call that you want to make it will be executed within the web view. If the function you call returns a string or a primitive it will be the return value of the stringByEvaluatingJavaScriptFromString message.

    I hope this helps.


  8. Eric J said,

    Hey Lee,
    Thanks for the tips. I’ve got GPS and acc working great via QC.

    I’m having a lot of fun with this stuff. I’ve got my apps running on my physical iPhone now(signed up for $99 dev program). I do have an issue though, when I run 2 quick connect applications in the sim or on the phone they replace each other. I imagine this is from all the ___PROJECTNAMEASIDENTIFIER___ and ___PROJECTNAME___ all over the place. I tried to change them in all the places I could find but it causes the build to fail every time. Where & how should I change these to my individual custom app name?

    In case it matters, I did not go dashcode->xcode. I just copied the quickconnect folder and opened it in Xcode.

    Any help on this would be great as I’m totally stumped.

    Eric James

  9. tetontech said,

    Good job Eric. Thanks for the feedback.

    The ___PROJECTNAMEASIDENTIFIER___ and ___PROJECTNAME___ are there as part of the template.

    If you add the quickconnect xcode project as described in my recent post you can then select QuickConnect in your new project window.

    This will allow Xcode to replace these identifier strings with the name of your project.

    That will solve your overwriting problem.

  10. brian said,

    I’m having trouble using images. I’ve placed images in the Resources folder in Xcode, is it necessary to place them into the Images folder? The images work correctly in the simulator, but do not work correctly on an actual iPhone (question mark icons appear).

  11. tetontech said,

    It is not a requirement to put images in the Images Group. There is a file in the Resources Group called Dashcode to Xcode.txt. It contains the following statement. I think you may have missed step 2.

    When moving code from a Dashcode project to a QuickConnect iPhone hybrid project
    in Xcode, you will need to:

    1) Find in the entire project, using the Edit pull down menu, “Images/” in location strings and remove them. They can be found in the PushButton function for example.
    2) Drag the contents of the Images directory of the project into the ‘Copy Bundle Resources’ section of the application target.
    3) Remove all subdirectories from the script and css inclusion tags.

    These actions will allow the executable to find and use the images that were placed in the Dashcode project for displaing
    buttons, etc.

    If further debugging is needed show the contents of the .app file in the build directory of your project and load the html file
    in safari. You can then use the Developer pull down menu within safari to see the error console and safaris’ other
    developer tools.

  12. brian said,

    Thanks for your response. In all cases, images are written as “image.png” in the index.html file. I haven’t used any directories — in fact, I didn’t use dashcode at all. The program works great in the simulator and in safari, but still gives the boxed question mark error on the device.

  13. brian said,

    Also, I’ve deleted the files under Resource to replace with my own files. Are the ones that come with the template necessary to keep?

  14. brian said,

    I think my problem turned out to be that the graphics file names are case sensitive.

    On another note, you’ve written an incredible framework!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: