1. Create a new framework project
2. Delete the original. h file and create a class with the same name as the project
Add the implementation code to the. m in the new class. H Add interface
3.Xcode parameter Setting "architectures" Add "armv7s" "Build Active Architecture only" set to "No" "Dead Code stripping" set to "No" "Link with S" Tandard Libraries "set to" NO "" Mach-o Type "set to" Static Library "" iOS Deployment Target "is set to" iOS 7.0 ", which means that the compilation of the system version above is supported IOS7.0
4. Adding file "Compile Sources" to the framework adds files encapsulated into the framework, that is, hide "headers->public" To add header files that are exposed to the user
5. Compile the build framework file to select both the real machine and the Iphone6 emulator to compile first find the Framework,show in finder successfully generated by the real machine compilation and then find the framework that the IPHONE6 emulator compiled successfully ( Command+ (Up-arrow key) in the real machine directory to return to the previous level folder path
6. Synthesis of the generic version of the framework file is required to synthesize the file is the Frameworktest file in the Frameworktest.framework package
Use the terminal for compositing operations Lipo-create framewroktest.framework/frameworktest (real-machine framework path) framewroktest.framework/frameworktest (Iphone6 Simulator framework path)-output Save path/frameworktest
The synthesized files are as follows:
Replace the synthesized frameworktest file with the Frameworktest file in the Frameworktest.framework package in the real machine or simulator path
7. Test the framework of your own production
Framework production process, Xode-6.0.1