First, the main works of the library (ie. a) engineering joint adjustment
1. A new master project and a library project, how to create library project reference my other blog iOS latest framework and. A static library production and use full solution but this library project does not need to be compiled into a static library
2. Drag the static library project to the main project, and I'll drag it down to the Usea folder under the arrows (if you want to drag it to another directory, change the library search Paths, I'll show you the Search Paths path)
3. Drag the. A file under the products catalog under the library project into the main project link Binary with Libraries
4. Set the header search path
First look at the folder path of the main project and the sub-project
Sub-project folder outside the main project, and the main project is the hierarchy is a side-by-side relationship, to refer to the Sub-project header file, set the header search path is: /BASESDK (the Sub-project path) parameter is recursive, such as
"./" and "$ (project_dir)" means the current project is in the same folder, is a relative path, relative to the project in the computer's location, will automatically locate the absolute path on the current computer. If you write an absolute path, the project changes the folder location, or switch to another computer, the path is error. “.. /"Indicates the path of the previous folder in the folder where the project is currently located. The meaning of the two parameters is set by the path, non-recursive is not recursive lookup, and recursive is searched recursively.
5. In the main project Viewcontroller import the header file in the library #import "NSStringUtils.h"
Run, successfully called the sub-project to convert Chinese characters to pinyin method.
Second, the main project set framework engineering joint adjustment
1. Create a new master project and a framework project, how to build a framework engineering reference my other blog iOS latest framework and. A static library production and use full solution but this framework project does not need to be compiled into a static library
2. Drag the framework project directly to the main project, and I'll drag it to the Useframeworktest folder under the arrows, and if you want to drag it to another directory, change the framework Search Paths. The search paths knowledge is described above.
3. Drag the framework file under the Products catalog under framework engineering into the main project link Binary with Libraries
4. Import the more commonly used header files in the framework into APPBaseSDK.h (such as circled) so that only #import <appbasesdk/appbasesdk.h> are needed outside, you can refer to the files in the circle. If you do not want to import too many files into the APPBaseSDK.h, the outside like this reference #import <APPBaseSDK/MBProgressHUD+Easy.h> (although can use but will report a warning, so the import to APPBaseSDK.h in the bar)
5. Call the sub-engineering method, if you can normally call the Chinese character to pinyin method and print the results
IOS Engineering project, Master Engineering and framework engineering or. A static library engineering linking