2012-09-22 15 views
7

我被授予了一個非常差的文檔庫。有沒有辦法檢查公共類型,方法和屬性?如何檢查.a庫?

+1

早在史前史之前的共享庫,我敢肯定,我們用 '納米-og' 上.a文件。 –

回答

7

有幾種選擇 - 我更喜歡的是otool;

從它的手冊頁可能的選項:

-o顯示由Objective-C運行時系統使用的__OBJC段的內容。

例子:

otool -o libRaptureXML_universal.a

[...] 
    contents of (__DATA,__objc_classlist) section 
    00006fe0 0x65d4 
       isa 0x65e8 
     superclass 0x0 
      cache 0x0 
      vtable 0x0 
       data 0x6fb8 (struct class_ro_t *) 
         flags 0x0 
       instanceStart 4 
       instanceSize 12 
        ivarLayout 0x0 
         name 0x6b84 RXMLElement 
        baseMethods 0x6e08 (struct method_list_t *) 
       entsize 12 
       count 27 
        name 0x66bb initFromXMLString:encoding: 
       types 0x6b90 @[email protected]:[email protected] 
        imp 0x1 
        name 0x66e3 initFromXMLFile: 
       types 0x6b9d @[email protected]:[email protected] 
        imp 0xd5 
        name 0x66f4 initFromXMLFile:fileExtension: 
       types 0x6ba7 @[email protected]:[email protected]@12 
        imp 0x209 
        name 0x6713 initFromURL: 
       types 0x6b9d @[email protected]:[email protected] 
        imp 0x335 
        name 0x6720 initFromXMLData: 
       types 0x6b9d @[email protected]:[email protected] 
        imp 0x411 
        name 0x6731 initFromXMLNode: 
    [...]