Building a PhoneGap app for iPhone with Adobe Dreamweaver CS5.5
After trying out Adobe’s new Dreamweaver CS5.5 for building a PhoneGap app for Google Android, I was keen to try the same for Apple iOS. In particular, I wanted to see if the performance problems with jQuery Mobile and PhoneGap on Android were also an issue on iOS.
This turned out to be more complex than I had imagined. Bear in mind that I have not done a lot of previous iOS development; but I reckon that makes me a good test case for Adobe’s market here. Ideally you should be able to use Dreamweaver alone to build your app and make a fortune on Apple’s popular app store.
I installed Dreamweaver CS5.5 without any issues and copied my Calculator example from PC to Mac. I am not going to repeat the steps that were the same as for Android; read my earlier post. I will mention that I puzzled over the setting for the IOS Developer Tools Path. After trying various sub-directories I eventually discovered that simply entering /Developer here works. One of the issues I have with this stuff is that clicking Help generally does not help. I resorted to watching one of Adobe’s videos and checking out the screen there.
My app worked fine though and I was able to run it up in the iPhone simulator. However I really wanted to test it on the device itself. The problem: this is all you get in Dreamweaver in terms of application settings:
I have not yet found any documentation from Adobe concerning what to do once your PhoneGap app is ready for on-device testing, though there may be some somewhere.
My solution was to download a separate install of PhoneGap, picking the latest version which is 0.9.5. Then I downloaded Xcode 4 and the latest iOS SDK; I had not previously installed this as I have only just signed up for Apple’s paid developer program.
I might have been better sticking with Xcode 3.x, as it turns out that PhoneGap’s support for Xcode 4 is still work in progress. I used Shazron Abdullah’s script which creates an Xcode 4 PhoneGap project from the command line. Then I copied my Calc application and the jQuery mobile directory into the project and opened it in Xcode 4.
Nothing worked and I had to do a number of things to get it to build. Most problems were solved using this guide by Cameron Perry and the comments which follow. Here’s what I recall doing:
- I removed a red link to PhoneGapLib.xcodeproj and added it back from ~Documents/PhoneGapLib
- I added i386 to the list of Valid architectures in build settings, for both the PhoneGapLib and my Calc project
- I added an entry for PHONEGAPLIB to the Xcode 4 Source Trees, set to /Users/username/Documents/PhoneGapLib/ using the full path and not the ~Documents abbreviation.
- I obtained an ID for my app from Apple’s developer portal and pasted into the project as the Bundle identifier (info section).
At this point the project almost built but I still got two Apple Mach-O Linker errors relating to PhoneGapDelegate:
Page 1 of 3 | Next page
Related posts:
- Hands on: Building a PhoneGap app with Dreamweaver CS 5.5
- Adobe announces Flash Builder for PHP, PhoneGap integration in Dreamweaver
- Adobe Dreamweaver CS6, PhoneGap Build, and HTML5 app tooling
- Adobe announces Flash Builder for PHP, PhoneGap integration in Dreamweaver
- Dreamweaver CS5.5 PhoneGap apps: performance issues on Android
