can someone tell me how to convert code templates from xcode3 to xcode4? I am reading article at http://iphonedevelopment.blogspot.com/2009/04/opengl-es-from-ground-up-part-2-look-at.html开发者_JAVA百科 and author offers his OpenGLES code template, but I can't get it working in new xcode4, seems it have different format. Any suggestions?
Thanks in advance :)
I had the same problem, here is a list of the changes you need to do to make your xcode 3 templates works with xcode 4 :
First you have to move your templates to a new directory :
/YourUserDirectory/Library/Developer/Xcode/Templates/File Templates
(previously it was /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/File Templates)
Then you need to :
- rename your templates from "*.pbfiletemplate" to ".xctemplate"
- rename class.h into
___FILEBASENAME___
.h (the class.m can stay unchanged) - inside all of your files change «FILEBASENAMEASIDENTIFIER» into
___FILEBASENAMEASIDENTIFIER___
- Additonaly all the key words like «FILENAME», «PROJECTNAME», need to be replaced by
___FILENAME___
,___PROJECTNAME___
, etc - «OPTIONALHEADERIMPORTLINE» needs to be replaced by #import "
___FILEBASENAME___.h
"
Hope this helps, Vincent
Until XCode 4 is finalised, there's probably not much point in this. However, you can side by side install XCode 3 and 4 and the XCode project format is compatible between them. Hence, I'd just install the template in XCode 3, create your new project(s), then open the results in XCode 4.
精彩评论