Locations for Public Frameworks
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/Frameworkssubdirectory 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:
The explicit path to the framework that was specified at link time.
The
/Library/Frameworksdirectory.The
/System/Library/Frameworksdirectory.
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的更多相关文章
- Spring源码分析——资源访问利器Resource之实现类分析
今天来分析Spring的资源接口Resource的各个实现类.关于它的接口和抽象类,参见上一篇博文——Spring源码分析——资源访问利器Resource之接口和抽象类分析 一.文件系统资源 File ...
- class-dump + DumpFrameworks.pl
目的:实现生成 private framework 的 .h,以便倒入项目使用私有 api. 一.class-dump 下载地址: http://stevenygard.com/download/ 安 ...
- iOS9 class dump header
获取系统私有API,网上有很多资料总结了一下就三种方式: 使用class-dump可以提取系统私有API列表 使用class-dump+DumpFrameworks.pl,这个可以一次性提取所有系统F ...
- java_线程安全-service
package com.demo.test; import java.util.Collections; import java.util.HashMap; import java.util.Map; ...
- Java线程运行轨迹-代码追踪与定位
今天在写程序时,想到一个问题,当我的程序出异常的时候,控制台输出信息中,明确指出了出现异常的位置,并详细列举了函数的调用层次关系,它是怎么做到的. 竟然想到了这个问题,就去查看了源代码,不过没点几下, ...
- Spring中@Value标签的使用详解
1.@Value标签 由于Spring对通过IOC的方式对对象进行统一管理,所以对任何对象而言,其生成方法均由Spring管理.传统的方法是通过XML配置每一个Bean,并对这个Bean的所有Fiel ...
- Ajax 案例之三级联动
每次在博客园网站写博客,格式真的好难搞,还望好心人告知更好的编辑工具.接下来进入正题:三级联动(其效果演示可看我的博文Ajax 学习总结 末尾). 数据表设计(Oracle) 新建数据表 Employ ...
- Spring--ClassPathResource
/* * 用一个给定的类加载器或者给定的类来加载资源 */ public class ClassPathResource extends AbstractFileResolvingResource { ...
- iOS逆向之class-dump
1.class-dump class-dump是用来dump目标文件的类信息的工具.它利用Objective-C语言的runtime的特性,将存储在mach-O文件中的@interface和@prot ...
随机推荐
- java jdbc/ojdbc 链接oracle的三种方式
方法一:使用service_name 连接oracle jdbc:oracle:thin:@//:/<service_name> 例如: jdbc:oracle:thin:@//10.1 ...
- idea如何将普通文件夹转成java项目root目录/maven
转java项目 转maven 选中pom文件右键就能看到了
- Linux 打包classes
进入项目后 tar -zcvf ~/${HOSTNAME}-${PWD##*/}-$(date +%Y-%m-%d)-classes.tar.gz webapps/ROOT/WEB-INF/class ...
- 【BZOJ 1233】 干草堆
[题目链接] 点击打开链接 [算法] 这题有一个性质 : 位于顶层的干草堆可以满足宽度最小且高度最高 根据这个性质,用单调队列优化DP,即可 [代码] #include<bits/stdc++. ...
- Linux网络协议栈(三)——网络设备(2)
2.1.网络设备的注册与注销注册网络设备发生在下列情形: (1)加载网卡驱动程序 网卡驱动程序如果被编译进内核,则它在启动时被初始化,在运行时被作为模块加载.无论初始化是否发生,所以由驱动程序控制 ...
- 洛谷P4136 谁能赢呢?——博弈
题目:https://www.luogu.org/problemnew/show/P4136 每个人有足够聪明,一定会把图走满: 所以n为偶数先手胜,n为奇数后手胜. 代码如下: #include&l ...
- 解析javascript变量
//add by tim//提供解析javascript 脚本的变量集合 using System;using System.Collections.Generic;using System.Linq ...
- hdu3652(含有13且能被13整除的数)数位DP基础
B-number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Su ...
- Java-Runoob-高级教程-实例-字符串:09. Java 实例 - 字符串小写转大写
ylbtech-Java-Runoob-高级教程-实例-字符串:09. Java 实例 - 字符串小写转大写 1.返回顶部 1. Java 实例 - 字符串小写转大写 Java 实例 以下实例使用了 ...
- IJ:IntelliJ IDEA安装
ylbtech-IJ:IntelliJ IDEA安装 响应速度快 1.返回顶部 1. 2. 3. 4. 5. 6. 7. 2. 接受协议,激活IJ返回顶部 1. 2. 3. 4. 5. 6.0. 6. ...