First, the production of static library files
/*Static Library production*///MakeA.h-(nsstring*) TestA;//MAKEA.M-(nsstring*) testa{return @"Static library test succeeded";}//TestVC.h@property (nonatomic,strong) UILabel *label; @property (nonatomic,copy) NSString*Title;//TESTVC.M-(nsstring*) title{if(!_title) {_title=[[NSString Alloc]init]; } return_title;}-(uilabel*) label{if(!_label) {_label= [[UILabel alloc]initwithframe:cgrectmake ( -, $, -, -)]; _label.backgroundcolor=[Uicolor Cyancolor]; } return_label;}
Second, configure the static library file
Third, run the project, generate a static library
1, run with the simulator once;
2, with the real machine run once;
Iv. completion of the static library
LIBAMAKEA.A----->show in Finder
Five, the simulator and the real machine's. A merge
Terminal: wangyalu:~ wangyalu$ lipo-create/users/wangyalu/library/developer/xcode/deriveddata/ makea-flvyjcsvqkctmsbtnlbnrzeeksen/build/products/debug-iphoneos/libmakea.a/users/wangyalu/library/developer/ Xcode/deriveddata/makea-flvyjcsvqkctmsbtnlbnrzeeksen/build/products/debug-iphonesimulator/libmakea.a-output/ Users/wangyalu/desktop/libmakea.a
Vi. using the Made static library
ios-making static. A Files