问题
I would like to make a .a file which can be used as a library which implements a UIview and it can be used in various projects just as a include ?
回答1:
For XCode 4 libraries / frameworks follow the links in How to compile xcode4 project to use as framework in second project?.
In order ot have the projects within one workspace, which is more convenient (but I never had the time to try it out:-), you may have a look at XCode 4 how to add an external project
回答2:
Build the project , navigate to Derived data ( Xcode -> Preferences -> Locations -> DerivedData
~/Library/Developer/Xcode/DerivedData/{app name}/Build/Products/Debug-iphonesimulator/yourlibrary.a
(for Debug scheme)
And if the scheme is set to 'Release', and if you are running on Device
~/Library/Developer/Xcode/DerivedData/{app name}/Build/Products/Release-iphoneos/yourlibrary.a
来源:https://stackoverflow.com/questions/6578080/how-do-i-create-a-a-file-in-xcode-4