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

Locations for Public Frameworks的更多相关文章

  1. Spring源码分析——资源访问利器Resource之实现类分析

    今天来分析Spring的资源接口Resource的各个实现类.关于它的接口和抽象类,参见上一篇博文——Spring源码分析——资源访问利器Resource之接口和抽象类分析 一.文件系统资源 File ...

  2. class-dump + DumpFrameworks.pl

    目的:实现生成 private framework 的 .h,以便倒入项目使用私有 api. 一.class-dump 下载地址: http://stevenygard.com/download/ 安 ...

  3. iOS9 class dump header

    获取系统私有API,网上有很多资料总结了一下就三种方式: 使用class-dump可以提取系统私有API列表 使用class-dump+DumpFrameworks.pl,这个可以一次性提取所有系统F ...

  4. java_线程安全-service

    package com.demo.test; import java.util.Collections; import java.util.HashMap; import java.util.Map; ...

  5. Java线程运行轨迹-代码追踪与定位

    今天在写程序时,想到一个问题,当我的程序出异常的时候,控制台输出信息中,明确指出了出现异常的位置,并详细列举了函数的调用层次关系,它是怎么做到的. 竟然想到了这个问题,就去查看了源代码,不过没点几下, ...

  6. Spring中@Value标签的使用详解

    1.@Value标签 由于Spring对通过IOC的方式对对象进行统一管理,所以对任何对象而言,其生成方法均由Spring管理.传统的方法是通过XML配置每一个Bean,并对这个Bean的所有Fiel ...

  7. Ajax 案例之三级联动

    每次在博客园网站写博客,格式真的好难搞,还望好心人告知更好的编辑工具.接下来进入正题:三级联动(其效果演示可看我的博文Ajax 学习总结 末尾). 数据表设计(Oracle) 新建数据表 Employ ...

  8. Spring--ClassPathResource

    /* * 用一个给定的类加载器或者给定的类来加载资源 */ public class ClassPathResource extends AbstractFileResolvingResource { ...

  9. iOS逆向之class-dump

    1.class-dump class-dump是用来dump目标文件的类信息的工具.它利用Objective-C语言的runtime的特性,将存储在mach-O文件中的@interface和@prot ...

随机推荐

  1. 20170212-备份ABAP程序

    把生产机上所有后续开发的CBO程序都备份下来.以备急用! 用过2种方法:1.写BDC程序,模拟 TCODE:SE38 -->Program --> Utilities(M)-->Mo ...

  2. USACO44 TimeTravel 时间旅行(链表)

    第一眼看到这题,woc,这不是主席树!?旁边HZ也表示同意,然后cGh队长就慢悠悠的过来:“想什么,USACO会有主席树!?” ↓打脸不解释,大家可以去%ta的博客(这样ta就不会D飞我了~)http ...

  3. html5--html实现乘法口诀表

    html5--html实现乘法口诀表 总结: 1.多种情况问题:分情况讨论就出来了 2.汉字和数字的对应关系 3.相同的部分统一处理,不同的部分分别对待(这里用中间变量) 问题:九九乘法口诀 两点提示 ...

  4. 并不对劲的bzoj2820:p2257:YY的GCD

    题目大意 \(t\)(\(t\leq10^4\))组数据,给定\(n,m\)(\(n,m\leq10^6\))求 \[\sum_{x=1}^{n}\sum_{y=1}^{m}[gcd(x,y)=1]\ ...

  5. 如何编写linux下nand flash驱动-1

    1.       硬件特性: [Flash的硬件实现机制] Flash全名叫做Flash Memory,属于非易失性存储设备(Non-volatile Memory Device),与此相对应的是易失 ...

  6. UI:数据的解析

    在懒加载的时候要注意事项: 必须使用 self.XX 的样式去开辟空间,不能使用 _XX 的格式去开辟,因为前者是内部的 set 方法,而后者并不走内部的 set 方法. json 文件的创建  xm ...

  7. (转)Repeater中增加序号自增列

    <%# Convert.ToString(Container.ItemIndex+)%> 当Repeater空为时,提示没有数据... <FooterTemplate> < ...

  8. 最小割树Gomory–Hu tree

    fanhq666地址:http://fanhq666.blog.163.com/blog/static/8194342620113495335724/ wiki地址(证明):https://en.wi ...

  9. 洛谷 P4012 深海机器人问题 【最大费用最大流】

    和火星那个有点像,但是这个价值直接在路径上,不用拆点,对于每条价值为w的边(i,j),连接(i,j,1,w)(i,j,inf,0),表示价值只能取一次,然后连接源点和所有出发点(s,i,k,0),所有 ...

  10. Spring的事务传播性与隔离级别以及实现事物回滚

    一.事务的四个特性(ACID) 原子性(Atomicity):一个事务中所有对数据库的操作是一个不可分割的操作序列,要么全做,要么全部做. 一致性(Consistency): 数据不会因为事务的执行而 ...