Best way to install a custom cocoa framework

后端 未结 4 712
执笔经年
执笔经年 2020-12-29 15:00

I have a custom framework that, following the advice in Apple\'s Framework Programming Guide >> Installing your framework I install in /Library/Frameworks. I do this by addi

4条回答
  •  佛祖请我去吃肉
    2020-12-29 15:50

    The conventional way to do this is to have your framework project and its clients share a common build directory. Xcode will search for framework headers and link against framework binaries in the build folder first, before any other location. So an app project that compiles and links against the header will pick up the most-recently-built one, rather than whatever's installed.

    You can then remove the cp -r and instead use the Install Location build setting to place your build product in the final location, using xcodebuild install DSTROOT=/ at the command line. But you'll only need to do this when you're finished, not every time you rebuild the framework.

提交回复
热议问题