我看到了这个问题:如何在ios项目中编程获取包含的框架和库的列表?,它试图回答类似的问题。然而,我对此有两个问题。
The answer in above link (or see code below) - does it provide all frameworks or "only" frameworks that are linked to the project.
for (NSBundle *framework in [NSBundle allFrameworks]) NSLog(@"%@",framework.bundlePath.lastPathComponent);
if I see a framework appearing in above code, how can I find its usage in my code. I see many frameworks being referred to in above code, but I'm not able to figure out where exactly are they used. As per my knowledge, few of them are not used - is there a proper way to find this out.
for
循环,并发现它也向我展示了所有框架 - 这意味着上面的代码只是打印了所有框架,而不是我实际将在我的应用程序中使用的框架。但是,这是否意味着所有打印出来的框架都与应用程序链接呢?
otool -L MyApp
的输出结果? - Mats