PhoneGap Xcode 4 Template (beta)
Xcode 4 template specs are undocumented and buggy. So, there are issues:
- We cannot automatically include the “www” folder in the template – the user has to add it in manually (a quick drag and drop). I added in checks and warnings if users try to run the app without adding this in.
- Some files, like .h and the -Info.plist file, are included in the ‘Copy Bundle Resources’ build phase by the template. No biggie during run-time, but for those with OCD they will want to remove these from the Build Phase (if only to get rid of the warning).
- Because Xcode 4 does not expand tildes (~), I cannot add a reference to the PhoneGap.framework in the user’s home folder, so I added it to a shared location /Users/Shared which has r+w permissions for everyone (the common folder /Library/Frameworks needs admin privileges). It was added here so users without admin privileges can still use PhoneGap.framework, and by extension, the Xcode 4 Template.
- beta1 – Initial release
- beta1.1 – Bug fix for issue #81 (moved framework from /Users/Shared/Library to /Users/Shared/PhoneGap)
- beta1.2 – Made /Users/Shared/PhoneGap writable to everyone
- beta1.3 – Fixed Template not copying over the ‘www’ directory from the framework location (happened only for users that only installed beta1.3 and didn’t migrate from an earlier beta version). This version was tested on a clean Mac OS X 10.7 Lion DP3 system running Xcode 4.1 DP5, and works great.
- beta2 – (UPCOMING) add AppleScript in the project Run Script build phase to get Xcode to automatically add the ‘www’ folder for you