Home > iOS, Mobile Development, PhoneGap > HelloPhoneGap1.0 Project updated for PhoneGap 1.1.0

HelloPhoneGap1.0 Project updated for PhoneGap 1.1.0

I just updated the HelloPhoneGap1.0 out on github so that it works with PhoneGap 1.1.0, iOS5, and Xcode4 with the new project structure. Let me know if you see any issues…

Where to get the Code? (PhoneGap 1.1.0 Required)

You can get the entire source for my sample project “HelloPhoneGap1.0” from github here: https://github.com/hutley/HelloPhoneGap1.0

PS. MAKE SURE YOU INSTALL PHONEGAP!

Advertisements
  1. Jari Huomo
    October 31, 2011 at 1:26 PM

    Thanks for this, finally got Childbrowser working!! 🙂

    Do you have any suggestions how to get full screen childbrowser to Ipad.

    Found a row in childbrowserviewcontroller.xib and with values
    below working childbrowser is working fine in a portrait mode but there is some empty space in landscape mode.

    {{0, 0}, {768, 1024}}

    • November 4, 2011 at 12:35 PM

      Change the ChildBrowser.xib file so that the contained widgets will auto-resizes appropriately.

      • Jari Huomo
        November 9, 2011 at 12:26 PM

        Yes of course, got it working. Thanks 🙂

  2. November 1, 2011 at 2:33 PM

    I was wondering is there a way to use native back button to get that really nice sliding effect? Currently when you click the back button it pushes a notification. How would I make it actually go back to a different page? Great work thank you for the most clear explaination on phonegap yet.

    • November 4, 2011 at 12:33 PM

      You can supply any javascript function you want as a callback – the nice sliding effect you are talking about is when a native view controller presents another view controller. In a PhoneGap app – you are running in a webview and all your pages are html and javascript. If you want nice animations I suggest a UI javascript framework like Sencha Touch.

  3. November 4, 2011 at 12:42 PM

    Is there anyway you could create two view controllers to achieve those effects? Using just phonegap? I’m guessing this would be hard to achieve and a cumbersome solution but I just find js back buttons don’t have the same feel as native. Thanks for your clear explanation on the previous question.

  4. November 4, 2011 at 12:49 PM

    So its possible very cool I will need to learn xcode. Would you be able to build this? Do you do freelance work?

  5. November 4, 2011 at 3:13 PM

    Yes have been looking at both Sensha, Jquery Mobile for phonegap over the last 3months. Just not really happy with how the animation and feel works to me it really takes away from the app like experience. So they do not meet my needs. It would be nice if the plugin would allow switching between html pages. Beacuse we are using PHP server side $_SESSIONS it should just load the new HTML page via AJAX in the new controller window and have all the users relevant data for the controller view. We would need multiple controller views for the project.

  6. Greg
    November 5, 2011 at 6:56 PM

    I would love to know how run this XCode project. I’m currently using the NativeControls.js plugin, copied it in to the /PLUGINS directory – and still have no luck running it.

    I have added the Key / Pair of “NativeControls” in the Plist and the.js to the /www directory. Everytime I start it – i get a warning about:

    ERROR: Plugin ‘NativeControls’ not found, or is not a PGPlugin. Check your plugin mapping in PhoneGap.plist.

    Any luck?

    • November 8, 2011 at 1:17 PM

      Are you trying to run my project or add the files to your own? If it’s mine it should just work. If its your own you need to have a PhoneGap project created and copy all the files in the plugins/NativeControls directory into your project. Then update the PhoneGap.plist and add the js to the www folder. You also need to include the appropriate scripts on your html files.

  7. November 7, 2011 at 10:36 AM

    How to make auto-width plug-in nativetsontrols Navbar?
    Now had to be done separately for ann iphone and ipad, I would be universal

    • November 8, 2011 at 9:54 AM

      I have checked in a version that changes the width of the NavBar and TabBar so it works on an ipad BUT it only handles portrait mode for now. I’ll work on the rotation when I have time at some point.

  8. November 7, 2011 at 4:58 PM

    Hi Hiedi,

    Would you contact me via email to discuss building the plugin I am looking for?

    Cheers,

    Dan

  9. November 8, 2011 at 1:33 PM

    hiediutley :
    Looks fine when I run it. I tested on Xcode 4.2 with iOS 4.3 and 5.0.

    Created a new project, it worked:)
    Thank you!
    I will wait for fix, change the orientation.

  10. November 9, 2011 at 12:33 PM

    How do I specify the full path to the logo file in the navbar?

    I placed the file in the folder Resources logo.png in the directory www.

    None of these options work:

    nativeControls.setNavBarLogo (‘logo.png’)
    and
    nativeControls.setNavBarLogo (‘file: / / logo.png’)
    and
    nativeControls.setNavBarLogo (‘file: / / www / logo.png’)

    Where am I wrong?

    • November 9, 2011 at 2:48 PM

      Originally it is a url == “http://some.logo.somewhere/logo.png” BUT I just updated the plugin to handle files in the resource bundle and in the www folder. Update and enjoy.

  11. November 10, 2011 at 1:47 AM

    It’s me again:)
    I have two questions:

    1. Committing “changing to a natvie NavigationBar” unmade? And I turned navbar, and Tabar not.
    Screens – http://imageshack.us/g/339/screen1qed.png/

    2. How do hideRightNavButton method? I need to sometimes hide the button.

    • November 10, 2011 at 11:31 AM

      The nativecontrols do not handle rotation right now. I do not have time to fix it at the moment. I did add methods for hide/show of the nav bar buttons. Upgrade and enjoy…

  12. November 22, 2011 at 10:50 AM

    Nice thing. I’ve added custom background support for tabBar 🙂

    So i forked ur repo and sent ya a pull request so everyone can use.

    Maybe i’ll port that for navBar also.

  13. Vicky
    December 2, 2011 at 5:17 AM

    hi.. Hiedi do you have any idea how to add audio record on iPhone using PhoneGap, I also gone through phonegap API but that solution is not working for me …can you please help ….

  14. John
    December 2, 2011 at 7:28 AM

    Hi,

    I’ve tested your project and it all works fine. When I create my own project and check if the nativecontrol is working, I can click on the button showTabBar but no tab bar shows up.
    I added the plugin files to the project and also changed the PhoneGap.plist. I use phonegap 1.2.
    Do you have more tips on this to get it work for me?

    • December 6, 2011 at 10:20 AM

      Make sure you add the nativecontrols.js to your page.

  15. December 9, 2011 at 10:58 AM

    Heidi, could you detail a few of the gotcha configurations that would cause 1.1 to work in simulator 4.3 but fail in 5.0? Ive been digging around but can’t find the sweet spot.

    • December 12, 2011 at 10:18 AM

      There are many difference between 4.3 and 5.0. Can you be more specific as the error/issue that you are experiencing? Are there any messages in the console log?

  16. January 10, 2012 at 12:37 PM

    Curious if you’ve experienced problems with Childbrowser and iOS5. I haven’t tried your HelloPhoneGap project, but I’ve done new installs of PG 1.1.0, 1.2.0, and 1.3.0 on iOS5, and created new projects each time (copying in my index.html, etc code). Whenever I add Childbrowser to these projects, inevitably I get the following error:

    *** WebKit discarded an uncaught exception in the
    webView:decidePolicyForNavigationAction:request:frame:decisionListener:
    delegate: Application tried to present
    modally an active controller .

    Otherwise my app works fine. Phonegap fires, and my other functions (using jQTouch) and other plugins are ok.

    I’ve posted the issue to Google Groups but haven’t heard from anyone there yet. Here’s the link with more details: http://groups.google.com/group/phonegap/browse_thread/thread/172745b8fc0eaace#

    I’ve also posted to the phonegap-plugins Google Group. Any insights would be greatly appreciated!

  1. No trackbacks yet.

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: