I did the following to create the framework:
- Create new Cocoa Framework named Test.
- Set installation directory to "@rpath".
- Add "Test.h" to public headers.
- Click run.
- Right click on Test.framework under "Products", choose Show in Finder. It's a directory called "Test.framework" in the "Debug" directory of the project. It seems to have reasonable contents (Versions/A directory and symlinks to "Headers", "Resources" and the "Test" binary)
I did the following to create the app:
- Create new Cocoa app named "TestApp".
- Add test framework to project. Choose "Add files to project". Select "Test.framework" directory from "Release" directory of the Test framework project. "Copy items into destination group's folder" is checked Leave "Create groups for any added folders." on.
- Make sure framework files are copied to application bundle. Choose "Add Build Phase" -> "Add Copy Files" Drag Test.framework folder (or group?) from the sidebar into the Copy Files area.
- Add an extra "framework search path" named "@loader_path/../Frameworks"
本文详细介绍了如何创建一个名为Test的Cocoa框架,并将其添加到一个名为TestApp的应用程序中。具体步骤包括:创建框架并设置安装目录,将框架头文件添加到公共头文件中,确保框架文件被复制到应用程序包中。
3万+

被折叠的 条评论
为什么被折叠?



