I hope this can point you out the confusing and can lead to improvment in next release of Dreamweaver CS. (or I just don’t understand the good process that Dreamweaver provided for public)
If you can’t compile, build, or export PhoneGap project in new combination of development environment (lastest version of XCode, OS X, PhoneGap, and Dreamweaver). It should come from these confusing.
Leading to problem
1. Before you come to found this problem you may need to update your PhoneGap version to the latest one. For example, 1.3.0, so you will found an instruction to update PhoneGap in Dreamweaver to effect the new web project you are going to create.
2. you may already update one of your tools: Xcode, Dreamweaver, iOS Framework, and OS X (I found problem in OS X Lion)
3. While you are building your project with PhoneGap via Dreamweaver CS, you may encounter error which already posted around the forum:
- PhongeGap for iOS build error with Dreamweaver CS5.5, PhoneGap 1.2, XCode 4.2.1 (4D502)
- Error creating mobile application with dreamweaver cs5.5
- Export to iOS5
- iPhone app build fail in Dreamweaver CS5.5
4. So these topics lead to similar solution to solve the problems. It is about you have to modify Camera.h in PhoneGapLib folder…
But the question is which one to be edit?
The Solution that lead to another question
If you follow my instruction to update the PhoneGap framework for future project, you may thought to modify Camera.h in /Applications/Adobe Dreamweaver CS5.5/Configuration/NativeAppFramework/DWPhoneGap/iphone/PhoneGapLib/class, but that’s wrong.
If you found the same problem like me, the error log should similar to this:
/Users/teerasej/Documents/DW_NAF/PhoneGapLib/Classes/Camera.m:178:13: error: type of property ‘returnType’ (‘unsigned int’) does not match type of ivar ‘returnType’ (‘enum DestinationType’) [3]
which Mr. london1a1 has post a solution to solve your problem here, (I copied and pasted here)
london1a1 said:
Find this code in the file:
@interface CameraPicker : UIImagePickerController { NSString* successCallback; NSString* errorCallback; NSInteger quality; NSString* postUrl; enum DestinationType returnType; }and change it to this (note the lines that change are bolded):
@interface CameraPicker : UIImagePickerController { NSString* successCallback; NSString* errorCallback; NSInteger quality; NSString* postUrl; enum DestinationType; enum returnType; }
but if you are going to PhoneGapLib folder in Dreamweaver’s Native App Framework, you will confuse because the file look very different from he mentioned. So what is going wrong here?
Strange Behavior of Dreamweaver
If you look carefully. You will found Dreamweaver doesn’t use PhoneGapLib that you updated in NativeAppFramework folder, but they use this one instead:
/Users/teerasej/Documents/DW_NAF/PhoneGapLib/
Yes, you see it. Dreamweaver doesn’t use the updated one, but use from another folder. and then…
I found the PhoneGap version in DW_NAF is just 0.9.3!
I also found that even I replace (or clean replacement) existing file with latest version, Dreamweaver seems denied to compile the project with new version, but it is ok with 0.9.3.
So the question come up:
- If I updated PhoneGap in Dreamweaver’s NativeAppFramework, but it compiled with older one in DW_NAF, which version will be use in application’s runtime?
- Would this effect or lead to unexpected error if developer choose Dreamweaver as a tool to develop mobile application with PhoneGap?
and final question:
How to set Dreamweaver to compile project with latest PhoneGap?
What do you think? Do you found same problem? Do you have another solution? Feel free to share with me!
