Creating a Cocoa Framework

后端 未结 2 1838
名媛妹妹
名媛妹妹 2021-01-06 04:24

I\'ve created a working Cocoa framework which I wish to redistribute. The problem is however, it won\'t run outside of Xcode. I\'ve read something about @executable_pa

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-06 04:43

    Here is how I usually manage things:

    1. In the framework's Xcode project, set the Installation Directory to @rpath

    2. Add the framework to your application's Xcode project. Add a Copy Files build phase, select Frameworks in the Destination popup, and ensure your framework is added so it will be copied to your application's Frameworks directory when it is built.

    3. Finally, in your project's settings, add @loader_path/../Frameworks to Runpath Search Paths.

提交回复
热议问题