Start by creating
1. Create the Cocoa Touch framework under iOS as
2. Select the build Setting search Mach-o type to change to STATICB Library
3. Support Bitcode
Need to search for other C Flags in Tagets build setting, add Command "-fembed-bitcode"
If you do not add cflags, you may get an error when you use it. The error message keywords are as follows: ... does not contain bitcode. You must rebuild it with Bitcode enabled (Xcode setting Enable_bitcode), obtain a updated library from the vendor, ...
4. Add armv7s
Under architectures, add armv7s and select. Set build Active Architecture only to No
5. Pull the files you want to use into the project
6. Set Header
Move the header file you want to expose to public, hide it under private or project, and, of course, the hidden header file can no longer be referenced.
7. Introduce the required. h file (if it is not added to the. h in the same name as the project, it will appear when the file is not found)
8. Build
1. Check simulator, compile program
2, check the test machine, compile the program
3. In the Finder, locate the framework that was just compiled, select the framework indicated in the figure, and then right-click the show in Finder. Find the test file shown in, one is Debug-iphoneos (real machine), one is under the Debug-iphonesimulator (simulator).
9. Open the terminal (synthesize one of the simulator and the real machine)
打开控制台输入 lipo -create iphoneos下frameworkTest的路径 simulator下frameworkTest的路径 -output 新的路径
10. Change the myfirstframework name on the desktop to the same name as the binary file I'm here for DL.
Save the modified framework by copying it, and this is the framework that we are finally making.
Use your own layer of framework
1. Pull the framework we just created into the project you need (not here)
2. Import Header File
3. Initializing the use of
Build and use of the IOS Framework