Locations for Public Frameworks

Third-party frameworks can go in a number of different file-system locations, depending on certain factors.

  • Most public frameworks should be installed at the local level in /Library/Frameworks.

  • If your framework should only be used by a single user, you can install it in the ~/Library/Frameworks subdirectory of the current user; however, this option should be avoided if possible.

  • If they are to be used across a local area network, they can be installed in  /Network/Library/Frameworks; however, this option should be avoided if possible.

For nearly all cases, installing your frameworks in /Library/Frameworks is the best choice. Frameworks in this location are discovered automatically by the compiler at compile time and the dynamic linker at runtime. Applications that link to frameworks in other directories, such as ~/Library/Frameworks or /Network/Library/Frameworks, must specify the exact path to the framework at build time so that the dynamic linker can find it. If the path changes (as it might for a user home directory), the dynamic linker may be unable to find the framework.

Another reason to avoid installing frameworks in ~/Library/Frameworks or /Network/Library/Frameworks is the potential performance penalties. Frameworks installed in network directories or in network-based user home directories can cause significant delays in compilation times. Loading the framework across the network can also slow down the launch of the target application.

Third-party frameworks should never be installed in the /System/Library/Frameworks directory. Access to this directory is restricted and is reserved for Apple-provided frameworks only.

When you build an application or other executable, the compiler looks for frameworks in/System/Library/Frameworks as well as any other location specified to the compiler. The compiler writes path information for any required frameworks in the executable file itself, along with version information for each framework. When the application is run, the dynamic link editor tries to find a suitable version of each framework using the paths in the executable file. If it cannot find a suitable framework in the specified location (perhaps because it was moved or deleted), it looks for frameworks in the following locations, in this order:

  1. The explicit path to the framework that was specified at link time.

  2. The /Library/Frameworks directory.

  3. The /System/Library/Frameworks directory.

If the dynamic link editor cannot locate a required framework, it generates a link edit error, which terminates the application.

https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Tasks/InstallingFrameworks.html#//apple_ref/doc/uid/20002261-BBCCFBJA

最新文章

  1. 大叔也说Xamarin~Android篇~Activity之间传递数组
  2. 深入理解FTP协议
  3. 利用Maven建立java web项目
  4. Practice:输入年月日,判断该时间为一年的第几天
  5. Linux 挂载存储方法
  6. 在AngularJS中学习javascript的new function意义及this作用域的生成过程
  7. 转自 x_x_的百度空间 搞ACM的你伤不起
  8. java的 IO流之缓冲流(转载)
  9. jq指定行切换
  10. Java日志最佳实践
  11. C# 中奇妙的函数–7. String Split 和 Join
  12. [BZOJ2324][ZJOI2011][最小费用最大流]营救皮卡丘
  13. 比较全的 C# 操作 Word的代码
  14. redis基础二
  15. shell获取字符串长度
  16. 使用TensorFlow Object Detection API+Google ML Engine训练自己的手掌识别器
  17. Spring Cloud入门教程 - Zuul实现API网关和请求过滤
  18. C#、Java和JS实现SHA256+BASE64加密总结
  19. Android Studio 将文件打包成APK
  20. jsp链接orcl

热门文章

  1. jvm部分知识总结
  2. eclipse 重启/打开内置浏览器
  3. AutoIT: 学习对GUI Sample上所有的资源进行操作
  4. poj 3321(带时间戳 + 区间统计)
  5. 11_传智播客iOS视频教程_NS前缀和@符号
  6. LayUI table表格控件 如何显示 对象中的属性(针对Mybatis的级联查询--一对一情况)
  7. bzoj 1072: [SCOI2007]排列perm【状压dp】
  8. bzoj 4849: [Neerc2016]Mole Tunnels【模拟费用流】
  9. 洛谷 P4013 数字梯形问题【最大费用最大流】
  10. 版本管理工具 Git