Re: [問題] Framework 是什麼?
全刪
Framework = Versioned(Headers + Lib + Resources) + Metadata
隨便開一個內建的看就知道了
$ ls /System/Library/Frameworks/Foundation.framework/
Foundation Headers Resources Versions XPCServices module.map
module.map 用來指示該 framework 要 export 的東西
(應該和 Windows 的 Manifest 差不多, 雖然其實我不太懂那個所以不確定XD)
除了 Versions 以外其他都是 soft link 到 Versions 裡面
$ ls -l /System/Library/Frameworks/Foundation.framework/Versions/
drwxr-xr-x 6 root wheel 238 Dec 25 18:07 C
lrwxr-xr-x 1 root wheel 1 Dec 24 18:31 Current -> C
沒難度, 跳過
$ ls -l /System/Library/Frameworks/Foundation.framework/Versions/C
total 7808
-rwxr-xr-x 1 root wheel 10474768 Dec 24 18:31 Foundation
drwxr-xr-x 2 root wheel 4930 Oct 1 04:04 Headers
drwxr-xr-x 36 root wheel 1462 Dec 24 18:32 Resources
drwxr-xr-x 3 root wheel 102 Aug 27 12:06 XPCServices
drwxr-xr-x 2 root wheel 102 Dec 24 18:31 _CodeSignature
第一個就是 library 本體, 第二三個應該很容易理解
第四個其實也是一個 resource, 最後就...code signature
Framework 被引用的時候通常都是會使用 Current 版本
但是根據狀況可能在 Versions 裡面可以有很多個項目, Current 指向其中一個
這樣就可以消除 binary incompatibility 的問題
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.94.57
推
02/14 15:47, , 1F
02/14 15:47, 1F
→
02/14 15:48, , 2F
02/14 15:48, 2F
→
02/14 15:48, , 3F
02/14 15:48, 3F
→
02/14 15:49, , 4F
02/14 15:49, 4F
→
02/14 15:50, , 5F
02/14 15:50, 5F
→
02/14 15:51, , 6F
02/14 15:51, 6F
→
02/14 15:51, , 7F
02/14 15:51, 7F
→
02/14 15:52, , 8F
02/14 15:52, 8F
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):
MacDev 近期熱門文章
PTT數位生活區 即時熱門文章