July 16, 2008

Installing the QuickConnect iPhone plugins

Posted in iPhone development tagged , , , , , , , , , at 4:48 am by tetontech

Based on requests for information it seems I have not stated how to install the QuickConnect Xcode and Dashcode plugins.

Assuming you have installed the developer tools put the QuickConnect iPhone Hybrid Application folder in the folder:

HardDrive\Developer\platforms\iPhone\Developer\Library\xCode\Project Templates\Application

To install the dashcode plugin right click on the Dashcode application and select ‘Show Package Contents’.

Copy the TemplateQuickConnectiPhone.wdgtTemplate folder into the Contents\Plugins folder.

Advertisements

27 Comments »

  1. Andrew Lunde said,

    Despite following your install directions, I can’t get the template to show up in DashCode.

    A end-to-end tutorial on how to use your framework with iPhone would be great. It looks like just what I’m looking for.

    -Andrew

  2. tetontech said,

    After you install it will show up if you select ‘Dashboard Widget’ instead of application and scroll to the bottom.

    I’m not yet sure why it shows up there instead of under ‘Web Application’. I have looked through all the plist files and haven’t found anything there.

  3. Andrew Lunde said,

    Still no go. It’s not under “Web Application” or “Dashboard Widget”. When I find Dashcode in the Finder and right click, I see the folder under Contents/Plugins so I think it’s in the right spot. I did notice that some of the templates are named with “Mobile” in the name such as TemplateMobileCustom.wdgtTemplate and that those appear under “Web Application”. Not sure if that means anything or not.

    It seems to me that your efforts here are exactly what I’m looking for. Unfortunately, I’ve only been working with the iPhone Dev Tools for 2 days now so I’m sure I’m missing something basic.

    Do you have a bit of a tutorial or step-by-step procedure? If I can get things going, I would be inclined to write one in order to help out.

    -Andrew

  4. Andrew Lunde said,

    BTW, I just got my iPhone on Monday and am using all the latest versions of the tools.

    -A

  5. tetontech said,

    I just went through the process with my new machine as I described above and it worked great.

    There really is only the one step installation process.

    Changing the name to include mobile doesn’t make any difference on my machine.

    You have to make sure you scroll down in the template selection window.

    Lee

  6. Keith said,

    I am having some trouble with the quick connect in xcode. It seems to run fine on the simulator but once I try to switch it over to an ipod with the 2.0 upgrade for testing, I go to build and get 430 errors and it fails. Anyone have any ideas?

  7. tetontech said,

    What kind of errors?

    Make sure that you follow the instructions in the dashcode to xcode.txt file in your xcode project.

  8. Keith said,

    I have the first couple as an example.
    Is there a way to copy the whole debug log into text.

    Here is the first batch of errors I receive:
    error: i386/types.h: No such file or directory

    error: syntax error before ‘__darwin_blkcnt_t’
    error: syntax error before ‘__darwin_blksize_t’
    error: syntax error before ‘__darwin_dev_t’
    error: syntax error before ‘__darwin_gid_t’
    error: syntax error before ‘__darwin_id_t’
    error: syntax error before ‘__darwin_ino64_t’
    error: syntax error before ‘__darwin_ino_t’
    error: syntax error before ‘__darwin_mach_port_name_t’
    error: syntax error before ‘__darwin_mach_port_t’
    error: syntax error before ‘__darwin_mode_t’
    error: syntax error before ‘__darwin_off_t’
    error: syntax error before ‘__darwin_pid_t’
    error: syntax error before ‘__darwin_sigset_t’
    error: syntax error before ‘__darwin_suseconds_t’
    error: syntax error before ‘__darwin_uid_t’
    error: syntax error before ‘__darwin_useseconds_t’

    It is strange that it will work with the iPhone simulator but once I switch over to the Device debug it gives me 430 errors similar to the ones above.

  9. tetontech said,

    These appear to be library inclusion errors. Is there a library you included in your target for the simulator but not the device build?

  10. Keith said,

    I was able to get past these errors. Only thing I come across now is that I am trying to get multiple html pages embedded in the application to link but I am not sure of the inner file path structure works. Are there any examples on how to display an image and link between multiple html pages?

    Thanks,
    Keith

  11. tetontech said,

    if you had a page called index.html and you had a link to a page called second.html the anchor tag would be fdsa.

    Since Xcode doesn’t use directories. It uses groups. So all of your links should have no directory structure included.

  12. Keith said,

    Thanks for the insight. I am still not sure how the fdsa anchor works. Could you please send me a sample of a string including this anchor in it.
    Thanks,
    Keith
    keithg0103 at yahoo dot com

  13. tetontech said,

    It is just a standard link using the anchor tag. where the internal portion of the link looks like

    href=’second.html’

  14. Laurent said,

    It would be great to play sounds or ask ObjC to grab a picture and have it callback a javascript function.
    Since we apparently can’t call ObjC from javascript, ObjC could poll specific methods frequently, and the javascript function would pass back what it wants the objc-side to perform.

    Also, do you think that if we do in javascript something like:
    window.location = ‘javascript:playsound(“sound1.mp3”)’

    is it possible for the ObjC to trap this navigation event from the UIWebView, look at the URL being navigated to, cancel it if it recognizes it as a command (e.g. playsound) and perform the desired function in the ObjC-side?

    Laurent.

  15. tetontech said,

    Laurent,

    The polling is one way it could be done. I have hesitated to employ this approach because polling can lead to bad habits and bad design.

    Recently I considered creating a tiny ultra thin http server to embed in the objective-c QuickConnectWrapper. I was stopped by the existence of the needed libraries in the simulator frameworks and their absence in the phone libraries.

    As per the trapping of specific javascript calls, that would be very difficult if not impossible. You would somehow have to tap into the underlying WebKit engine. I would suppose you would attempt this by inheriting from UIWebView and somehow giving yourself this access and then overwriting the functionallity of the WebKit engine itself.

    I can only assume that even if you were able to take on this huge task and complete it successfully that Apple would never allow the app to be put on the app store. Such manipulation might open security holes.

  16. Laurent said,

    I found this post:
    http://softwaredev.meetup.com/92/messages/3284457/

    “You could also pass messages from JS to Objective-C by packaging your
    message into a custom URL: Within your JS set window.location to this
    custom URL, and then capture it in Objective-C via
    webView:shouldStartLoadWithRequest:navigationType: (making sure to
    return NO to prevent the page from changing location).”

  17. tetontech said,

    Laurent,

    I am experimenting with this now and will post my results soon. Thanks for the idea and the link.

  18. John said,

    I can’t find the Contents\Plugins folder.
    Could you please post the absolute path?
    Thanks

  19. tetontech said,

    John,

    control click the Dashcode application and select ‘show package contents’. The Contents\Plugins folder will be inside the Finder window that is then displayed.

  20. John said,

    Thanks, I got it now, I didn’t get you were talking about the icon that starts DashCode.

    In your Xcode example I see that the web page bounces when you scroll to the end of the screen. I seen some examples online where they set AllowsRubberBanding, would it be possible to incorporate that in your framework?
    Thanks,
    John

  21. tetontech said,

    John,

    I have checked UIWebView, UIWebViewDelegate, UIScrollView, UIScrollViewDelegate, and UIView. I don’t see this as a method or attribute. I also searched the documentation for AllowsRubberBanding and came up empty. I did a google search and found nothing as well.

    What examples are you referring to?

  22. tetontech said,

    It appears that setAllowsRubberBanding is part of the private portion of the UIScrollView API. Access to the embedded UIScrollView from the UIWebView that contains it is also part of the private API.

    For applications to be able to be placed in the App Store no private API’s can be used.

    If I added this functionality to the framework no applications could be created with it and then distributed via the standard channel.

    I want to keep applications created with the framework open to the standard distribution channel. If you want to add this functionality to your copy of the framework feel free. Just realize that it will only work on phones that have been cracked using JailBreak.

  23. John said,

    That is a shame… Apple seems a bit too restrictive for no reason…

    Was that the only way to give a hybrid app more of a native app appearance?

  24. Jim Moses said,

    I installed 1.5 using the installer and Quickcode template shows up under the Widget section..but I have NO idea how to run and open the examples, being a complete Mac newbie. Can you give instructions from the perspective of being completelly unfamiliar with the Mac. I’m running OS X 10.5.4 and am VERY interested in getting into Quickconnect. Also, there is mention of the palm pre in the roadmap .. is this ongoing? It’s a great platform and would be terrific if I could write once and deploy to many including iphone, android, and webos. Thanks! Jim

    • tetontech said,

      Jim,

      If you open up the iphone examples directory of the download you will find a series of folders. double click on one of these and you will find a series of files that represent the Dashcode project. One of the files will end in .xcodeproj. Double click this file and Xcode will launch. Click ‘build and run’ and the example will run in the simulator if you select simulator in the pulldown at the top left of the Xcode window.

      Lee

    • tetontech said,

      JIm,

      For a quick idea of how to create a QC application check out this blog entry. Also take a look at the wiki.


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: