V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
xi_lin
V2EX  ›  iDev

如何根据类名查找所在的第三方库?

  •  
  •   xi_lin · 2016-08-26 10:34:06 +08:00 · 4340 次点击
    这是一个创建于 2790 天前的主题,其中的信息可能已经有所发展或是发生改变。

    今天看 crash 数据里出现了YLUniTalkingData这个类。 有什么办法可以查找是哪个第三方库引入了这个类吗?

    第 1 条附言  ·  2016-08-26 14:22:15 +08:00
    总结两个办法:

    1. 建一个同名类看 link error

    2. 去 build settings 里打开 write link map file ,直接去里面找
    15 条回复    2017-08-23 17:30:36 +08:00
    uxstone
        1
    uxstone  
       2016-08-26 10:38:34 +08:00
    github 查不到,应该是私有的类库吧
    knightdf
        2
    knightdf  
       2016-08-26 10:59:37 +08:00
    find grep 大法好
    iyeatse
        3
    iyeatse  
       2016-08-26 11:19:25 +08:00
    统计用了 TalkingData?
    Radiums
        4
    Radiums  
       2016-08-26 11:35:36 +08:00
    Java 的话有个 find jar 的网站,或者 maven search
    xi_lin
        5
    xi_lin  
    OP
       2016-08-26 12:08:15 +08:00
    @knightdf 三方库是.a lib , find grep 也能找?
    xi_lin
        6
    xi_lin  
    OP
       2016-08-26 12:08:22 +08:00
    @iyeatse 没有,用的是友盟
    xi_lin
        7
    xi_lin  
    OP
       2016-08-26 12:09:02 +08:00
    @Radiums java 的话倒还好办了
    SeanChense
        8
    SeanChense  
       2016-08-26 12:11:29 +08:00
    调用栈往回看不能找到么
    xi_lin
        9
    xi_lin  
    OP
       2016-08-26 12:37:52 +08:00
    @SeanChense 之前都是 dispatch ,没有有识别意义的东西
    knightdf
        10
    knightdf  
       2016-08-26 12:41:29 +08:00
    @xi_lin 可以找,二进制文件都可以找
    black
        11
    black  
       2016-08-26 12:54:15 +08:00   ❤️ 2
    nm --defined-only xxx.a | grep YLUniTalkingData.o
    SeanChense
        12
    SeanChense  
       2016-08-26 13:12:24 +08:00   ❤️ 1
    @xi_lin 或者你可以自己建个叫 YLUniTalkingData 的文件,等链接的时候你看报错怎么报的。
    xi_lin
        13
    xi_lin  
    OP
       2016-08-26 14:14:34 +08:00
    @SeanChense 你这个办法最直接哈~
    发现是银联的锅 libPaymentControl.a
    看到 YL 前缀完全联想不过去。。
    markss
        14
    markss  
       2017-08-23 15:31:18 +08:00
    @xi_lin YLUniTalkingData 这个 crash,能够复现吗?
    xi_lin
        15
    xi_lin  
    OP
       2017-08-23 17:30:36 +08:00
    @markss 你这个楼爬的有点老。。好像是升级了银联控件就没问题了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2015 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 16:16 · PVG 00:16 · LAX 09:16 · JFK 12:16
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.